home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name pcexit -- Terminate the process and set the exit code
- *
- * Synopsis pcexit(excode);
- *
- * unsigned excode Exit code to set
- *
- * Description This function terminates the current process and sets
- * its exit code. The exit code can be inspected by the
- * parent process using the PCWAIT function, or at the
- * COMMAND.COM level by using the ERRORLEVEL batch command.
- * The exit code must be no greater than 255 and no less
- * than 0.
- *
- * Version 3.0 (C)Copyright Blaise Computing Inc. 1983,1984,1986
- *
- **/
-
- #include <bprogctl.h>
- #include <butility.h>
-
- void pcexit(excode)
- unsigned excode;
- {
- DOSREG dos_reg;
-
- dos_reg.ax = utbyword(0x4c,excode);
-
- dos(&dos_reg);
- }