Announcement
Collapse
No announcement yet.
LBA addressing
Collapse
X
-
Guest replied
1. Check if LBA i/o is supported
TYPE int48buffer
size AS WORD
flags AS WORD
cylinders AS DWORD
heads AS DWORD
sectorspertrack AS DWORD
totalsectors AS QUAD
bytespersector as WORD
END TYPE
int48buffer.size=1Eh
call int 13h, ah=48h
dl=BIOS drive number
ds:si=segment/offset of buffer
if carry clear, then LBA is supported and the buffer will be
filled in. You can ignore everything except the totalsectors
(which is the total number of sectors on the disk).
In some cases the total sectors returned will reflect the BIOS
address limit rather than the actual size of the disk.
If you want CHS parameters use int 13h, ah=8 to get the correct
cylinder and head counts. The only reason you would need CHS
values would be to calculate LBAs for cylinder boundries.
2. to read the disk
TYPE LBApacket
size AS BYTE
reserved AS BYTE
transfer AS WORD
buffoff AS WORD
buffseg AS WORD
LBA AS QUAD
END TYPE
Fill in the LBApacket buffer and call int 13h, ah=42h
LBApacket.size=1Eh
LBApacket.reserved=0
LBAPacket.transfer=number of sectors to read
buffoff/buffseg are offset & segment of the buffer the sectors
are read to.
LBA is the LBA address of the first sector to read.
dl=BIOS drive number
ds:si = segment/offset of LBApacket buffer.
More details can be found in Ralf Brown's Interrupt List.
Bob
------------------
-
LBA addressing
Does anyone have any examples of int13 LBA addressing? My specific
problem is the "disk address packet". I've read a lot of material
concerning this but can't make hide-ner-hare of this. Thanks.
------------------
Tags: None
Leave a comment: