00 h-disk system reset 0eh-read sector Buffer
01 H-read disk system status 0fh-write sector Buffer
02 h-read sector 10 h-read drive status
03 h-write Sector 11 h-calibration drive
04 H-test slice 12 h-controller Ram Diagnosis
05 h-formatted track 13 H-controller driver Diagnosis
06 h-format Bad Track 14 h-Internal Controller Diagnosis
07 h-formatting drive 15 h-read Disk Type
08 h-read drive parameters 16 h-read disk change status
09 h-Initialize hard disk parameter 17 h-set Disk Type
0ah-read long fan Area 18 h-set the formatting media type
0bh-write long fan Area 19 h-head protection
0ch-search 1ah-format ESDI drive
0dh-hard disk system reset
(1) 00 h Functions
Function Description: reset the disk system.
Entry parameter: Ah = 00 h
DL = drive, 00h ~ 7fh: floppy disk; 80 h ~ 0ffh: Hard Disk
Exit parameter: cf = 0 -- operation succeeded, Ah = 00 H. Otherwise, Ah = Status Code. For details, see description in feature no. 01h.
(2) function 01 H
Function Description: reads the disk system status.
Entry parameter: Ah = 01 H
DL = drive, 00h ~ 7fh: floppy disk; 80 h ~ 0ffh: Hard Disk
Exit parameters: Ah = 00 h, Al = status code, which is defined as follows:
00 h-no error 01 H-invalid command
02 h-address target No 03 h-disk write protection (floppy disk) found)
04 H-sector No 05 h-Reset failed (hard disk)
06 h-floppy disk removal (floppy disk) 07 h-Incorrect Parameter table (hard disk)
08 h-DMA out-of-bounds (floppy disk) 09 h-DMA exceeds 64 K limit
0ah-incorrect sector logo (hard disk) 0bh-Incorrect track logo (hard disk)
0ch-no media type found (floppy disk) 0dh-illegal fan ID during formatting (hard disk)
0eh-data address control target found (hard disk) 0fh-DMA arbitration out-of-bounds (hard disk)
10 h-Incorrect CRC or ECC Code 11 h-ECC correction data error (hard disk)
20 h-controller failure 40 h-search failure
80 h-disk timeout (not responding) Aah-drive not ready (hard disk)
Bbh-undefined error (hard disk) CCH-write error (hard disk)
E0h-status register error (hard disk) FFH-detection operation failed (hard disk)
(3) function 02 h
Function Description: Read sector
Entry parameter: Ah = 02 h
Al = number of sectors
Ch = cylindrical
CL = sector
DH = head
DL = drive, 00h ~ 7fh: floppy disk; 80 h ~ 0ffh: Hard Disk
ES: BX = buffer address
Exit parameter: cf = 0 -- operation successful, Ah = 00 h, Al = number of transmitted sectors; otherwise, Ah = Status Code. For details, see description in feature no. 01h.
(4) 03 h Functions
Function Description: Write sector
Entry parameter: Ah = 03 h
Al = number of sectors
Ch = cylindrical
CL = sector
DH = head
DL = drive, 00h ~ 7fh: floppy disk; 80 h ~ 0ffh: Hard Disk
ES: BX = buffer address
Exit parameter: cf = 0 -- operation successful, Ah = 00 h, Al = number of transmitted sectors; otherwise, Ah = Status Code. For details, see description in feature no. 01h.
(5) function 04 H
Function Description: checks the slice.
Entry parameter: Ah = 04 H
Al = number of sectors
Ch = cylindrical
CL = sector
DH = head
DL = drive, 00h ~ 7fh: floppy disk; 80 h ~ 0ffh: Hard Disk
ES: BX = buffer address
Exit parameter: cf = 0 -- operation successful, Ah = 00 h, Al = number of tested sectors; otherwise, Ah = Status Code. For details, see description in feature no. 01h.
(6) function 05 h
Function Description: format the track.
Entry parameter: Ah = 05 h
Al = interleave)
Ch = cylindrical
DH = head
DL = drive, 00h ~ 7fh: floppy disk; 80 h ~ 0ffh: Hard Disk
ES: BX = address of the address field list
Exit parameter: cf = 0 -- operation succeeded, Ah = 00 H. Otherwise, Ah = Status Code. For details, see description in feature no. 01h.
(7) 06 h Functions
Function Description: format the bad track.
Entry parameter: Ah = 06 h
Al = Alternate
Ch = cylindrical
DH = head
DL = 80 h ~ 0ffh: Hard Disk
ES: BX = address of the address field list
Exit parameter: cf = 0 -- operation succeeded, Ah = 00 H. Otherwise, Ah = Status Code. For details, see description in feature no. 01h.
(8) function 07 h
Function Description: format the drive.
Entry parameter: Ah = 07 h
Al = Alternate
Ch = cylindrical
DL = 80 h ~ 0ffh: Hard Disk
Exit parameter: cf = 0 -- operation succeeded, Ah = 00 H. Otherwise, Ah = Status Code. For details, see description in feature no. 01h.
(9) function 08 h
Function Description: Read drive parameters.
Entry parameter: Ah = 08 h
DL = drive, 00h ~ 7fh: floppy disk; 80 h ~ 0ffh: Hard Disk
Exit parameter: cf = 1 -- operation failed, Ah = Status Code. For details, see description in feature no. 01h. Otherwise, BL = 01 H-360 K
= 02 h-1.2 m
= 03 h-720 K
= 04 H-1.44 m
Ch = 8-bit lower number of cylinders
CL bits 7-6 = This 2 bits of the Number of cylinders
CL bits 5-0 = number of sectors
DH = number of Magnetic Heads
DL = number of drives
ES: di = address of the disk drive parameter table
(10) function 09 h
Function Description: Initialize hard disk parameters.
Entry parameter: Ah = 09 h
DL = 80 h ~ 0ffh: Hard Disk (for more information about the parameter table, see here)
Exit parameter: cf = 0 -- operation succeeded, Ah = 00 H. Otherwise, Ah = Status Code. For details, see description in feature no. 01h.
(11) function 0ah
Function Description: Read the long fan area. Each slice is encoded with four bytes of ECC.
Entry parameter: Ah = 0ah
Al = number of sectors
Ch = cylindrical
CL = sector
DH = head
DL = 80 h ~ 0ffh: Hard Disk
ES: BX = buffer address
Exit parameter: cf = 0 -- operation successful, Ah = 00 h, Al = number of transmitted sectors; otherwise, Ah = Status Code. For details, see description in feature no. 01h.
(12) function 0bh
Function Description: Write the long fan area. Each slice is encoded with four bytes of ECC.
Entry parameter: Ah = 0bh
Al = number of sectors
Ch = cylindrical
CL = sector
DH = head
DL = 80 h ~ 0ffh: Hard Disk
ES: BX = buffer address
Exit parameter: cf = 0 -- operation successful, Ah = 00 h, Al = number of transmitted sectors; otherwise, Ah = Status Code. For details, see description in feature no. 01h.
(13). Functions 0ch
Function Description: Search
Entry parameter: Ah = 0ch
Ch = low 8-bit cylindrical
CL (7-6 bits) = the height of the cylinder 2 bits
DH = head
DL = 80 h ~ 0ffh: Hard Disk
Exit parameter: cf = 0 -- operation succeeded, Ah = 00 H. Otherwise, Ah = Status Code. For details, see description in feature no. 01h.
(14) function 0dh
Function Description: Hard Disk system reset
Entry parameter: Ah = 0dh
DL = 80 h ~ 0ffh: Hard Disk
Exit parameter: cf = 0 -- operation succeeded, Ah = 00 H. Otherwise, Ah = Status Code. For details, see description in feature no. 01h.
(15) function 0eh
Function Description: Read sector buffer.
Entry parameter: Ah = 0eh
ES: BX = buffer address
Exit parameter: cf = 0 -- operation succeeded; otherwise, Ah = Status Code. For details, see description in feature no. 01h.
(16) function 0fh
Function Description: Write a sector buffer.
Entry parameter: Ah = 0fh
ES: BX = buffer address
Exit parameter: cf = 0 -- operation succeeded; otherwise, Ah = Status Code. For details, see description in feature no. 01h.
(17) function 10 h
Function Description: Read the drive status.
Entry parameter: Ah = 10 h
DL = 80 h ~ 0ffh: Hard Disk
Exit parameter: cf = 0 -- operation succeeded, Ah = 00 H. Otherwise, Ah = Status Code. For details, see description in feature no. 01h.
(18) function 11 h
Function Description: Calibrate the drive.
Entry parameter: Ah = 11 h
DL = 80 h ~ 0ffh: Hard Disk
Exit parameter: cf = 0 -- operation succeeded, Ah = 00 H. Otherwise, Ah = Status Code. For details, see description in feature no. 01h.
(19) 12 h Functions
Function Description: controller Ram diagnostics
Entry parameter: Ah = 12 h
Exit parameter: cf = 0 -- operation succeeded; otherwise, Ah = Status Code. For details, see description in feature no. 01h.
(20) function 13 H
Function Description: controller-driven Diagnosis
Entry parameter: Ah = 13 H
Exit parameter: cf = 0 -- operation succeeded; otherwise, Ah = Status Code. For details, see description in feature no. 01h.
(21) function 14 h
Function Description: internal diagnostics of the controller.
Entry parameter: Ah = 14 h
Exit parameter: cf = 0 -- operation succeeded; otherwise, Ah = Status Code. For details, see description in feature no. 01h.
(22) function 15 h
Function Description: Read disk type.
Entry parameter: Ah = 15 h
DL = drive, 00h ~ 7fh: floppy disk; 80 h ~ 0ffh: Hard Disk
Exit parameter: cf = 1 -- operation failed, Ah = status code, see description in feature no. 01h; otherwise, Ah = 00 h-drive Not Installed
= 01 H-floppy disk drive supported by no change Wire
= 02 h-floppy disk drive with change line Supported
= 03 h-hard disk, CX: dx = 512 bytes of slice
(23) function 16 h
Function Description: Read the disk status changes.
Entry parameter: Ah = 16 h
DL = 00h ~ 7fh: floppy disk
Export parameter: cf = 0 -- the disk has not changed, Ah = 00 H. Otherwise, Ah = 06 h. For details, see description in feature no. 01h.
(24) function 17 h
Function Description: sets the disk type.
Entry parameter: Ah = 17 h
DL = 00h ~ 7fh: floppy disk Al = 00 h-unused
= 01 H-360k in 360k drive
= 02 h-360k in the 1.2m drive
= 03 h-1.2m in the 1.2m drive
= 04 H-720k in the 720k drive
Exit parameter: cf = 0 -- operation succeeded, Ah = 00 H. Otherwise, Ah = Status Code. For details, see description in feature no. 01h.
(25) functions 18 h
Function Description: sets the formatting media type.
Entry parameter: Ah = 18 h
Ch = Number of cylinders
CL = number of sectors per track
DL = 00h ~ 7fh: floppy disk
Exit parameter: cf = 0 -- operation successful, Ah = 00 h, ES: di = media type parameter table address; otherwise, Ah = Status Code. For details, see description in feature no. 01h.
(26) function 19 h
Function Description: Head protection, which is only valid in PS/2.
(27). Function 1ah
Function Description: format the ESDI drive, which is only valid in PS/2.