Hi,
I completed a new "System Build Utility" several days ago. Part of it's job is to convert NASM source code into html pages (the other part involves checking modification times, running NASM & NDISASM, doing a hex dump, etc).
I'm intending to convert my entire OS over to this new utility, so that all of the source code will become available on my web site, and so that all of the resulting web pages are automatically updated every time I build the OS. So far I've only converted the 1440 KB floppy boot loader and a couple of other things.
For an example of it's output, there's the "one page per source file" version of the floppy boot code at:
http://bcos.hopto.org/latest/sys/i386/b ... index.html
It also does a "one page for everything" version (better for offline viewing):
http://bcos.hopto.org/latest/sys/i386/boot/boot144.html
And the main source code page is (or will be once more code is ready):
http://bcos.hopto.org/source.html
I'm hoping to make my OS's source code as easy to read as an online tutorial - good for beginners, but also useful for more experienced OS developers...
I was wondering if anyone had any suggestions (or perhaps reasons why it might be a bad idea) - I guess I'd rather find out now, before I convert the remaining code (tens of thousands of lines)...
Thanks,
Brendan
System Build Utility - Opinions?
System Build Utility - Opinions?
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.
Re:System Build Utility - Opinions?
That is good. I see that you have cross-links for labels.
When I was playing around with OS design, I considered writing an analogous utility for C. However, I ended up working on compilers and languages with the skills I developed
Perhaps I should revisit the "C documentation compiler".
When I was playing around with OS design, I considered writing an analogous utility for C. However, I ended up working on compilers and languages with the skills I developed
Perhaps I should revisit the "C documentation compiler".
Re:System Build Utility - Opinions?
Hi,
IMHO the problem is that C is much harder to parse. Assembly is easier - you can do one line at a time for example .
Anyway, based on previous habits, it's unlikely I'll need C for a long long time - I only use it for applications, not system code like this. That's why I skipped it this time, and complicated the utility with other things ;D.
This particular utility actually works on N seperate "sets of source code files" at once, and runs NASM in parallel to the HTML conversion (then does NDISASM in parallel with the hex dump and finding debugging markers). For example, with one command I can assemble and convert the floppy boot loader, a GRUB boot loader, the boot manager and 6 "kernel modules", and end up with up to 20 processes running at once.
All of the actual work is mostly IO bound and the development computer is a dual CPU server, so the main idea was to maximize the amount of work done in parallel. I was using a collection of makefiles and seperate utilities (make, NASM, NDISASM, dump, marks and sourcerer) - almost everything happened one at a time (except for 'make -j' which was used for the assembling the kernels). Early tests indicate that the new utilty can halve the time it takes to build everything...
Cheers,
Brendan
I had a previous version ("Sourcerer") which was meant to convert assembly and C to HTML. It didn't do any syntax highlighting or anything, but for assembly it did cross-link everything possible. For C I gave up and it didn't cross-link much ('#define' and almost nothing else IIRC).Phugoid wrote: That is good. I see that you have cross-links for labels.
When I was playing around with OS design, I considered writing an analogous utility for C. However, I ended up working on compilers and languages with the skills I developed
Perhaps I should revisit the "C documentation compiler".
IMHO the problem is that C is much harder to parse. Assembly is easier - you can do one line at a time for example .
Anyway, based on previous habits, it's unlikely I'll need C for a long long time - I only use it for applications, not system code like this. That's why I skipped it this time, and complicated the utility with other things ;D.
This particular utility actually works on N seperate "sets of source code files" at once, and runs NASM in parallel to the HTML conversion (then does NDISASM in parallel with the hex dump and finding debugging markers). For example, with one command I can assemble and convert the floppy boot loader, a GRUB boot loader, the boot manager and 6 "kernel modules", and end up with up to 20 processes running at once.
All of the actual work is mostly IO bound and the development computer is a dual CPU server, so the main idea was to maximize the amount of work done in parallel. I was using a collection of makefiles and seperate utilities (make, NASM, NDISASM, dump, marks and sourcerer) - almost everything happened one at a time (except for 'make -j' which was used for the assembling the kernels). Early tests indicate that the new utilty can halve the time it takes to build everything...
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.