Note: This API call is for DOS and Win16 personality only. Use Family API for portability.

Int 21H, AH=59H

Version

3 and higher

Brief

GET EXTENDED ERROR INFORMATION

Family API

Input

AH = 59h
BX = 0000h

Return

AX = extended error code (see #01680)
BH = error class (see #01682)
BL = recommended action (see #01683)
CH = error locus (see #01684)
ES:DI may be pointer (see #01681, #01680)
CL, DX, SI, BP, and DS destroyed

Notes

Notes: functions available under DOS 2.x map the true DOS 3.0+ error code into

one supported under DOS 2.x
you should call this function to retrieve the true error code when an
FCB or DOS 2.x call returns an error
under DR DOS 5.0, this function does not use any of the DOS-internal
stacks and may thus be called at any time

(Table 01680) Values for DOS extended error code: —DOS 2.0+ — 00h (0) no error 01h (1) function number invalid 02h (2) file not found 03h (3) path not found 04h (4) too many open files (no handles available) 05h (5) access denied 06h (6) invalid handle 07h (7) memory control block destroyed 08h (8) insufficient memory 09h (9) memory block address invalid 0Ah (10) environment invalid (usually >32K in length) 0Bh (11) format invalid 0Ch (12) access code invalid 0Dh (13) data invalid 0Eh (14) reserved 0Eh (14) (PTS-DOS 6.51+, S/DOS 1.0+) fixup overflow 0Fh (15) invalid drive 10h (16) attempted to remove current directory 11h (17) not same device 12h (18) no more files —DOS 3.0+ (INT 24 errors)— 13h (19) disk write-protected 14h (20) unknown unit 15h (21) drive not ready 16h (22) unknown command 17h (23) data error (CRC) 18h (24) bad request structure length 19h (25) seek error 1Ah (26) unknown media type (non-DOS disk) 1Bh (27) sector not found 1Ch (28) printer out of paper 1Dh (29) write fault 1Eh (30) read fault 1Fh (31) general failure 20h (32) sharing violation 21h (33) lock violation 22h (34) disk change invalid (ES:DI → media ID structure)(see #01681) 23h (35) FCB unavailable 23h (35) (PTS-DOS 6.51+, S/DOS 1.0+) bad FAT 24h (36) sharing buffer overflow 25h (37) (DOS 4.0+) code page mismatch 26h (38) (DOS 4.0+) cannot complete file operation (EOF / out of input) 27h (39) (DOS 4.0+) insufficient disk space 28h-31h reserved —OEM network errors (INT 24)— 32h (50) network request not supported 33h (51) remote computer not listening 34h (52) duplicate name on network 35h (53) network name not found 36h (54) network busy 37h (55) network device no longer exists 38h (56) network BIOS command limit exceeded 39h (57) network adapter hardware error 3Ah (58) incorrect response from network 3Bh (59) unexpected network error 3Ch (60) incompatible remote adapter 3Dh (61) print queue full 3Eh (62) queue not full 3Fh (63) not enough space to print file 40h (64) network name was deleted 41h (65) network: Access denied

(DOS 3.0+ [maybe 3.3+???]) codepage switching not possible
(see also INT 21/AX=6602h,INT 2F/AX=AD42h)

42h (66) network device type incorrect 43h (67) network name not found 44h (68) network name limit exceeded 45h (69) network BIOS session limit exceeded 46h (70) temporarily paused 47h (71) network request not accepted 48h (72) network print/disk redirection paused 49h (73) network software not installed

(LANtastic) invalid network version

4Ah (74) unexpected adapter close

(LANtastic) account expired

4Bh (75) (LANtastic) password expired 4Ch (76) (LANtastic) login attempt invalid at this time 4Dh (77) (LANtastic v3+) disk limit exceeded on network node 4Eh (78) (LANtastic v3+) not logged in to network node 4Fh (79) reserved —end of errors reportable via INT 24— 50h (80) file exists 51h (81) (undoc) duplicated FCB 52h (82) cannot make directory 53h (83) fail on INT 24h —network-related errors (non-INT 24)— 54h (84) (DOS 3.3+) too many redirections / out of structures 55h (85) (DOS 3.3+) duplicate redirection / already assigned 56h (86) (DOS 3.3+) invalid password 57h (87) (DOS 3.3+) invalid parameter 58h (88) (DOS 3.3+) network write fault 59h (89) (DOS 4.0+) function not supported on network / no process slots

available

5Ah (90) (DOS 4.0+) required system component not installed / not frozen 5Bh (91) (DOS 4.0+,NetWare4) timer server table overflowed 5Ch (92) (DOS 4.0+,NetWare4) duplicate in timer service table 5Dh (93) (DOS 4.0+,NetWare4) no items to work on 5Fh (95) (DOS 4.0+,NetWare4) interrupted / invalid system call 64h (100) (MSCDEX) unknown error 64h (100) (DOS 4.0+,NetWare4) open semaphore limit exceeded 65h (101) (MSCDEX) not ready 65h (101) (DOS 4.0+,NetWare4) exclusive semaphore is already owned 66h (102) (MSCDEX) EMS memory no longer valid 66h (102) (DOS 4.0+,NetWare4) semaphore was set when close attempted 67h (103) (MSCDEX) not High Sierra or ISO-9660 format 67h (103) (DOS 4.0+,NetWare4) too many exclusive semaphore requests 68h (104) (MSCDEX) door open 68h (104) (DOS 4.0+,NetWare4) operation invalid from interrupt handler 69h (105) (DOS 4.0+,NetWare4) semaphore owner died 6Ah (106) (DOS 4.0+,NetWare4) semaphore limit exceeded 6Bh (107) (DOS 4.0+,NetWare4) insert drive B: disk into A: / disk changed 6Ch (108) (DOS 4.0+,NetWare4) drive locked by another process 6Dh (109) (DOS 4.0+,NetWare4) broken pipe 6Eh (110) (DOS 5.0+,NetWare4) pipe open/create failed 6Fh (111) (DOS 5.0+,NetWare4) pipe buffer overflowed 70h (112) (DOS 5.0+,NetWare4) disk full 71h (113) (DOS 5.0+,NetWare4) no more search handles 72h (114) (DOS 5.0+,NetWare4) invalid target handle for dup2 73h (115) (DOS 5.0+,NetWare4) bad user virtual address / protection violation 74h (116) (DOS 5.0+) VIOKBD request 74h (116) (NetWare4) error on console I/O 75h (117) (DOS 5.0+,NetWare4) unknown category code for IOCTL 76h (118) (DOS 5.0+,NetWare4) invalid value for verify flag 77h (119) (DOS 5.0+,NetWare4) level four driver not found by DOS IOCTL 78h (120) (DOS 5.0+,NetWare4) invalid / unimplemented function number 79h (121) (DOS 5.0+,NetWare4) semaphore timeout 7Ah (122) (DOS 5.0+,NetWare4) buffer too small to hold return data 7Bh (123) (DOS 5.0+,NetWare4) invalid character or bad file-system name 7Ch (124) (DOS 5.0+,NetWare4) unimplemented information level 7Dh (125) (DOS 5.0+,NetWare4) no volume label found 7Eh (126) (DOS 5.0+,NetWare4) module handle not found 7Fh (127) (DOS 5.0+,NetWare4) procedure address not found 80h (128) (DOS 5.0+,NetWare4) CWait found no children 81h (129) (DOS 5.0+,NetWare4) CWait children still running 82h (130) (DOS 5.0+,NetWare4) invalid operation for direct disk-access handle 83h (131) (DOS 5.0+,NetWare4) attempted seek to negative offset 84h (132) (DOS 5.0+,NetWare4) attempted to seek on device or pipe —JOIN/SUBST errors— 85h (133) (DOS 5.0+,NetWare4) drive already has JOINed drives 86h (134) (DOS 5.0+,NetWare4) drive is already JOINed 87h (135) (DOS 5.0+,NetWare4) drive is already SUBSTed 88h (136) (DOS 5.0+,NetWare4) can not delete drive which is not JOINed 89h (137) (DOS 5.0+,NetWare4) can not delete drive which is not SUBSTed 8Ah (138) (DOS 5.0+,NetWare4) can not JOIN to a JOINed drive 8Bh (139) (DOS 5.0+,NetWare4) can not SUBST to a SUBSTed drive 8Ch (140) (DOS 5.0+,NetWare4) can not JOIN to a SUBSTed drive 8Dh (141) (DOS 5.0+,NetWare4) can not SUBST to a JOINed drive 8Eh (142) (DOS 5.0+,NetWare4) drive is busy 8Fh (143) (DOS 5.0+,NetWare4) can not JOIN/SUBST to same drive 90h (144) (DOS 5.0+,NetWare4) directory must not be root directory 91h (145) (DOS 5.0+,NetWare4) can only JOIN to empty directory 92h (146) (DOS 5.0+,NetWare4) path is already in use for SUBST 93h (147) (DOS 5.0+,NetWare4) path is already in use for JOIN 94h (148) (DOS 5.0+,NetWare4) path is in use by another process 95h (149) (DOS 5.0+,NetWare4) directory previously SUBSTituted 96h (150) (DOS 5.0+,NetWare4) system trace error 97h (151) (DOS 5.0+,NetWare4) invalid event count for DosMuxSemWait 98h (152) (DOS 5.0+,NetWare4) too many waiting on mutex 99h (153) (DOS 5.0+,NetWare4) invalid list format 9Ah (154) (DOS 5.0+,NetWare4) volume label too large 9Bh (155) (DOS 5.0+,NetWare4) unable to create another TCB 9Ch (156) (DOS 5.0+,NetWare4) signal refused 9Dh (157) (DOS 5.0+,NetWare4) segment discarded 9Eh (158) (DOS 5.0+,NetWare4) segment not locked 9Fh (159) (DOS 5.0+,NetWare4) invalid thread-ID address

A0h (160) (DOS 5.0+) bad arguments A0h (160) (NetWare4) bad environment pointer A1h (161) (DOS 5.0+,NetWare4) invalid pathname passed to EXEC A2h (162) (DOS 5.0+,NetWare4) signal already pending A3h (163) (DOS 5.0+) uncertain media A3h (163) (NetWare4) ERROR_124 mapping A4h (164) (DOS 5.0+) maximum number of threads reached A4h (164) (NetWare4) no more process slots A5h (165) (NetWare4) ERROR_124 mapping B0h (176) (MS-DOS 7.0) volume is not locked B1h (177) (MS-DOS 7.0) volume is locked in drive B2h (178) (MS-DOS 7.0) volume is not removable B4h (180) (MS-DOS 7.0) lock count has been exceeded B4h (180) (NetWare4) invalid segment number B5h (181) (MS-DOS 7.0) a valid eject request failed B5h (181) (DOS 5.0-6.0,NetWare4) invalid call gate B6h (182) (DOS 5.0+,NetWare4) invalid ordinal B7h (183) (DOS 5.0+,NetWare4) shared segment already exists B8h (184) (DOS 5.0+,NetWare4) no child process to wait for B9h (185) (DOS 5.0+,NetWare4) NoWait specified and child still running BAh (186) (DOS 5.0+,NetWare4) invalid flag number BBh (187) (DOS 5.0+,NetWare4) semaphore does not exist BCh (188) (DOS 5.0+,NetWare4) invalid starting code segment BDh (189) (DOS 5.0+,NetWare4) invalid stack segment BEh (190) (DOS 5.0+,NetWare4) invalid module type (DLL can not be used as

application)

BFh (191) (DOS 5.0+,NetWare4) invalid EXE signature C0h (192) (DOS 5.0+,NetWare4) EXE marked invalid C1h (193) (DOS 5.0+,NetWare4) bad EXE format (e.g. DOS-mode program) C2h (194) (DOS 5.0+,NetWare4) iterated data exceeds 64K C3h (195) (DOS 5.0+,NetWare4) invalid minimum allocation size C4h (196) (DOS 5.0+,NetWare4) dynamic link from invalid Ring C5h (197) (DOS 5.0+,NetWare4) IOPL not enabled C6h (198) (DOS 5.0+,NetWare4) invalid segment descriptor privilege level C7h (199) (DOS 5.0+,NetWare4) automatic data segment exceeds 64K C8h (200) (DOS 5.0+,NetWare4) Ring2 segment must be moveable C9h (201) (DOS 5.0+,NetWare4) relocation chain exceeds segment limit CAh (202) (DOS 5.0+,NetWare4) infinite loop in relocation chain CBh (203) (NetWare4) environment variable not found CCh (204) (NetWare4) not current country CDh (205) (NetWare4) no signal sent CEh (206) (NetWare4) file name not 8.3 CFh (207) (NetWare4) Ring2 stack in use D0h (208) (NetWare4) meta expansion is too long D1h (209) (NetWare4) invalid signal number D2h (210) (NetWare4) inactive thread D3h (211) (NetWare4) file system information not available D4h (212) (NetWare4) locked error D5h (213) (NetWare4) attempted to execute non-family API call in DOS mode D6h (214) (NetWare4) too many modules D7h (215) (NetWare4) nesting not allowed E6h (230) (NetWare4) non-existent pipe, or bad operation E7h (231) (NetWare4) pipe is busy E8h (232) (NetWare4) no data available for nonblocking read E9h (233) (NetWare4) pipe disconnected by server EAh (234) (NetWare4) more data available FFh (255) (NetWare4) invalid drive Note: there is a report that some Microsoft documentation shifts all DOS

error codes in the range BCh (188) through CAh (202) up by one
compared to what is listed here; that is probably a documentation
error

SeeAlso: #01682,#01683,#01684,#01961

Format of media ID structure: Offset Size Description (Table 01681) 00h 12 BYTEs ASCIZ volume label of required disk 0Ch DWORD serial number (DOS 4.0+) SeeAlso: #01680

(Table 01682) Values for DOS Error Class: 01h (1) out of resource (storage space or I/O channels) 02h (2) temporary situation (file or record lock) 03h (3) authorization / permission problem (denied access) 04h (4) internal system error (system software bug) 05h (5) hardware failure 06h (6) system failure (configuration file missing or incorrect) 07h (7) application program error 08h (8) not found 09h (9) bad format 0Ah (10) locked 0Bh (11) media error 0Ch (12) already exists / collision with existing item 0Dh (13) unknown / other 0Eh (14) (undoc) cannot 0Fh (15) (undoc) time SeeAlso: #01680,#01683,#01684

(Table 01683) Values for DOS Suggested Action: 01h retry 02h delayed retry (after pause) 03h prompt user to reenter input 04h abort after cleanup 05h immediate abort (“panic”) 06h ignore 07h retry after user intervention SeeAlso: #01680,#01682,#01684

(Table 01684) Values for DOS Error Locus: 01h unknown or not appropriate 02h block device (disk error) 03h network related 04h serial device (timeout) 04h (PTS-DOS 6.51+ & S/DOS 1.0+) character device 05h memory related

See also

AH=59h/BX=0001h,AX=5D0Ah,INT 2F/AX=122Dh,INT 24

Note

Text based on Ralf Brown Interrupt List Release 61

DOS API
Process manager	INT 20H, INT 21H: 00H, 25H, 26H, 31H, 34H, 35H, 4BH, 4CH, 4DH, 50H, 51H, 52H, 55H, 62H, INT 22H, INT 27H, INT 28H
File manager	INT 25H, INT 26H, INT 21H: 0DH, 0EH, 0FH, 10H, 11H, 12H, 13H, 14H, 15H, 16H, 17H, 19H, 1AH, 1BH, 1CH, 21H, 22H, 23H, 24H, 27H, 28H, 29H, 2EH, 2FH, 32H, 3305H, 36H, 39H, 3AH, 3BH, 3CH, 3DH, 3EH, 3FH, 40H, 41H, 42H, 4300H, 4301H, 45H, 45H, 46H, 4EH, 4FH, 54H, 56H, 5700H, 5701H, 5AH, 5BH, 5c00H, 5c01H, 60H, 67H, 68H, 6900H, 6901H, 6AH, 6CH
Character Device I/O	INT 29H, INT 21H: 01H, 02H, 03H, 04H, 05H, 06H, 07H, 08H, 09H, 0AH, 0BH, 0AH, 0CH, 5D07H, 5D08H, 5D09H, 5D0AH
Signals	INT 23H, INT 24H, INT 21H: 3300H, 3301H, 3302H
Memory manager	INT 21H: 48H, 49H, 4AH, 5800H, 5801H, 5802H, 5803H
Date and Time	INT 21H: 2AH, 2BH, 2CH, 2DH
Misc	INT 21H: 30H, 3306H, 3700H, 3701H, 3702H, 3703H, 59H
NLS	INT 21H: 3303H, 3304H, 3800H, 3801H, 6300H, 6301H, 6301H, 6500H, 6501H, 6502H, 6503H, 6504H, 6505H, 6506H, 6507H, 6520H, 6521H, 6522H, 6523H, 65A0H, 65A1H, 65A2H, 6601H, 6602H
Devices	INT 21H: 4400H, 4401H, 4402H, 4403H, 4404H, 4405H, 4406H, 4407H, 4408H, 4409H, 440AH, 440BH, 440CH, 440DH, 440EH, 440FH, 4410H, 4411H, 53H
Network	INT 21H: 5E00H, 5E01H, 5E02H, 5E03H, 5E04H, 5E05H, 5F00H, 5F01H, 5F02H, 5F03H, 5F04H, 5F05H, 5F07H, 5F08H
osFree Macro Library
Video I/O	@SetMode @SetCurSz @SetCurPos @GetCur @SetPage @ScrollUp @ScrollDn @Scroll @GetChAtr @PutChAtr @PutCh @SetPalet @SetColor @SetDot @GetDot @WrtTTY @VideoState @GetMode @GetDisplay @GetVideoState @GetEGAInfo @Cls
Hardware info	@Equipment @MemSize
Serial I/O	@AuxInit @AuxSendChar @AuxRecieveChar @AuxStatus
Tape I/O	@TapeOn @TapeOff @TapeRead @TapeWrite
Keyboard I/O	@KbdStatus @CharIn @CharPeek
Printer I/O	@PrnPrint @PrnInit @PrnStatus
Disk I/O	@DskReset @DskStatus @DskRead @DskWrite @DskVerify @DskFormat
Date and Time	@SetTime @GetTime
Mouse	@MouInit @MouShowPointer @MouStatus @MouSetPos @MouSetMickey @MouRegion
Memory manager	@ModBlok SET_BLOCK
Family API
DOS	Process Manager	DosBeep DosExit DosSleep DosExecPgm
File Manager	DosChDir DosChgFilePtr DosClose DosDelete DosDupHandle DosMkDir DosMove DosQCurDir DosQCurDisk DosSetFileMode DosOpen DosQFileInfo DosRead DosQFileMode DosQFSInfo DosQVerify DosRmDir DosSelectDisk DosFindClose DosFindFirst DosFindNext DosSetFileInfo DosSetVerify DosWrite DosFileLocks DosSetFHandState DosNewSize DosBufReset DosQFHandState DosSetFSinfo DosShutdown
Memory Manager	DosFreeSeg DosSubAlloc DosSubFree DosSubSet DosAllocHuge DosAllocSeg DosReallocHuge DosReallocSeg DosGetHugeShift DosCreateCSAlias
NLS	DosCaseMap DosGetCtryInfo DosGetDBCSEv DosSetCtryCode DosGetCollate DosGetMessage DosInsMessage DosPutMessage
Date and Time	DosSetDateTime DosGetDateTime
Devices	DosDevConfig DosDevIOCtl DosDevIOCtl2
Signals	DosHoldSignal DosSetSigHandler
Misc	BadDynLink DosGetEnv DosGetMachineMode DosGetVersion DosError DosErrClass DosSetVec
KBD	KbdCharIn KbdFlushBuffer KbdGetStatus KbdSetStatus KbdStringIn KbdPeek
VIO	VioGetBuf VioGetConfig VioGetCurPos VioGetCurType VioGetPhysBuf VioReadCellStr VioReadCharStr VioScrollUp VioScrollDn VioScrollLf VioScrollRt VioScrUnLock VioSetCurPos VioSetCurType VioSetMode VioGetMode VioShowBuf VioWrtCellStr VioWrtCharStr VioWrtCharStrAtt VioWrtNAttr VioWrtNCell VioWrtNChar VioWrtTTY VioScrLock VioPopUp
Tools	BIND
Modules	DOSCALLS.DLL VIOCALLS.DLL KBDCALLS.DLL MSG.DLL
Libraries	API.LIB OS2386.LIB FAPI.LIB DOSCALLS.LIB SUBCALLS.LIB