Source code

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
kataklinger
Member
Member
Posts: 381
Joined: Fri Nov 04, 2005 12:00 am
Location: Serbia

Source code

Post by kataklinger »

Including other configuration files like makefiles, ...
crc

Re:Source code

Post by crc »

The actual sourcecode for the minimal build of my OS is 1,237 lines; the extra drivers add another 60 lines, and the editor is about 15 lines. The makefile is 20 lines. And 65 lines for the optional serial console. So it's a total of 1,397 lines at the moment. It could be shrunk to under 1,000 lines if I squeezed out blank lines and comments.

I expect it to grow to 2,500-3,000 lines once I've implemented everything I want.
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:Source code

Post by distantvoices »

Hm .... currently, my task control block management code alone contains ca 1200 lines of code.

the amount of lines is gonna raising as development continues.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Source code

Post by Solar »

Hmm... for all that I have worked on Pro-POS' design for over two years, and spent quite some time in working on the PDCLib, my "accountable" lines amount to a measly 5000 or so, including gratuitious commenting.

With regards to the PDCLib, that will change as soon as my tower recovers from a long-standing illness (called Windows). Working on a 640x240 PDA with 1/2 keyboard and no compiler hampers coding productivity a bit. ;)
Every good solution is obvious once you've found it.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Source code

Post by Pype.Clicker »

51602 lines in "*.c","*.h"
2461 lines of makefiles (including copy/pasted makefiles, templates and commands for DOS/linux/cygwin configurations)

1032 lines of CodeMonkey plugins and IDL files

35090 lines of tools

::)
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re:Source code

Post by Brendan »

Hi,

Here's the line counts for the current rewrite of my OS (which is roughly 99.98% NASM and a few make files). These line counts don't include blank lines (generated via "cat -b *"):

2216 for include files
17657 for kernel
31119 for mixed boot/configuration code
21619 for regional database source files
748 for DOS utilities (written specifically for the OS)
184 source for generating boot images

73543 TOTAL source

Then there's 3340 lines of html documentation, plus the source code from the previous version of the OS which will be "ported" to the new version (GUI, CLI, PS/2 keyboard & mouse driver, user interface code, virtual filesystem code, floppy driver, serial port driver, etc)...


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
User avatar
bubach
Member
Member
Posts: 1223
Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:

Re:Source code

Post by bubach »

Lines in ASM is a bit shorter then lines in C.. Couldn?t we count the size of the source/binarys instead? :-)
"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Source code

Post by Solar »

10 lines of working ASM bring as much fame as 10 lines of working C. ;D
Every good solution is obvious once you've found it.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Source code

Post by Candy »

Solar wrote: 10 lines of working ASM bring as much fame as 10 lines of working C. ;D
Actually, the question as it is now asks for the number of line numbers. I haven't used line numbers since GWBasic, which was a long long time ago. My OS code thus doesn't have line numbers :)
Dreamsmith

Re:Source code

Post by Dreamsmith »

How many line numbers does your source code have?
HA! I didn't even notice that. I'm afraid I have to change my answer to zero -- I haven't used line numbers since my days of coding in Applesoft BASIC.

Good eye, Candy. The rest of us were asleep at the keyboard...
User avatar
bubach
Member
Member
Posts: 1223
Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:

Re:Source code

Post by bubach »

number of line numbers
and there you lost me... ???
"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub
Dreamsmith

Re:Source code

Post by Dreamsmith »

bubach wrote:
number of line numbers
and there you lost me... ???
If the question is "How many line numbers...?", the answer should be the number of line numbers. Consider:

Code: Select all

5 REM Simple Eliza
10 PRINT "How are you?"
20 INPUT A$: PRINT
30 PRINT "Why do you feel " + A$ + "?"
40 INPUT A$
    : PRINT
50 GOTO 30
The above code has 7 lines, but only 6 line numbers (5, 10, 20, 30, 40, & 50).
User avatar
bubach
Member
Member
Posts: 1223
Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:

Re:Source code

Post by bubach »

are u sure that is what he?s asking? sound wierd..
anyway, my current version of Notepad don?t support line numbering.. ;-)
a guess should be a couple of thusands, i don?t think i am over 10.000 yet.. :-)

/ Christoffer
"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub
Dreamsmith

Re:Source code

Post by Dreamsmith »

bubach wrote:are u sure that is what he?s asking? sound wierd..
I don't think it's what he meant to ask, but it is what he did ask.
bubach wrote:anyway, my current version of Notepad don?t support line numbering.. ;-)
Actually, it does. You just type the line number at the start of the line. Note that the "line number" has nothing to do with which line of the source code it is. Consider:

Code: Select all

12 REM Another example
39 PRINT "Hello, world."
81 PRINT "How are you doing?"
117 INPUT A$
118 PRINT "That's nice."
2842 END
No editor support is required, indeed, how would the editor have any idea what the line number of a line is, if you didn't enter it in? The "line number" has nothing to do with the line's position in a file. Think of it as a numeric label, although it's a bit more than that -- it also determined execution order.

For real fun, have your line numbers out of order! (They'll execute in numeric order, least to greatest, but there's no requirement that they be ordered that way in a source text file -- lines can be entered in any order.) Enter and execute this into a BASIC interpretter:

Code: Select all

20 PRINT "A"
40 PRINT "B"
10 PRINT "C"
30 END
The output of this program will be:

Code: Select all

C
A
BASIC -- gotta love it...
User avatar
bubach
Member
Member
Posts: 1223
Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:

Re:Source code

Post by bubach »

yeah, yeah... u know what i meant didn?t you?
(PS: i know old basic, i am not _that_ young ;))
"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub
Post Reply