; ; ;----------------------------------------------------------------------------- ; ; SUBROUTINE: A B O R T ; ; PURPOSE: Abort AST function for FORTRAN programs. ; ; AUTHOR: Jan H. Belgraver ; ; SOURCE: B.Z. Lederman Bankers Trust Co. USA ; Abort AST's in Fortran (& other high level languages) ; RSX Multi-Tasker, June 1984, pp 38-41 ; ; DATE: 14-DEC-84 ; ; VERSION: 1.0 ; ; DESCRIPTION: The call to ABOINI should occur at the beginning of ; the program to set ABOFLG and the abort AST entry ; points to the correct values. ; Note: It is absolutely necessary that this module ; is inserted in the root of a program, otherwise the ; AST-handling won't work properly. ; Program should test ABOFLG status on critical places. ; If flag happens to be set, because the program was ; aborted, all open files will be properly closed ; before one let terminate the program. ; ; INPUT FILES: None ; ; OUTPUT FILES: None ; ; LUNS: None ; ; EVENT FLAGS: None ; ; CALL: ABOINI ; ; ARGUMENTS: None ; ; CALLS TO: ASTX$S, SREX$S ; ; PARAMETERS: NAME DESCRIPTION ; ABOFLG Abort flag PSECT: ABOCOM ; Cleared by calling ABOINI, and set when the ; abort AST is served. ; MODIFIED BY: ; ;----------------------------------------------------------------------------- ; ; .TITLE ABORT .IDENT /V1.0/ ; ; .MCALL ASTX$S, SREX$S ; ; The following PSECT matches the attributes set by FORTRAN for ; common areas. ; .PSECT ABOCOM, RW, D, GBL, REL, OVR ABOFLG:: .WORD 0 ; .PSECT $ABRTC, RO, I, GBL, CON, LCL ; ABOINI:: CLR ABOFLG ; Set abort flag to .FALSE. SREX$S #ABOAST ; Specify AST point RETURN ; to main program ; ABOAST:: ADD (SP), SP ; Clean-up stack DEC ABOFLG ; Set abort flag to .TRUE. ASTX$S ; Leave AST-state ; .END