int 13h function 42h crashes
Posted: Fri May 11, 2012 9:07 pm
Hello everyone,
I have been working on this for about two days without any resolution in sight. The problem does not appear to be the software. The problem is in the following code section from our fat16 vbr:This code section is innocent enough and works well--most of the time. It uses stack space to store the address packet to conserve image space and issues int 13h function 42h. This function was decided over function 2 due to concerns with large hard disk LBAs.
The problem occurs when the vbr attempts to call the BIOS with ES:BX=0x1000:0x7a00 which results in a crash in the Bochs BIOS ROM (>>PANIC<< prefetch: RIP > CS.limit). Nothing at all is located at this location -- does anyone know what can cause the BIOS to crash like this? The software is not able to continue as the int 0x13 call never returns. I can also hardcode the segment:offset buffer with this address and still result in a crash. (Interestingly enough, the load itself is successful.)
Thanks for any feedback.
I have been working on this for about two days without any resolution in sight. The problem does not appear to be the software. The problem is in the following code section from our fat16 vbr:
Code: Select all
;
; push disk address packet on stack
;
push word 0 ; hi 32 bits lba
push word 0
push eax ; low 32 bits lba
push es ; segment
push bx ; offset
push word 1 ; number of sectors
push word 16 ; size of address packet
mov si, sp ; si points to packet
;
; load sector
;
mov ah, 0x42
mov dl, [bootDrive]
int 0x13 ; 0x7cb2
The problem occurs when the vbr attempts to call the BIOS with ES:BX=0x1000:0x7a00 which results in a crash in the Bochs BIOS ROM (>>PANIC<< prefetch: RIP > CS.limit). Nothing at all is located at this location -- does anyone know what can cause the BIOS to crash like this? The software is not able to continue as the int 0x13 call never returns. I can also hardcode the segment:offset buffer with this address and still result in a crash. (Interestingly enough, the load itself is successful.)
Thanks for any feedback.