Page 1 of 1
Using C the entire way?
Posted: Wed Nov 24, 2004 3:56 pm
by Gros
Is it possible to create an OS only using C? (and inline assembler of course). For instance, the bootloader. It?s hard to find a C compiler that generates 16-bits code(that?s needed in the loader), but if I find one, would it(technically) be possible to write a boot loader in C?
Re:Using C the entire way?
Posted: Wed Nov 24, 2004 9:15 pm
by Brendan
Hi,
Gros wrote:
Is it possible to create an OS only using C? (and inline assembler of course). For instance, the bootloader. It?s hard to find a C compiler that generates 16-bits code(that?s needed in the loader), but if I find one, would it(technically) be possible to write a boot loader in C?
Yes. Relatively large numbers of OS's are written in C (with inline assembler). For the boot loader, there are C compilers capable of generating 16 bit real mode code (some are free/GPL). For example:
http://www.devdaily.com/unix/man/man1/bcc.1.shtml
Cheers,
Brendan