invoked when a critical (usually hardware) error is encountered; should never be called directly
Critical Error Handler is invoked with those resgisters as parameters:
bit | Dos | type and processing flags |
---|---|---|
7 | 0 : disk I/O error 1 : if block device, bad FAT image in memory if char device, error code in DI |
|
6 | unused | |
5 | 3+ | 1 if Ignore allowed, 0 if not |
4 | 3+ | 1 if Retry allowed, 0 if not |
3 | 3+ | 1 if Fail allowed, 0 if not |
2 | disk area of error 00 = DOS area 01 = FAT 10 = root dir 11 = data area |
|
1 | ||
0 | 1 if write, 0 if read |
Drive number if AH bit 7 clear
Pointer to device driver header (BP:[SI+4] bit 15 set if char device)
DI value | Dos version | low byte contains error code if AH bit 7 set |
---|---|---|
00h | write-protection violation attempted | |
01h | unknown unit for driver | |
02h | drive not ready | |
03h | unknown command given to driver | |
04h | data error (bad CRC) | |
05h | bad device driver request structure length | |
06h | seek error | |
07h | unknown media type | |
08h | sector not found | |
09h | printer out of paper | |
0Ah | write fault | |
0Bh | read fault | |
0Ch | general failure | |
0Dh | 3+ | sharing violation |
0Eh | 3+ | violation |
0Fh | invalid disk change | |
10h | 3+ | FCB unavailable |
11h | 3+ | sharing buffer overflow |
12h | 4+ | code page mismatch |
13h | 4+ | out of input |
14h | 4+ | insufficient disk space |
Size | Meaning |
---|---|
DWORD | return address for INT 24 call |
WORD | flags pushed by INT 24 |
WORD | original AX on entry to INT 21 |
WORD | BX |
WORD | CX |
WORD | DX |
WORD | SI |
WORD | DI |
WORD | BP |
WORD | DS |
WORD | ES |
DWORD | return address for INT 21 call |
WORD | flags pushed by INT 21 |
Handler must return:
AL | meaning |
---|---|
00h | ignore error and continue processing request |
01h | retry operation |
02h | terminate program through the equivalent of INT 21h,4Ch (INT 20h for DOS 1.x) |
03h | fail system call in progress |
SS,SP,DS,ES,BX,CX,DX preserved
for DOS 3.1+, IGNORE (AL=00h) is turned into FAIL (AL=03h) on network critical errors