Function 4Dh (77)        Get Return Code of a Subprocess (WAIT)

Gets the return code from a terminated subprocess.

On entry: AH 4Dh

Returns: AX Return code

──────────────────────────────────────────────────────────────────────────

This function retrieves the return code from a process that has been
terminated via Function 4Ch (EXIT) or Function 31h (Terminate and Stay
Resident). There are two parts to the information returned: AL reports
the return code issued by the terminating program itself; AH reports
the manner in which it was terminated. The possible values in AH are:

00h normal termination
01h terminated via Ctrl-Break or Ctrl-C
02h terminated by DOS because of critical device error
03h terminated via Function 31h, Terminate and Stay Resident