Hi,
Since you have stated in the subject line, int 0x13, I will assume that you mean using the BIOS.
First, using
Ralf Browns Interrupt list or another reference, look at service 0x02:
Code:
AH = 02h
AL = number of sectors to read (must be nonzero)
CH = low eight bits of cylinder number
CL = sector number 1-63 (bits 0-5)
high two bits of cylinder (bits 6-7, hard disk only)
DH = head number
DL = drive number (bit 7 set for hard disk)
ES:BX -> data buffer
Please note that you can only read from a single track at a time. You must not assume that the BIOS will increment the C/H/S values and read past the End of the Track (EOT).
It is best to code your driver/boot sector/whatever to use LBA addressing and then at the "read" level, convert to CHS values. This way you can keep track of sectors as 0,1,2,3,4,5,...2879 instead of 0/0/1, 0/0/2, 0/0/3, ... 0xFF/0xFF/0xFF.
Ben
-
http://www.fysnet.net/media_storage_devices.htm