home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name pcresext -- Exit but stay resident
- *
- * Synopsis pcresext(excode);
- *
- * int excode; Exit code to return to DOS
- *
- * Description This function terminates the current process but makes
- * the program resident as part of DOS. The value of
- * excode is passed to DOS (or to the parent process) and
- * may be inspected with either the ERRORLEVEL command or
- * by the PCWAIT function.
- *
- * Version 3.0 (C)Copyright Blaise Computing Inc. 1983, 1984, 1986
- *
- **/
-
- #include <bmemory.h>
- #include <bprogctl.h>
- #include <butility.h>
-
- void pcresext(excode)
- int excode;
- {
- DOSREG reg;
-
- reg.ax = utbyword(0x31,excode); /* DOS function 0x31 */
- mmshrink(®.dx); /* Get the program size */
- dos(®);
- }