page , 132 title PL/M Application Exit Code subttl Copyright (c) 2011-2012,2018-2020, the ACME Software Deli ; ============================================================================ ; This program is distributed in the hope that it will be useful, but ; WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE ; ; Permission to use for any purpose, modify, copy, and make enhancements ; and derivative works of the software is granted if attribution is given to ; R.M. Gillmore, dba the ACME Software Deli, as the author ; ; While the ACME Software Deli does not work for money, there is nonetheless a ; a significant amount of work involved. The ACME Software Deli maintains the ; rights to all code written, though it may be used and distributed as long as ; the following conditions are maintained. ; ; 1. The copyright statement at the top of each code block is maintained in ; your distribution. ; 2. You do not identify yourself as the ACME Software Deli ; 3. Any changes made to the software are sent to the ACME Software Deli ; ============================================================================ page name exitFunction .186 ; -------------------------------------------------------------------------------- ; Function: exit ; ; Close the application, and return to the Operating System (DOS, in this case) ; The status code is presented to the OS as part of this function ; -------------------------------------------------------------------------------- DOS equ 21h EXITFunction equ 04ch CR equ 0dh LF equ 0ah plmLibrary_Code segment public 'Code' ifndef SMALL db '@(#)exit.a86 $Author: rmgillmore $ $Date:: 2025-05-04 19:35:39#$:', 0 endif plmLibrary_CGroup group plmLibrary_Code assume cs:plmLibrary_CGroup exitFrame Struc OldFrame Dw ? RtnAddr Dd ? exitNum Dw ? exitFrame Ends public exit exit proc far push Bp mov Bp, Sp mov Ax, [Bp].exitNum mov Ah, EXITFunction ; there is no return from here int DOS pop Bp ret exit endp plmLibrary_Code ends end