Dec 152017
ASM and C routines to bypass and improve upon DOS’s “Abort, Retry, Fail” error handler. | |||
---|---|---|---|
File Name | File Size | Zip Size | Zip Type |
CE.ASM | 6747 | 1559 | deflated |
CE.H | 747 | 354 | deflated |
DEMO.C | 4242 | 1467 | deflated |
TABLES.TXT | 1455 | 598 | deflated |
Download File ERRHNDLR.ZIP Here
Contents of the TABLES.TXT file
Table 1. Stack Contents on Entry to Critical Error Handler
SP Offset
+00h IP DOS return address and flags
+02h CS an IRET from here will go to DOS
+04h flags
+06h AX your applications registers
+08h BX
+0ah CX
+0ch DX
+0eh SI
+10h DI
+12h BP
+14h DS
+16h ES
+18h IP your application return address
+1ah CS
+1ch flags
Table 2. Error Codes in DI
0 Write-protected disk
1 Unknown unit (invalid drive number)
2 Drive not ready (door open or no disk)
3 Unknown command (request not supported by device driver)
4 CRC error
5 Bad request structure length
6 Seek error (could not access requested track)
7 Unknown media (unrecognized disk format)
8 Sector not found
9 Printer out of paper
10 Device write error
11 Device read error
12 General error
Table 3. Disk Error Operation and Area Data in AH
AH Bits
2 1 0
x x 0 Read Operation
x x 1 Write Operation
0 0 x Error occurred in DOS system file area
0 1 x Error occurred in FAT area
1 0 x Error occurred in Directory area
1 1 x Error occurred in Data area
SP Offset
+00h IP DOS return address and flags
+02h CS an IRET from here will go to DOS
+04h flags
+06h AX your applications registers
+08h BX
+0ah CX
+0ch DX
+0eh SI
+10h DI
+12h BP
+14h DS
+16h ES
+18h IP your application return address
+1ah CS
+1ch flags
Table 2. Error Codes in DI
0 Write-protected disk
1 Unknown unit (invalid drive number)
2 Drive not ready (door open or no disk)
3 Unknown command (request not supported by device driver)
4 CRC error
5 Bad request structure length
6 Seek error (could not access requested track)
7 Unknown media (unrecognized disk format)
8 Sector not found
9 Printer out of paper
10 Device write error
11 Device read error
12 General error
Table 3. Disk Error Operation and Area Data in AH
AH Bits
2 1 0
x x 0 Read Operation
x x 1 Write Operation
0 0 x Error occurred in DOS system file area
0 1 x Error occurred in FAT area
1 0 x Error occurred in Directory area
1 1 x Error occurred in Data area
December 15, 2017
Add comments