surely the bootsect is loaded and started up. but then i found it can't read following sectors correctly.
and these are all on real machine(very new).
Code: Select all
DAP:
PacketSize: db 0
Reserved: db 0
BlockCount: dw 0
BufferAddr: dd 0 ; (segment:offset)
BlockNum: dd 0
dd 0
readsectors: ;read cx sectors start at eax to edi
mov byte [PacketSize],16
mov [BlockCount],cx
mov [BufferAddr],di
shr edi,4
and di,0xf000
mov [BufferAddr+16],di
mov [BlockNum],eax
.read:
mov ah,0x42
mov dl,[BS_DrvNum]
mov di,DAP ;maybe mov si,DAP?
int 0x13
jc fail
ret
fail:
mov si,MSGDSKERR
call printf
jmp $
second, i thought it should be mov si,DAP(a document metioned mostly DI,but one key place is SI)., but strange on and off on screen when i use it
third, does the SEG:OFF mean the lower 16 bits is offset and the higher segment?(i think and did so)
least possibility, BlockNum = 0 means the bootsect, and the bonduary is 64k not 32k,right?
thanks,
lemonyii