Bare Bones only works after running "info registers" in QEMU
Posted: Sat Dec 18, 2010 4:08 pm
I couldn't get the Bare Bones working in Qemu. Everything compiled and linked with no errors, but simply didn't do anything when I ran it in qemu.
So I decided to try and see where things were going wrong. I ran Qemu from the terminal (btw, I'm using Linux) like so:
That makes it so I can enter commands into the terminal window while my OS is running.
So at the (Qemu) prompt, I type:
To, obviously, dump the registers.
The instant I hit enter, the upper left character is replaced with an A, which is exactly what the program was supposed to do.
I repeated that process a few times to make sure it was reproducible, and it is (on my system).
All OSes that I've tried which don't switch into protected mode seem to work fine on Qemu, and the 2 tutorials for protected mode that I've followed only work after doing the above process (1 was the bare bones, the other can be found here: http://www.osdever.net/tutorials/view/t ... ected-mode). So I figure it's got something to do with switching to protected mode.
shows
QEMU PC emulator version 0.12.5 (qemu-kvm-0.12.5), Copyright (c) 2003-2008 Fabrice Bellard
What can I do to avoid having to do this every time?
So I decided to try and see where things were going wrong. I ran Qemu from the terminal (btw, I'm using Linux) like so:
Code: Select all
qemu -monitor stdio -kernel kernel.bin
So at the (Qemu) prompt, I type:
Code: Select all
info registers
The instant I hit enter, the upper left character is replaced with an A, which is exactly what the program was supposed to do.
I repeated that process a few times to make sure it was reproducible, and it is (on my system).
All OSes that I've tried which don't switch into protected mode seem to work fine on Qemu, and the 2 tutorials for protected mode that I've followed only work after doing the above process (1 was the bare bones, the other can be found here: http://www.osdever.net/tutorials/view/t ... ected-mode). So I figure it's got something to do with switching to protected mode.
Code: Select all
qemu -version
QEMU PC emulator version 0.12.5 (qemu-kvm-0.12.5), Copyright (c) 2003-2008 Fabrice Bellard
What can I do to avoid having to do this every time?