INT 13H services return with the Carry Flag set (CF=CY=1) when the
requested service failed and it places one of the following error codes
in AH.  These are also the values returned when disk status is requested
(INT 13H 00H) and can be found at 0040:0041 (diskette errors) and
0040:0074 (hard disk errors) in the BIOS Data Area.

Note: On any error, you should reset with subfn 00H and retry 3 times.

  Diskette I/O Errors  
These errors may be returned when DL < 81H (i.e., on diskette service
requests).

Err#  Error/status Description
                                                                         
00H  no error on last operation
01H  bad command: invalid request to controller
02H  bad address mark
03H  write protect: attempted to write on write-protected diskette
04H  sector ID bad or not found

06H  diskette change line is active

08H  DMA failure
09H  DMA overrun: attempted to write across a 64K-byte boundary.

0cH  Media type not available
10H  bad CRC: Cyclical Redundancy Code does not agree with data
20H  diskette controller failure
40H  bad seek; requested track not found
80H  time-out

  Hard Disk I/O Errors  
These errors may be returned when DL > 7fH (i.e., on hard disk service
requests).

Err#  Error/status Description
                                                                         
00H  no error on last operation
01H  bad command: invalid request to controller
02H  bad address mark
03H  write protect: attempted to write on write-protected diskette
04H  sector ID bad or not found
05H  reset failed

07H  drive parameter activity failed
08H  DMA failure
09H  DMA overrun: attempted to write across a 64K-byte boundary.
0aH  bad sector flag detected
0bH  bad cylinder detected

0dH  invalid umber of sectors in format
0eH  control data address mark detected
0fH  DMA arbitration level out of range
10H  uncorrectable ECC or CRC
11H  ECC corrected data error
20H  hard disk controller failure
40H  bad seek; requested track not found
80H  time-out
aaH  drive not ready
bbH  undefined error
ccH  write fault on selected drive
e0H  status error/error register 0
ffH  sense operation failed

- -

BIOS Disk Error Codes