Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
unsigned short *vidmem = (unsigned short*) 0xb8000;
vidmem[0] = '$' | 0x0700;
for (;;)
;
Above is my kernel code
It is expect to print '$' out but it doesn't print out
What my boot load do is load kernel in 0x10000 and
jump to kernel
Everything is fine
I check in boch whether kernel loaded or not..
Kernel is loaded and run..
But It doesn't print out
Disassembled code also looks strange..
Johnnyd wrote:
How to compile c code to work on realmode?
You'll need a compiler that understands 16-bit real-mode with segmented addressing.
Most of the time it's far simpler to just write an assembly stub that switches to P-Mode and loads your kernel (Or use GRUB as your bootloader and avoid such hassles).
Once in P-Mode your compiler produced binaries should work fine.