Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I have problems with int 0x13, function 0x42.
It should read a sector from the disk. (using lba)
The only output which is right is sector 0.
Does anyone know what the problem might be?
offtopic: this program is located in the bootblock, it gets loaded by lilo.. there is more code but this is the part not working
lbaadr:
dw 0x0010 ; 2byte, reserved - size of packet.
dw 0x0001 ; WORD 2bytes nr of blocks read.
dw 0x00002000 ; DWORD 4bytes Transfer buffer
; dd 0x0000000034009605 ; QWORD 4bytes,32bit LBA address
dd 0x0000000000000000
The simplest thing I can see wrong here is that your comments do not match your code. Seeing you want the packet size to be 0x10, you would need a dw, another dw, a dd and a dq respectively. You have 3 dw's and a dd.
Hmmm it seems not to work right...
Reading sector 0,1 and 2 works fine.
When I read sector 10 it shows me empty data.
I wrote a small textfile (+/- 16bytes) to sector 9/10 and 11 using dd as root.
(which does not matter since lilo is only in the first sector of the disk and my first partition starts at sector 63)
But it shows me an empty data.
lbaadr:
db 10h ; packet size (16 bytes)
db 0 ; reserved, must be 0
db 1 ; number of sectors to transfer
db 0 ; reserved, must be 0
dw 2000h ; Buffer's segment
dw 0000h ; Buffer's offset
dq 0000000034009605h ; 64-bit starting sector number