Problems running boot sector on QEMU
<p>I am working on an operating system. I am developing on an AMD64 system, compiling with NASM. I have a boot sector that compiles but won't run on QEMU. I checked the registers after the bootup to see if QEMU is actually loading and executing the boot sector. This is what I noticed:</p>

<ul>
<li><p>It loads the boot sector, checks the memory address <code>0x7c00</code> and shows the boot sector code</p></li>
<li><p>No execution seems to be happening, all the registers are set to <code>0xf000ff53</code> despite the boot sector setting them to zero</p></li>
</ul>

<p>The boot sector code that I have specifically set registers to zero then halts the execution. However, the QEMU registers don't reflect this. Could anyone help me out on getting the code working? Is there something wrong with QEMU? Here is the code for the boot sector:</p>

<pre><code>org 0x7c00
bits 16

cli
xor ax, ax

mov bx, ax
mov cx, ax
mov dx, ax

hlt

times 510 - ($ - $$) db 0
dw 0xaa55
</code></pre>

<p>How do I solve this problem? Any suggestions?</p>