Text output TroubleShooting
So, you read everything in How do I output text to the screen in protected mode? carefully, but it still doesn't work. Here's a check list with suggestion to find out what's wrong.
Can you print in real mode ?
While still in RealMode, try to write directly to Video memory. If this doesn't work either you haven't set up the Video mode properly to 0x03 (check out RBIL) or you're assuming the wrong video memory address (0xb8000 instead of 0xb0000)
Can you print a single character ?
While in ProtectedMode, try a simple command like
*((int*)0xb8000)=0x07690748;
which should display 'Hi' in grey-on-black on top of your screen. If the previous step worked and not this one, check your paging / segmentation setup correctly maps your assumed video memory address onto 0xB8000 (or 0xB0000). NASM-only developers may use
mov [0xb8000], 0x07690748
and GAS-guys will have
movl $0x07690748,0xb8000
Can you find your string in the kernel image ?
That may sound stupid, but it's a common mistake to forget the .rodata section in the linker script. -fwritable-strings can be a substitute, but still if you had
kprint("Hello World");
and that no "Hello World" string appear in your kernel.bin (or whatever), don't search any further
Contributors: ChrisGiese
