1 DIFFERENCES AND NEW ADDITIONS
2 TO THE INT 24H HARD ERROR
3 HANDLER(s) FOR MSDOS 2.0
6 1.) Additional Constraints:
8 Under previous versions it was not explicitly stated
9 that an INT 24H handler must preserve the ES register.
10 It is now required that INT 24H handlers preserve ES.
12 When it is desired to ignore an error, the same
13 registers must be preserved as when it is desired to
14 retry the operation (SS,SP,DS,BX,CX,DX).
16 It was not clearly stated in the past, but it was
17 true, that only system calls 1-12 can be made by an INT
18 24H handler. Making any other calls will destroy the
19 DOS stack and thus its ability to retry or ignore an
22 INT 24H Handlers should always return to the DOS
23 on a retry, ignore, or abort. Failure to return to the
24 DOS will leave the DOS in an unstable state until a non
25 1-12 function call is made.
27 2.) Additional features:
29 Character device errors are now handled by the INT
30 24H mechanism. Previously only Disk I/O errors were
31 handled by the INT 24H handler. Additional information
32 is now passed to the INT 24H handler in the BP and SI
33 registers (which need not be preserved).
35 BP:SI is a DWORD pointer to the Device Header of
36 the device causing the error. Information can be gotten
37 from this header as to whether the device is a block
38 or character device, and if the device is a character
39 device the name of the device can also be obtained. The
40 DEVICE-DRIVERS document for 2.0 contains the definition
41 of this header format.
43 NOTE: AL (drive number for Disk errors) is indeterminate
44 on character device errors. Bit 7 of AH is always
45 1 for character device errors, previously bit 7 was
46 1 only in the case of a bad memory image of the FAT.
48 LIST OF INT 24H ERROR CODES PASSED IN DI
50 0 Write Protect violation
55 5 Bad Drive Request Structure length NEW
60 9 Printer out of paper NEW
65 As mentioned above BP:SI points to the device header:
68 +--------------------------------------+
69 | DWORD Pointer to next device |
70 | (-1 if last device) |
71 +--------------------------------------+
73 | Bit 15 = 1 if char device 0 if blk |
75 | Bit 0 = 1 if Current sti device |
76 | Bit 1 = 1 if Current sto output |
77 | Bit 2 = 1 if Current NUL device |
78 | Bit 3 = 1 if Current CLOCK dev |
79 | Bit 14 is the IOCTL bit (see below) |
80 | Bit 13 is the NON IBM FORMAT bit |
81 +--------------------------------------+
82 | WORD Pointer to Device strategy |
84 +--------------------------------------+
85 | WORD Pointer to Device interrupt |
87 +--------------------------------------+
88 | 8-BYTE character device name field |
89 | Character devices set a device name |
90 | For block devices the first byte is |
91 | The number of units |
92 +--------------------------------------+
94 To tell if the error occured on a block or character
95 device you must look at bit 15 in the attribute field (WORD
98 If the name of the character device is desired look at
99 the eight bytes starting at BP:SI+10.