Page 1 of 1
Reading a LBA 28-bit sector with the int 13h extensions
Posted: Tue Nov 01, 2022 1:46 pm
by Maqstcharub
I need to read a sector using LBA 28-bit in the BIOS and i've read (here:
https://wiki.osdev.org/Disk_access_usin ... ended_Mode) that you can do that thanks to the "int 13h Extensions" with the function 0x42 but i need to set up a "Disk Address Packet Structure" but the article assumes that the address is 48-bit.
Is there a way to use the 28-bit counterpart?
Thanks in advance
Re: Reading a LBA 28-bit sector with the int 13h extensions
Posted: Tue Nov 01, 2022 2:18 pm
by Octocontrabass
The article is wrong. The LBA in the disk address packet is always 64 bits, not 48 bits.
You don't need to specify 28-bit LBA. The BIOS is smart enough to figure that out on its own.
Re: Reading a LBA 28-bit sector with the int 13h extensions
Posted: Tue Nov 01, 2022 2:39 pm
by Maqstcharub
Octocontrabass wrote:The article is wrong. The LBA in the disk address packet is always 64 bits, not 48 bits.
You don't need to specify 28-bit LBA. The BIOS is smart enough to figure that out on its own.
so, if i understand correctly, i have to use only the lower 32-bits in the DAP obliterating the last entry: the upper 16-bits
Re: Reading a LBA 28-bit sector with the int 13h extensions
Posted: Tue Nov 01, 2022 4:08 pm
by Octocontrabass
Yep, if you want 28-bit LBA use only the lower 28 bits and set the remaining 36 bits to zero.