INT 25h (37) Absolute Disk Read
Reads one or more sectors on a specified logical disk.
On entry: AL Drive number (0=A, 1=B)
CX Number of sectors to read
DX Starting sector number
DS:DX Buffer to store sector read
Returns: AX Error code (if CF is set; see below)
Flags DOS leaves the flags on the stack
--------------------------------------------------------------------------
This DOS service (and its write counterpart, Interrupt 26h) is
comparable to service provided by the ROM-BIOS in Interrupt 13h,
except for these two differences:
1. DOS numbers disk sectors sequentially, starting at cylinder 0,
head 0, sector 1. The BIOS service identifies sectors by three
separate coordinates--cylinder, head, and sector). The following
formula converts BIOS-numbered sectors to the DOS format:
DOS.Sector.Number = (BIOS.Sector-1) + BIOS.Head * Sectors.per.Head +
BIOS.Cylinder * Sectors.per.Head * Heads.per.Disk
2. DOS works with logical drives, while the BIOS works with physical
drives only. That means that the DOS interrupt can be used to
read a phantom drive B, a RAM drive, or a logical drive that has
been mapped to a nondefault physical drive via the ASSIGN
command.
Error information is reported in AX as follows:
Error code in AH:
01h Invalid command
02h Address mark not found
03h Attempt to write on write-protected diskette
04h Sector not found
05h Reset failure
07h Drive parameter activity failure
08h DMA overrun
09h DMA boundary error
10h CRC or ECC data error
11h Possible error corrected by ECC (AL contains
burst length)
20h Controller failure
40h Bad seek
80h Drive timeout
BBh Undefined error
FFh Sense operation failure
Error code in AL:
00h Write-protect error
01h Invalid drive number
02h Drive not ready
03h Invalid command
04h CRC error
05h Bad request structure length
06h Seek error
07h Unknown medium; disk format not recognized
08h Sector not found
09h Printer out of paper
0Ah Write error
0Bh Read error
0Ch General, nonspecific error
Note that the AH error information is the same as that returned in AH
by Interrupt 13h, Service 2, and the AL error information is the same
returned in DL in response to a critical error (Interrupt 24h).
Following a call to Interrupt 25h, DOS leaves one word (the flag
contents at the time the interrupt was invoked) on the stack. You
should POP this word to prevent stack growth.
Seealso:
This page last updated on Fri Nov 30 10:49:50 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster