I don't know how to compile my C kernel for 16 bit real mode. I have tried a variety of compilers with no luck. My bootloader simply loads raw sectors from the floppy (my kernel lives right after the first sector on the disk) to the physical memory address 1000h:0000h then jumps to it. How can I compile my C kernel to work in 16 bit real mode?
my basic kernel:
unsigned char *videoram = (unsigned char *) 0xb8000;
videoram = 65; /* character 'A' */
videoram = 0x07; /* forground, background color. */
while( 0 )
the compilers I have tried are GCC, tinyCC, and DMC. My goal is to get a flat binary file that I can jump to to begin execution.
以上就是16 bit C code for real mode kernel的详细内容，更多请关注web前端其它相关文章！