COM$USEREX      ; F4P COMPATIBILITY - USER EXIT PROCEDURE SPECI  21-AUG-1978 18:53:47   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (2)      94  HISTORY		; Detailed Current Edit History

   (3)     104  DECLARATIONS

   (4)     132  USEREX - Main Entry Point

COM$USEREX      ; F4P COMPATIBILITY - USER EXIT PROCEDURE SPECI  21-AUG-1978 18:53:47   VAX-11 MACRO X0.3-11               Page   1

0-6                                                                                                                              (1)



                                     0000     1 	.TITLE	COM$USEREX	; F4P COMPATIBILITY - USER EXIT PROCEDURE SPECIFICATION

                                     0000     2 	.IDENT	/0-6/		; File: COMUSEREX.MAR

                                     0000     3 

                                     0000     4 ;

                                     0000     5 ; Copyright (C) 1977

                                     0000     6 ; Digital Equipment Corporation, Maynard, Massachusetts 01754

                                     0000     7 ;

                                     0000     8 ; This software is furnished under a license for use only on a single

                                     0000     9 ; computer  system  and  may be copied only with the inclusion of the

                                     0000    10 ; above copyright notice. This software, or any other copies thereof,

                                     0000    11 ; may not be provided or otherwise made available to any other person

                                     0000    12 ; except for use on such system and to one who agree to these license 

                                     0000    13 ; terms.  Title to  and  ownership of the software shall at all times 

                                     0000    14 ; remain in DEC.

                                     0000    15 ;

                                     0000    16 ; The information in the software is subject to change without notice

                                     0000    17 ; and should  not  be construed  as a commitment by Digital Equipment 

                                     0000    18 ; Corporation.

                                     0000    19 ;

                                     0000    20 ; DEC assumes  no  responsibility  for the use or  reliability of its

                                     0000    21 ; software on equipment which is not supplied by DEC.

                                     0000    22 ;

                                     0000    23 ;

                                     0000    24 ; FACILITY: FORTRAN COMPATIBILITY LIBRARY

                                     0000    25 ;++

                                     0000    26 ; ABSTRACT:

                                     0000    27 ;

                                     0000    28 ;	USEREX allows specification of a user procedure to be called at

                                     0000    29 ;	image exit

                                     0000    30 ;

                                     0000    31 ; ENVIRONMENT:

                                     0000    32 ;	User access mode, AST re-entrant

                                     0000    33 ;

                                     0000    34 ;--

                                     0000    35 ;

                                     0000    36 ; VERSION: 0

                                     0000    37 ;

                                     0000    38 ; HISTORY:

                                     0000    39 ;

                                     0000    40 ; AUTHOR:

                                     0000    41 ;	Peter Yuo, 7-Sep-77: Version 0

                                     0000    42 ;

                                     0000    43 ; MODIFIED BY:

                                     0000    44 ;

                                     0000    45 ;

                                     0000    46 ;

COM$USEREX      ; F4P COMPATIBILITY - USER EXIT PROCEDURE SPECI  21-AUG-1978 18:53:47   VAX-11 MACRO X0.3-11               Page   2

0-6             HISTORY  ; Detailed Current Edit History                                                                         (2)



                                     0000    48 	.SBTTL	HISTORY		; Detailed Current Edit History

                                     0000    49 

                                     0000    50 

                                     0000    51 ; Edit History for Version 01 of USEREX

                                     0000    52 ;

                                     0000    53 

                                     0000    54 ; 0-3	- Push address.  TNH 19-Dec-77

                                     0000    55 ; 0-5	- Change name to COMUSEREX.MAR.  JMT 5-Jan-78

                                     0000    56 ; 0-6	- Rewrote entire routine so it will work.  JMT 29-Jan-78

COM$USEREX      ; F4P COMPATIBILITY - USER EXIT PROCEDURE SPECI  21-AUG-1978 18:53:47   VAX-11 MACRO X0.3-11               Page   3

0-6             DECLARATIONS                                                                                                     (3)



                                     0000    58 	.SBTTL	DECLARATIONS

                                     0000    59 

                                     0000    60 ;

                                     0000    61 ; INCLUDE FILES:

                                     0000    62 ;

                                     0000    63 

                                     0000    64 ;

                                     0000    65 ; EXTERNAL SYMBOLS:

                                     0000    66 ;

                                     0000    67 

                                     0000    68 ;

                                     0000    69 ; MACROS:

                                     0000    70 ;

                                     0000    71 

                                     0000    72 ;

                                     0000    73 ; PSECT DECLARATIONS:

                                     0000    74 ;

                                 00000000    75 	.PSECT	F4PCOMPAT$CODE	PIC,USR,CON,REL,LCL,SHR,EXE,RD,NOWRT

                                     0000    76 

                                     0000    77 ;

                                     0000    78 ; EQUATED SYMBOLS:

                                     0000    79 ;

                           00000004  0000    80 	proc_entry_pt	= 4		; procedure_entry_point.rla.r

                                     0000    81 

                                     0000    82 ;

                                     0000    83 ; OWN STORAGE:

                                     0000    84 ;

COM$USEREX      ; F4P COMPATIBILITY - USER EXIT PROCEDURE SPECI  21-AUG-1978 18:53:47   VAX-11 MACRO X0.3-11               Page   4

0-6             USEREX - Main Entry Point                                                                                        (4)



                                     0000    86 	.SBTTL	USEREX - Main Entry Point

                                     0000    87 

                                     0000    88 ;++

                                     0000    89 ; FUNCTIONAL DESCRIPTION:

                                     0000    90 ;

                                     0000    91 ;	1) Call FOR$GET_VM to get the address of a termination control

                                     0000    92 ;	   block of length 5 longwords (20 bytes) from virtual memory.

                                     0000    93 ;	2) Insert the address of user specified termination procedure

                                     0000    94 ;	   into second longword of the termination control block and the

                                     0000    95 ;	   number of termination arguments (1) into low byte of its

                                     0000    96 ;	   third longword.  Point the fourth word at the fifth word.

                                     0000    97 ;	3) Call $DCLTRM to declare termination handler.

                                     0000    98 ;

                                     0000    99 ; CALLING SEQUENCE:

                                     0000   100 ;

                                     0000   101 ;	CALL USEREX (procedure_entry_point.rla.r)

                                     0000   102 ;

                                     0000   103 ; INPUT PARAMETERS:

                                     0000   104 ;

                                     0000   105 ;	procedure_entry_point.rla.r

                                     0000   106 ;

                                     0000   107 ; IMPLICIT INPUTS:

                                     0000   108 ;	NONE

                                     0000   109 ;

                                     0000   110 ; OUTPUT PARAMETERS:

                                     0000   111 ;	NONE

                                     0000   112 ;

                                     0000   113 ; IMPLICIT OUTPUTS:

                                     0000   114 ;	NONE

                                     0000   115 ;

                                     0000   116 ; COMPLETION CODES:

                                     0000   117 ;

                                     0000   118 ;	NONE

                                     0000   119 ;

                                     0000   120 ; SIDE EFFECTS:

                                     0000   121 ;

                                     0000   122 ;	SIGNAL_STOPs insufficient virtual memory,

                                     0000   123 ;	and fatal internal error if can't establish exit handler.

                                     0000   124 ;

                                     0000   125 ;--

                                     0000   126 

                                     0000   127 

                                     0000   128 

                               0000' 0000   129 	.ENTRY	USEREX, ^M<>

                                     0002   130 

                                     0002   131 ;

                                     0002   132 ; Call FOR$$GET_VM

                                     0002   133 ;

                                     0002   134 

                          14     DD  0002   135 	PUSHL	#20			; get 20 bytes

   00000000'EF            01     FB  0004   136 	CALLS	#1, FOR$$GET_VM		; from virtual memory

            51            50     D0  000B   137 	MOVL	R0, R1			; R0=R1 -> allocated memory

                                     000E   138 

                                     000E   139 ;

                                     000E   140 ; Insert address of user specified procedure and number of termination

                                     000E   141 ; argument (=1) into TCB

                                     000E   142 ;

COM$USEREX      ; F4P COMPATIBILITY - USER EXIT PROCEDURE SPECI  21-AUG-1978 18:53:47   VAX-11 MACRO X0.3-11               Page   5

0-6             USEREX - Main Entry Point                                                                                        (4)



                                     000E   143 

                          81     D5  000E   144 	TSTL	(R1)+			; skip over first entry

            81         04 AC     D0  0010   145 	MOVL	proc_entry_pt(AP), (R1)+; insert address of users exit

                                     0014   146 					; handler

            81            01     D0  0014   147 	MOVL	#1, (R1)+		; which will be called with one argument

            61         04 A1     DE  0017   148 	MOVAL	4(R1), (R1)		; namely, the address of a word con-

                                     001B   149 					; taining reason for termination

                                     001B   150 ;

                                     001B   151 ; Call DCLEXH to declare termination handler

                                     001B   152 ;

                                     001B   153 

                                     001B   154 	$DCLEXH_S	(R0)		; R0 = return code

            07            50     E8  0024   155 	BLBS	R0, 10$			; branch if success

   00000000'EF            00     FB  0027   156 	CALLS	#0, FOR$$SIG_FATINT	; signal, never to return

                                     002E   157 

                                 04  002E   158 10$:	RET				; R0 = completion status

                                     002F   159 

                                     002F   160 	.END

COM$USEREX      ; F4P COMPATIBILITY - USER EXIT PROCEDURE SPECI  21-AUG-1978 18:53:47   VAX-11 MACRO X0.3-11               Page   6

SYMBOL TABLE                                                                                                                     (4)



FOR$$GET_VM      ********   X   02   

FOR$$SIG_FATINT  ********   X   02   

FOR$K_ERR_PREFX= 00000018            

MTH$K_ERR_PREFX= 00000016            

MTH__FLOOVEMAT = 00000058            

MTH__FLOUNDMAT = 00000059            

MTH__INVARG    = 00000051            

MTH__LOGZERNEG = 00000053            

MTH__SINSIGLOS = 00000057            

MTH__SQUROONEG = 00000054            

MTH__UNDEXP    = 00000052            

MTH__WRONUMARG = 00000050            

PROC_ENTRY_PT  = 00000004            

SYS$DCLEXH       ********   X   02   

USEREX           00000000 RG    02   





PROGRAM SECTION SYNOPSIS



.  ABS  .        00000000      00     NOPIC   USR   CON   ABS   LCL NOSHR NOEXE NORD  NOWRT BYTE  

. BLANK .        00000000      01     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  

F4PCOMPAT$CODE   0000002F      02       PIC   USR   CON   REL   LCL   SHR   EXE   RD  NOWRT BYTE  





THERE WERE NO ERRORS OR WARNINGS.

27746. BYTES LEFT IN FREE MEMORY POOL.

OBJ$:COMUSEREX,LIS$:COMUSEREX/-SP=LIB$:S/ML,SRC$:P,COMUSEREX

6 MLB DIR RDS - 11 GETS TO DEFINE 2 MACROS. 2 INTER. FILE WRITES. 

