![Smile :)](./images/smilies/icon_smile.gif)
I've writen the bootloader in asm 16bits and its working correctly ,
I tried to use a small kernel in C (16 bits) to print a message on the screen , but it doesn't work ! (when booting the bootloader goes ok but the kernel doesn't work(nothing happen)) , possible reasons are:
+the kernel is compiled in 32bit mode and not in 16bit mode (to compile my c code I used asm("code16gcc \n") in the beginning of the source file ), so is this method the write way to compile it in 16bit mode,
+second possible reason is that my kernel is not in binary format (i.e the executable hase a header) , so how do I compile to get binary format
My question : How can I compile a C code in 16bit mode
what's the syntax of the gcc command to use for that an to get a binary file (I use : gcc -ffreestanding -o kernel.out kernel.c and I tried some others)
thenk you for reading all of this
![Smile :)](./images/smilies/icon_smile.gif)