MODULE XTERM ( IDENT = 'X00.06' %TITLE 'XPO$TERMINATE - XPORT Program Termination' %BLISS32( ,ADDRESSING_MODE( EXTERNAL=LONG_RELATIVE ) ) %BLISS36( ,ENTRY( XPO$TERMINATE ),OTS='' ) ) = BEGIN ! ! COPYRIGHT (c) 1980 BY ! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. ! ! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED ! ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE ! INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER ! COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY ! OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY ! TRANSFERRED. ! ! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE ! AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT ! CORPORATION. ! ! DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS ! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL. ! !++ ! ! FACILITY: BLISS Library ! ! ABSTRACT: ! ! This module performs program termination. ! ! ENVIRONMENT: User mode - multiple host operating/file systems ! ! AUTHORS: Ward Clark, CREATION DATE: 10 January 1979 ! Linda Duffell ! !-- ! ! TABLE OF CONTENTS: ! FORWARD ROUTINE XPO$TERMINATE : NOVALUE; ! Program termination routine ! ! INCLUDE FILES: ! LIBRARY 'XPORT' ; ! Public XPORT control block and macro definitions LIBRARY 'XPOSYS' ; ! Internal XPORT macro definitions $XPO_SYS_TEST( $TOPS10, $TOPS20, $VMS, $11M, $RSTS, $RT11 ) %IF $TOPS10 %THEN REQUIRE 'XT10' ; ! TOPS-10 system interface macros %FI %IF $TOPS20 %THEN REQUIRE 'XT20' ; ! TOPS-20 system interface macros %FI %IF $VMS %THEN REQUIRE 'XVMS' ; ! XPORT-specific VAX/VMS interface definitions %FI %IF $11M %THEN REQUIRE 'XRSX' ; ! XPORT-specific RSX-11M and FCS-11 interface definitions %FI %IF $RSTS %THEN REQUIRE 'XRSTS' ; ! RSTS/E system interface definitions %FI %IF $RT11 %THEN REQUIRE 'RT11' ; ! RT-11 system interface definitions %FI ! ! MACROS: ! ! ! EQUATED SYMBOLS: ! ! ! PSECT DECLARATIONS: ! $XPO_PSECTS ! Declare XPORT PSECT names and attributes ! ! OWN STORAGE: ! ! ! EXTERNAL REFERENCES: ! %IF $VMS %THEN EXTERNAL ROUTINE SYS$EXIT : ADDRESSING_MODE(GENERAL); ! VAX/VMS image termination system service %FI GLOBAL ROUTINE XPO$TERMINATE( completion_code ) : NOVALUE = !++ ! ! FUNCTIONAL DESCRIPTION: ! ! This routine sends a termination message and then terminates ! program execution. ! ! FORMAL PARAMETERS: ! ! completion_code - termination completion code ! ! IMPLICIT INPUTS: ! ! None ! ! IMPLICIT OUTPUTS: ! ! None ! ! ROUTINE VALUE: ! ! None ! ! SIDE EFFECTS: ! ! None ! !-- BEGIN ! ! Send the user a termination message. ! %IF NOT $VMS %THEN $XPO_PUT_MSG( CODE = .completion_code, ! Send a termination message. SEVERITY = ERROR, FAILURE = 0 ); %FI ! ! Terminate program execution. ! %IF $TOPS10 %THEN $T10_RESET; ! Clear all current I/O $T10_MONRT; ! and return to the TOPS-10 monitor. %FI %IF $TOPS20 %THEN $T20_RESET; ! Clear all current I/O $T20_HALTF; ! and return to the TOPS-20 monitor. %FI %IF $VMS %THEN SYS$EXIT( .completion_code ); ! Terminate the current image with a message. %FI %IF $11M %THEN EXIT$S( 0 ); ! Terminate the current task. If the directive fails, ! jump to location zero. %FI %IF $RSTS %THEN $XRSTS_INI_FIRQB; ! Initialize the FIRQB. $XRSTS_INI_XRB; ! Initialize the XRB. $RTS; ! Terminate the user program. %FI %IF $RT11 %THEN $EXIT( 1 ); ! Terminate the user program. %FI END; END ELUDOM