Hard Disk Int13h Operations

Int13h functions provide low level disk input / output capability. Since disk systems usually funnel all i/o operations through these functions, many add-on and three-part products hook into then and relocate the original functions to other vectors.
One of the most popular methods data recovery companies use to reset hard drives and get them out of error states is to issue a 'reset disk' command via the int13h interrupt.
You can try this yourself - grab yourself an assembler and program the registers as follows before issuing the int13h command.

Interrupt 13h - Function 00h
Reset Disk System

Purpose: Restores disk system conditions to power-up state.

Registers at call:
AH=00h
DL=drive (if bit 7 is set both hard disks and floppy disks are reset)
Details: Forces controller to recalibrate drive heads (seek to track 0)

Return Registers:
AH=status

00h successful completion
01h invalid function in AH or invalid parameter
02h address mark not found
03h disk write protected (floppy)
04h sector not found
05h reset failed (hard disk)
06h disk changed (floppy)
07h drive parameter activity failed (hard disk)
08h DMA overrun
09h attempted DMA across 64k boundary
0Ah bad sector detected (hard disk)
0Bh bad track detected (hard disk)
0Ch unsupported track or invalid media
0Dh invalid number of sectors on format (hard disk)
0Eh control data address mark detected (hard disk)
0Fh DMA arbitration level out of range (hard disk)
10h uncorrectable CRC or ECC error on read
11h data ECC corrected (hard disk)
20h Controller failure
40h Seek failed
80h Timeout (not ready)
AAh Drive not ready (hard disk)
BBh Undefined error (hard disk)
CCh Write fault (hard disk)
E0h Status register error (hard disk)
FFh Sense operation failed (hard disk)