Bochs works but Qemu doesn't
Posted: Sun Oct 22, 2006 12:00 pm
This is a code snipet from my procedure for reading the HDD.
When I execute the OS with Bochs, everything is going well.
But when I try to run it with Qemu, then it reads nothing from the HDD.
Am I missing something?
When I execute the OS with Bochs, everything is going well.
But when I try to run it with Qemu, then it reads nothing from the HDD.
Am I missing something?
Code: Select all
mov dx,0x1f7 ;This is the command port
mov al,0x20
out dx,al ;Send the 0x20 command(Read sector with retry)
.loop1:
in al,dx
bt ax,3 ;Here we check if we are ready to read
jnc .loop1
mov ecx,256 ;We will read 256 words
mov dx,0x1f0 ;This is the data port
cld ;Set the direction(increment EDI)
rep insw ;Read 256 words from the data port