I want to write a program which can be run both with no operating system (just my own boot loader and protected mode initializer) and on Windows. This process should run in a protected mode and have a single thread only. I want to write it in C (using some ANSI functions from the runtime library) and partially in ASM. This process should also run on Windows (Linux might seem a better option, but I need it to be Windows) , so it can be debugged.
Can anyone here suggest me something? I mean what C compiler should I use. I suppose I need a compiler which doesn't add some specific startup code. And C library should link statically with no special initialization.
Posted on 2003-07-14 13:02:13 by Vaxon
Just about any compiler will do, as long as you can keep it from including standard headers - I have personal experience with visual studio and GCC, both work well. However, don't depend on using libc, a lot of it requires initialization. You can probably get away with using some string functions, but that's about it. You're better off writing your own routines, really. Also, things like objects (especially global/static objects, and dynamically allocated ones, and exception handling, requires a lot of helper code).
Posted on 2003-07-15 03:32:48 by f0dder
linux may be your best option there is every kind of debugger you could want for free you have more file system options and you can customize the C libarays just for this program
Posted on 2003-07-20 12:10:51 by rob.rice