home *** CD-ROM | disk | FTP | other *** search
- GETERROR.COM by Brett Warthen
-
- A simple memory-resident routine, that once installed allows you to check
- the error code (i.e., errorlevel) issued by the last process.
-
- The first time GETERROR is executed, it installs a small portion of itself
- in memory and takes over interrupts 21h and 16h.
-
- Interrupt 16h is used only for a signature request, so that we know whether
- or not the resident code is already there.
-
- Interrupt 21h is monitored for calls to the terminate program functions
- (4Ch and 31h). When a call to one of these functions is encountered,
- we save the error code from AL in our code.
-
- Subsequent executions of GETERROR will display the error code issued
- by the last program to terminate. For consistency, calls to Function 0 are
- translated into a return code of 0, as will calls to Interrupt 20h
-