In both of these functions, the data is read into and written from buffer at 512 bytes per sector that is the logical size of sector of a hard disk and the value returned by both functions is the value of the AX register set by the INT 0x13H BIOS call.
If the function is successful, High byte = 0, that means the successful completion and low byte contains the number of sectors read, written or verified and so on.
But if there is any error and function is not successful, the value of High byte will be one of the following error codes which are described in the following table:
Value |
Description |
0x00 |
Successful completion (Not an Error!!) |
0x01 |
Bad command |
0x02 |
Address mark not found |
0x03 |
Attempt to write to write-protected disk |
0x04 |
Sector not found |
0x05 |
Reset failed (hard disk) |
0x06 |
Disk changed since last operation |
0x07 |
Drive parameter activity failed |
0x08 |
Direct memory access (DMA) overrun |
0x09 |
Attempt to perform DMA across 64K boundary
(data Boundary error or >80H sectors) |
0x0A |
Bad sector detected |
0x0B |
Bad track detected |
0x0C |
Unsupported track |
0x0D |
Invalid number of sectors on format (PS/2 hard disk) |
0x0E |
Control data address mark detected (hard disk) |
0x0F |
DMA arbitration level out of range (hard disk) |
0x10 |
Bad CRC/ECC on disk read |
0x11 |
CRC/ECC corrected data error (Not an error actually) |
0x20 |
Controller has failed |
0x31 |
No media in drive (IBM/MS INT 13 extensions) |
0x32 |
Incorrect drive type stored in CMOS (Compaq) |
|