Int 13H [PC] [AT] [PS/2] Function 02H Read sector

Reads one or more sectors from disk into memory.

Call with:

AH = 02H

AL = number of sectors

CH = cylinder

CL = sector

DH = head

DL = drive

00H—7FH floppy disk

80H—FFH fixed disk

ES:BX = segment:offset of buffer

Returns:

If function successful

Carry flag = clear

AH = 00H

AL = number of sectors transferred

If function unsuccessful

Carry flag = set

AH = status (see Int 13H Function 01H)

Notes:

On fixed disks, the upper 2 bits of the 10-bit cylinder number are placed in the upper 2 bits of register CL.

On fixed disks, error code 11H indicates that a read error occurred that was corrected by the ECC algorithm; in this event, register AL contains the burst length. The data returned is probably good, although there is a small chance that the data was not corrected properly. If a multi-sector transfer was requested, the operation was terminated after the sector containing the read error.

On floppy disk drives, an error may result from the drive motor being off at the time of the request. The ROM BIOS does not automatically wait for the drive to come up to speed before attempting the read operation. The requesting program should reset the floppy disk system (Int 13H Function 00H) and retry the operation three times before assuming that the error results from some other cause.