Page 1 of 1
Memory
Posted: Tue Jun 08, 2004 4:49 pm
by Pulser
Ok, I've got my bootloader to load a kernel off a floppy, and it succesfully jumps to the kernel
But I tried doing:
mov ax, 65
mov [0xb8000], ax
to print the letter A in the top left hand corner, but it doesn't seem to work. Do I have to access memory differently in protected mode? Thanks.
Re:Memory
Posted: Tue Jun 08, 2004 8:40 pm
by Brendan
Hi,
Pulser wrote:
Ok, I've got my bootloader to load a kernel off a floppy, and it succesfully jumps to the kernel
But I tried doing:
mov ax, 65
mov [0xb8000], ax
to print the letter A in the top left hand corner, but it doesn't seem to work. Do I have to access memory differently in protected mode? Thanks.
There are major differences for memory access in protected mode (it's protected!). See Intels manuals for details...
Despite this your code may actually be working. It puts an 'A' in the top left corner of the screen with a black foreground and a black background. Because both colours are black it will all look black
Perhaps "mov ax,0x0F41" might work (it'd do the same but the foreground colour will be white). If it doesn't work then there's something wrong (or unexpected) with the way DS is configured..
Cheers,
Brendan
Re:Memory
Posted: Wed Jun 09, 2004 12:42 am
by Pype.Clicker
you of course turned on protected mode before trying this ? ...