Int 24

lup.gif ldown.gif Interrups Categories Contents

rbline.gif

DOS 1+ - CRITICAL ERROR HANDLER

Notes: Invoked when a critical (usually hardware) error is encountered by DOS (see #02543); should never be called directly. When DOS terminates a program, it copies the previous value of the INT 24 vector out of the PSP (see #01378) and into the interrupt vector table

See Also: INT 21/AH=95h - INT 21/AH=59h/BX=0000h - INT 21/AH=92h"PTS-DOS"

(Table 02543) Values critical error handler is called with:. AH = type and processing flags (see #02544). AL = drive number if AH bit 7 clear. BP:SI -> device driver header (see #01646 at INT 21/AH=52h) (BP:[SI+4] bit 15 set if character device). DI low byte contains error code if AH bit 7 set (see #02545).

STACK:
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

Return:
AL = action code (see #02546) SS,SP,DS,ES,BX,CX,DX preserved

Notes: The only DOS calls the handler may make are INT 21/AH=01h-0Ch,30h,59h. If the handler returns to the application by popping the stack, DOS will be in an unstable state until the first call with AH > 0Ch. For DOS 3.1+, IGNORE (AL=00h) is turned into FAIL (AL=03h) on network critical errors. If IGNORE specified but not allowed, it is turned into FAIL. If RETRY specified but not allowed, it is turned into FAIL. If FAIL specified but not allowed, it is turned into ABORT. (DOS 3.0+) if a critical error occurs inside the critical error handler, the DOS call is automatically failed (AL set to 03h and the INT 24 call skipped). The initial critical error handler is located in the kernel and always results in FAIL. However, by default it is replaced by the critical error handler in the command interpreter when it loads. This can be suppressed (e.g. for BBS systems) by loading the primary DOS 3.00+ COMMAND.COM shell with the undocumented option /F 'Fail'. This syntax is also supported with PTS/DOS 6.51+, S/DOS 1.0+, and DR-OpenDOS 7.02+ (1997-11-13) COMMAND.COM, as well as 4DOS.COM/NDOS.COM. OpenDOS 7.01+ COMMAND.COM (1997-03-21) introduced this under /N, which is still supported by newer releases (although it has a slightly different meaning now).

BUG: DR DOS COMMAND.COM before 1998-05-07 caused incorrect error messages to occur if the error code had a non-zero MSB (e.g. NWCDEX's "IO error reading from device" instead of the correct "not ready error"). This was fixed with the DR-OpenDOS 7.03 COMMAND.COM now passing the full error code to any critical error handlers.

Bitfields for critical error type and processing flags: Bit(s) Description (Table 02544) 7 class. =0 disk I/O error. =1 -- if block device, bad FAT image in memory -- if char device, error code in DI 6 unused 5 Ignore allowed (DOS 3.0+) 4 Retry allowed (DOS 3.0+) 3 Fail allowed (DOS 3.0+) 2-1 disk area of error. 00 = DOS area 01 = FAT. 10 = root dir 11 = data area 0 set if write, clear if read

Note: Abort is always allowed

See Also: #02545 - #02546

(Table 02545) Values for critical error code: 00h (0) write-protection violation attempted 01h (1) unknown unit for driver 02h (2) drive not ready 03h (3) unknown command given to driver 04h (4) data error (bad CRC) 05h (5) bad device driver request structure length 06h (6) seek error 07h (7) unknown media type (non-DOS disk) 08h (8) sector not found 09h (9) printer out of paper 0Ah (10) write fault 0Bh (11) read fault 0Ch (12) general failure 0Dh (13) (DOS 3.0+, "multitasking" DOS, PTS-DOS & S/DOS) sharing violation 0Eh (14) (DOS 3.0+) lock violation 0Fh (15) invalid disk change / wrong disk 10h (16) (DOS 3.0+) FCB unavailable 10h (16) uncertain media 11h (17) (DOS 3.0+) sharing buffer overflow 11h (17) character call interrupted 12h (18) (DOS 4.0+) code page mismatch 13h (19) (DOS 4.0+) out of input 14h (20) (DOS 4.0+) insufficient disk space

Note: Critical error codes 00h..0Ch are the traditional codes reported through INT 24. These code assignments are mapped to error codes 13h..1Fh reported by INT21/AH=59h (see #01680). Similarly, the DOS 3.x critical error codes 0Dh..11h are mapped to INT21/AH=59h error codes 20h..24h, however, the DOS 4.0+ critical error codes are not mapped.

BUG: Paragon Technology Systems' S/DOS 1.0 sources (a stripped down issue of PTS-DOS 6.51 with sources on CD) erroneously list DOS INT 24 error codes 12h..14h as 11h..13h, however, since the sources do not make use of these defines, this seems to be only a documentation error.

See Also: #02544 - #02546 - #01680

(Table 02546) Values for critical error handler action code: 00h ignore error and continue processing request 01h retry operation 02h terminate program as though INT 21/AH=4Ch called (INT 20h for DOS 1.x) 03h fail system call in progress (DOS 3+)

See Also: #02544 - #02546

Category: DOS Kernel - Int 24h - D

rbline.gif

lup.gif ldown.gif Interrups Categories Contents