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.
Memory
Re:Memory
Hi,
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
There are major differences for memory access in protected mode (it's protected!). See Intels manuals for details...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.
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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Memory
you of course turned on protected mode before trying this ? ...