Assembly Language Help (alang.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Int 21h Function 59h
◄Summary► ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
This function may be called after any other Int 21h function call
that returned an error status, in order to obtain more detailed
information about the error type and the recommended action. If
the previous Int 21h function call had no error, 0000h is returned
in register AX. This function may also be called during the
execution of a critical-error (Int 24h) handler.
The contents of registers CL, DX, SI, DI, BP, DS, and ES are
destroyed by this function.
Note that extended error codes 13h-1Fh (19-31) and 22h (34)
correspond exactly to the error codes 0-0Ch (0-12) and 0Fh (15)
returned by Int 24h.
You should not code your programs to recognize only specific error
numbers if you want to ensure upward compatibility, because new
error codes are added in each new version of MS-DOS.
Under DOS 3.1, an application can use function 59h to preserve
current extended error information and to later restore the
information to DOS with function 5D0Ah. After calling function
59h, the application copies registers AX, BX, CX, DX, SI, DI, DX,
and ES in the order given to an 11-word data structure. The last
three words of the structure should each be set to zero.
The following defines the extended error structure:
EXTEND_ERR STRUCT
rAx WORD ? ; AX
rBx WORD ? ; BX
rCx WORD ? ; CX
rDx WORD ? ; DX
rSi WORD ? ; SI
rDi WORD ? ; DI
rDs WORD ? ; DS
rEs WORD ? ; ES
Pad WORD 3 DUP(0)
EXTEND_ERR ENDS
-♦-