sj95126 wrote:
I've found that Bochs turns out to be the most suited for debugging problems in my bootsect [...] it has some handy tricks like magic breakpoint (xchg bx,bx) that help out a lot.
Sounds interesting, tomorrow I'll download it to make some tests. Thanks for the advice
Octocontrabass wrote:
Is that address somewhere in the BIOS ROM?
Not really, it gets in an infinite loop around address f000:000017ae. I still do not use that chunk of memory during the execution of that code or, at least, it could be part of the stack since I placed the stack topo at 0x7C00.
Octocontrabass wrote:
If you boot from USB, the firmware might completely skip the MBR and run the VBR directly.
I boot from HDD, anyway I placed a little print statement in the MBR so I'm sure it is executed
Octocontrabass wrote:
Does the instruction right before the jump have a 32-bit memory operand?
If you mean the `jump $` instruction to trigger VirtualBox, it is the first instruction after the BPB, so I'll just post the bytes before the jump instruction
Code:
eb58 906d 6b66 732e 6661 7400 0204 0400
0200 0200 00f8 4000 2000 4000 0000 0000
0000 0100 8000 2908 9997 9142 6f6e 734f
5320 2020 2020 4641 5431 3620 2020 0e1f
be5b 7cac 22c0 740b 56b4 0ebb 0700 cd10
5eeb f032 e4cd 16cd 19eb ebfe
ebfe being the `jmp $`