Assuming that DL contains the disk number, AX contains the address of the bootable entry in PT, DS is updated to the right segment and the stack is correctly set, this is the code:
Code: Select all
push DWORD 0x00000000
add ax, 0x0008
mov si, ax
push DWORD [ds:(si)]
push DWORD 0x00007c00
push WORD 0x0001
push WORD 0x0010
push ss
pop ds
mov si, sp
mov sp, bp
mov ah, 0x42
int 0x13
the result is error 0x01 in AH and obviously CF set. No sectors are transferred.
I checked the stack trace endlessly and it is ok, the partition table is ok too.. I cannot figure out what I'm missing...
This is the stack trace portion of the disk address packet:
Code: Select all
0x000079ea: 10 00 adc %al,(%bx,%si)
0x000079ec: 01 00 add %ax,(%bx,%si)
0x000079ee: 00 7c 00 add %bh,0x0(%si)
0x000079f1: 00 00 add %al,(%bx,%si)
0x000079f3: 08 00 or %al,(%bx,%si)
0x000079f5: 00 00 add %al,(%bx,%si)
0x000079f7: 00 00 add %al,(%bx,%si)
0x000079f9: 00 a0 07 be add %ah,-0x41f9(%bx,%si)