16bit C Code Questions.
Posted: Tue Sep 12, 2006 6:29 pm
Hey all.
Just curious...
Assembly code for the Bootloader is 16bit, yup.
My bootloader loads a second stage, also in Assembly, 16bit.
Is there a way I can have the second stage in C?
16bit C is possible, I mean - MSDOS programs could be written in it.
So... questions are : What do I need to do to execute 16bit C code?
What does the bootloader need to setup?
Or is it jus the usual? Generate a freestanding plain 16bit binary from a 16bit C Compiler/Linker - have the Data segment set where we want it and jump to the code location?
Being able to write the Stage 2 in C would help me tremendously.
~Zeii.
Just curious...
Assembly code for the Bootloader is 16bit, yup.
My bootloader loads a second stage, also in Assembly, 16bit.
Is there a way I can have the second stage in C?
16bit C is possible, I mean - MSDOS programs could be written in it.
So... questions are : What do I need to do to execute 16bit C code?
What does the bootloader need to setup?
Or is it jus the usual? Generate a freestanding plain 16bit binary from a 16bit C Compiler/Linker - have the Data segment set where we want it and jump to the code location?
Being able to write the Stage 2 in C would help me tremendously.
~Zeii.