SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (1)      32  HISTORY			; DETAILED

   (1)      39  DECLARATIONS

   (1)     195  IMAGE ACTIVATOR

   (1)     925  KFI_GBLSECNMINI, KFI_GBLSECNMNXT, IAC$TRNGBLSEC

   (1)    1051  KFI_LOCKR, KFI_LOCK_MTX, KFI_INCREF, OPEN_DONE_

   (1)    1200  KFI_DECREF, CMKRNL, SETCTLREG

   (1)    1372  IMAGE ACTIVATOR INTERLOCK LOGIC

   (1)    1542  KFI_RELEASE - RELEASE THE KNOWN FILE ENTRY

   (1)    1597  SET/ZERO_FID, KFI_LOCKW

   (1)    1676  MARKED_FOR_DEL, MAKE_SHARED_WCB

   (1)    1785  KRNL_MAK_RESHDR, KFI_COMPAT_MODE

   (1)    1916  MANUAL FILE OPEN - NO RMS OR FCP AVAILABLE

   (1)    2038  INIWCB - INIT WINDOW CONTROL BLOCK

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page   1

0352                                                                                                                             (1)



                                     0000     1 	.TITLE	SYSIMGACT - IMAGE ACTIVATOR SYSTEM SERVICE

                                     0000     2 	.IDENT	/0352/

                                     0000     3 ;

                                     0000     4 ; COPYRIGHT (C) 1978

                                     0000     5 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754

                                     0000     6 ;

                                     0000     7 ; THIS SOFTWARE IS FURNISHED  UNDER A LICENSE FOR USE ONLY ON A SINGLE

                                     0000     8 ; COMPUTER  SYSTEM AND  MAY BE  COPIED ONLY WITH  THE INCLUSION OF THE

                                     0000     9 ; ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE, OR ANY OTHER COPIES THEREOF,

                                     0000    10 ; MAY NOT BE PROVIDED OR  OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON

                                     0000    11 ; EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE

                                     0000    12 ; TERMS.  TITLE TO AND  OWNERSHIP OF THE  SOFTWARE  SHALL AT ALL TIMES

                                     0000    13 ; REMAIN IN DEC.

                                     0000    14 ;

                                     0000    15 ; THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE

                                     0000    16 ; AND SHOULD  NOT BE CONSTRUED  AS A COMMITMENT  BY DIGITAL  EQUIPMENT

                                     0000    17 ; CORPORATION.

                                     0000    18 ;

                                     0000    19 ; DEC ASSUMES  NO  RESPONSIBILITY  FOR  THE USE OR  RELIABILITY OF ITS

                                     0000    20 ; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

                                     0000    21 

                                     0000    22 ;++

                                     0000    23 ; FACILITY:	EXECUTIVE, MEMORY MANAGEMENT SYSTEM SERVICE

                                     0000    24 ;

                                     0000    25 ; ABSTRACT:

                                     0000    26 ;

                                     0000    27 ; ENVIRONMENT:	KERNEL MODE, RUNNING MOSTLY AT IPL ASTDEL WITH THE 

                                     0000    28 ;	PROCESS HEADER LOCKED

                                     0000    29 ;

                                     0000    30 ;--

                                     0000    31 ;

                                     0000    32 	.SBTTL	HISTORY			; DETAILED

                                     0000    33 ;

                                     0000    34 ; AUTHOR: PETER H. LIPMAN	, CREATION DATE: 23-SEP-76

                                     0000    35 ;

                                     0000    36 ; MODIFIED BY:

                                     0000    37 ;	, : VERSION

                                     0000    38 ; 01	 -

                                     0000    39 	.SBTTL	DECLARATIONS

                                     0000    40 

                                     0000    41 ;

                                     0000    42 ; INCLUDE FILES:

                                     0000    43 ;

                                     0000    44 	LBLDF$				;COMPATIBILITY MODE LABEL BLOCK DEFINITIONS

                                     0000    45 	$CCBDEF				;CHANNEL CONTROL BLOCK DEFINITIONS

                                     0000    46 	$FABDEF				;FILE ACCESS BLOCK DEFINITIONS

                                     0000    47 	$IFDDEF				;IMAGE FILE DESCRIPTOR DEFINITIONS

                                     0000    48 	$IHADEF				;IMAGE HEADER ACTIVATION SECTION DEFINITIONS

                                     0000    49 	$IHDDEF				;IMAGE HEADER DEFINITIONS

                                     0000    50 	$IHXDEF				;IMAGE HEADER CROSSLINKER DEFINITIONS

                                     0000    51 	$IMPDEF				;RMS IMPURE AREA DEFINITIONS

                                     0000    52 	$ISDDEF				;IMAGE SECTION DESCRIPTOR DEF'S

                                     0000    53 	$KFIDEF				;KNOWN FILE ENTRY DEFINITIONS

                                     0000    54 	$KFHDEF				;KNOWN FILE IMAGE HEADER DEFINITIONS

                                     0000    55 	$NAMDEF				;NAME BLOCK DEFINITIONS

                                     0000    56 	$SECDEF				;PROCESS/GLOBAL SECTION DEF'S

                                     0000    57 	$WCBDEF				;WINDOW CONTROL BLOCK DEFINITIONS

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page   2

0352            DECLARATIONS                                                                                                     (1)



                                     0000    58 

                                     0000    59 	$CRETVADEF			;CREATE VIRTUAL ADDRESS SPACE DEFINITIONS

                                     0000    60 	$CRMPSCDEF			;CREATE AND MAP SECTION DEFINITIONS

                                     0000    61 	$MGBLSCDEF			;MAP GLOBAL SECTION DEFINITIONS

                                     0000    62 	$SETPRTDEF			;SET PROTECTION DEFINITIONS

                                     0000    63 ;

                                     0000    64 ; EXTERNAL SYMBOLS:

                                     0000    65 ;

                                     0000    66 ;

                                     0000    67 ; MACROS:

                                     0000    68 ;

                                     0000    69 ;

                                     0000    70 ; EQUATED SYMBOLS:

                                     0000    71 ;

                                     0000    72 ;   BIT DEFINITIONS IN IACFLG FLAGS WORD

                                     0000    73 ;

                                     0000    74 	_VIELD	IAC,0,<-		;IMAGE ACTIVATION FLAGS BIT DEFINITIONS

                                     0000    75 		<NOACT,,M>,-		;DO NOT ACTIVATE THE IMAGE (FOR INSTALL)

                                     0000    76 		<WRITABLE,,M>,-		;MAKE IMAGE FILE WRITABLE

                                     0000    77 		<XLINKER,,M>,-		;CROSS LINKER FORMAT

                                     0000    78 		<KP_RESHDR,,M>,-	;MAKE IMAGE HEADER RESIDENT

                                     0000    79 		<IS_RESHDR,,M>,-	;IMAGE HEADER IS RESIDENT

                                     0000    80 		<LIM,,M>,-		;LINKABLE IMAGE

                                     0000    81 		<NOTSHARED,,M>,-	;DO NOT SET IS_SHARED IN KFI ENTRY

                                     0000    82 		<,1>,-			;PLACE HOLDER, SPARE

                                     0000    83 		<RETRY,,M>,-		;RETRY IMAGE ACTIVATION

                                     0000    84 		>

                                     0000    85 	ASSUME	IAC_V_NOACT EQ 0

                                     0000    86 	ASSUME	IAC_V_RETRY EQ 8

                                     0000    87 ;

                                     0000    88 ;   OFFSETS FROM BEGINNING OF SCRATCH AREA

                                     0000    89 ;

                                     0000    90 	$OFFSET	0,NEGATIVE,<-		;NEGATIVE OFFSETS

                                     0000    91 	<IDMATCHCTL,8>,-		;IDENTIFICATION QUAD WORD

                                     0000    92 	<IOSB,8>,-			;I/O STATUS BLOCK FOR GI/O

                                     0000    93 	USRSTACKADR,-			;USER STACK ADDRESS

                                     0000    94 	<PROCPRIV,8>,-			;PROCESS PRIVILEGE MASK

                                     0000    95 	HDRVBN,-			;CURRENT HEADER VBN (LBN NOW) IN BUFFER

                                     0000    96 	HDRBLKCNT,-			;NUMBER OF BLOCKS OF HEADER IN THIS IMAGE

                                     0000    97 	CTLBASADR,-			;CONTROL REGION BASE ADDRESS, END OF "SHELL"

                                     0000    98 	CTLBASCNT,-			;BYTE COUNT IN FIXED CONTROL REGION

                                     0000    99 	BUFEND,-			;ADDRESS OF END OF BUFFER HEADER

                                     0000   100 	<KFIMATCHCTL,8>,-		;KNOWN FILE GLOBAL SECTION MATCH CONTROL

                                     0000   101 	<KFINAMSTR,16>,-		;KNOWN FILE GLOBAL SECTION NAME STRING

                                     0000   102 	<LIMNAMSIZ,8>,-			;LINKABLE IMAGE NAME DESCRIPTOR

                                     0000   103 	<LIMNAMSTR,20>,-		;LINKABLE IMAGE NAME STRING

                                     0000   104 	<FAB,FAB$C_BLN>,-		;FILE ACCESS BLOCK

                                     0000   105 	<NAM,NAM$C_BLN>,-		;NAME BLOCK

                                     0000   106 	<MAXNEGOFF,0>-			;MOST NEGATIVE OFFSET

                                     0000   107 	>

                                     FFF8       IDMATCHCTL:

                                     FFF0       IOSB:

                                     FFEC       USRSTACKADR:

                                     FFE4       PROCPRIV:

                                     FFE0       HDRVBN:

                                     FFDC       HDRBLKCNT:

                                     FFD8       CTLBASADR:

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page   3

0352            DECLARATIONS                                                                                                     (1)



                                     FFD4       CTLBASCNT:

                                     FFD0       BUFEND:

                                     FFC8       KFIMATCHCTL:

                                     FFB8       KFINAMSTR:

                                     FFB0       LIMNAMSIZ:

                                     FF9C       LIMNAMSTR:

                                     FF4C       FAB:

                                     FF14       NAM:

                                     FF14       MAXNEGOFF:

                                     0000   108 

                                     0000   109 	$OFFSET	0,POSITIVE,<-		;POSITIVE OFFSETS

                                     0000   110 -; KEEP THE FOLLOWING DEFINITIONS TOGETHER

                                     0000   111 	ARGCNT,-	 		;ARGUMENT COUNT

                                     0000   112 	INADR,-				;INPUT RANGE ADDRESS

                                     0000   113 	RETADR,-			;RETURN RANGE ADDRESS

                                     0000   114 	ACMODE,-			;ACCESS MODE OF CREATOR OF PAGES

                                     0000   115 	FLAGS,-				;SECTION FLAGS

                                     0000   116 	GSDNAM,-			;GLOBAL SECTION NAME DESCRIPTOR

                                     0000   117 	IDENT,-				;IDENTIFICATION

                                     0000   118 	RELPAG,-			;RELATIVE PAGE IN SECTION

                                     0000   119 	CHAN,-				;CHANNEL ON WHICH FILE IS OPEN

                                     0000   120 	PAGCNT,-			;SIZE OF SECTION IN PAGES

                                     0000   121 	VBN,-				;FIRST BLOCK NUMBER IN SECTION

                                     0000   122 	PROT,-				;PROTECTION

                                     0000   123 	PFC,-				;PAGE FAULT CLUSTER

                                     0000   124 -; KEEP THE PRECEEDING DEFINITIONS TOGETHER

                                     0000   125 

                                     0000   126 -; KEEP THE FOLLOWING DEFINITIONS TOGETHER

                                     0000   127 	STARTVA,-			;STARTING ADDRESS TO CREATE

                                     0000   128 	ENDVA,-				;ENDING ADDRESS (INCLUSIVE) TO CREATE

                                     0000   129 	RETSTARTVA,-			;RETURNED STARTING ADDRESS

                                     0000   130 	RETENDVA,-			;RETURNED ENDING ADDRESS

                                     0000   131 -; KEEP THE PRECEEDING DEFINITIONS TOGETHER

                                     0000   132 -; KEEP THE FOLLOWING DEFINITIONS TOGETHER

                                     0000   133 	FILELBN,-			;STARTING LOGICAL BLOCK NUMBER OF FILE

                                     0000   134 	FILESIZE,-			;FILE SIZE

                                     0000   135 -; KEEP THE PRECEEDING DEFINITIONS TOGETHER

                                     0000   136 

                                     0000   137 	<IOCHANCNT,2>,-			;DESIRED NO. OF CHANNELS OR 0

                                     0000   138 	<IMGIOCNT,2>,-			;DESIRED IMAGE I/O PAGE COUNT OR 0

                                     0000   139 -; KEEP THE FOLLOWING DEFINITIONS TOGETHER

                                     0000   140 	CMKFIADR,-			;COMPAT MODE KNOWN FILE ENTRY ADDRESS

                                     0000   141 	IFDFLAGS,-			;IMAGE FILE DESCRIPTOR FLAGS

                                     0000   142 -; KEEP THE PRECEEDING DEFINITIONS TOGETHER

                                     0000   143 -; KEEP THE FOLLOWING DEFINITIONS TOGETHER

                                     0000   144 	<IACFLG,2>,-			;IMAGE ACTIVATION FLAGS

                                     0000   145 	<KFIFLG,2>,-			;KNOWN FILE FLAGS

                                     0000   146 -; KEEP THE PRECEEDING DEFINITIONS TOGETHER

                                     0000   147 	LNKFLAGS -			;LINKER FLAGS

                                     0000   148 

                                     0000   149 	>

                                     0000       ARGCNT:

                                     0004       INADR:

                                     0008       RETADR:

                                     000C       ACMODE:

                                     0010       FLAGS:

                                     0014       GSDNAM:

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page   4

0352            DECLARATIONS                                                                                                     (1)



                                     0018       IDENT:

                                     001C       RELPAG:

                                     0020       CHAN:

                                     0024       PAGCNT:

                                     0028       VBN:

                                     002C       PROT:

                                     0030       PFC:

                                     0034       STARTVA:

                                     0038       ENDVA:

                                     003C       RETSTARTVA:

                                     0040       RETENDVA:

                                     0044       FILELBN:

                                     0048       FILESIZE:

                                     004C       IOCHANCNT:

                                     004E       IMGIOCNT:

                                     0050       CMKFIADR:

                                     0054       IFDFLAGS:

                                     0058       IACFLG:

                                     005A       KFIFLG:

                                     005C       LNKFLAGS:

                                     0000   150 

                                     0000   151 	$OFFSET	,,<-

                                     0000   152 

                                     0000   153 -; KEEP THE FOLLOWING DEFINITIONS TOGETHER

                                     0000   154 	KRNLARG,-			;ARG LIST TO KERNEL MODE ROUTINES

                                     0000   155 	KRNLROUT,-			;KERNEL ROUTINE ADDRESS TO CALL

                                     0000   156 	IMGACTCTX,-			;IMAGE ACTIVATION CONTEXT ADDRESS

                                     0000   157 	KFIADR,-			;KNOWN FILE ENTRY ADDRESS

                                     0000   158 	GBLSECCNT,-			;GLOBAL SECTION COUNT KNOWN FILE ENTRY SHARING

                                     0000   159 -; KEEP THE PRECEEDING DEFINITIONS TOGETHER

                                     0000   160 -;

                                     0000   161 -; KEEP THE FOLLOWING DEFINITIONS TOGETHER

                                     0000   162 	GSDNAMSIZ,-			;GLOBAL SECTION NAME STRING SIZE

                                     0000   163 	GSDNAMADR,-			;GLOBAL SECTION NAME STRING ADDRESS

                                     0000   164 -; KEEP THE PRECEEDING DEFINITIONS TOGETHER

                                     0000   165 	<RSLTNAME,<<NAM$C_MAXRSS+1>>>,-	;RESULTANT NAME STRING

                                     0000   166 -;

                                     0000   167 -; ALL INSERTIONS MUST BE MADE BEFORE THE FOLLOWING

                                     0000   168 -;

                                     0000   169 	<MAXPOSOFF,0>,-			;MAXIMUM POSITIVE OFFSET

                                     0000   170 	<,<512+MAXNEGOFF-.>>,-		;FILL OUT THE REMAINDER OF THE PAGE

                                     0000   171 	<OTHERHDR,512>,-		;PAGE BUFFER FOR OTHER THAN FIRST HEADER

                                     0000   172 	<FIRSTHDR,512>-			;PAGE BUFFER FOR FIRST HEADER

                                     0000   173 	>

                                     0060       KRNLARG:

                                     0064       KRNLROUT:

                                     0068       IMGACTCTX:

                                     006C       KFIADR:

                                     0070       GBLSECCNT:

                                     0074       GSDNAMSIZ:

                                     0078       GSDNAMADR:

                                     007C       RSLTNAME:

                                     00FD       MAXPOSOFF:

                                     0114       OTHERHDR:

                                     0314       FIRSTHDR:

                                     0000   174 ;

                                     0000   175 ; MAKE SURE THAT TOTAL SCRATCH DEFINED FITS IN THE PAGE RESERVED FOR IT

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page   5

0352            DECLARATIONS                                                                                                     (1)



                                     0000   176 ;

                           000001E9  0000   177 	MAXTOTOFF=MAXPOSOFF-MAXNEGOFF

                                     0000   178 	ASSUME	MAXTOTOFF LE 512

                                     0000   179 ;

                                     0000   180 ;   OFFSETS FROM AP

                                     0000   181 ;

                                     0000   182 	$OFFSET	4,POSITIVE,<-

                                     0000   183 

                                     0000   184 	NAME,-				;DESCRIPTOR FOR FILE NAME STRING

                                     0000   185 	DFLTNAME,-			;DESCRIPTOR FOR DEFAULT FILE NAME STRING

                                     0000   186 	HDRBUF,-			;ADDRESS OF 512 BYTE BUFFER TO WRITE IN

                                     0000   187 	IMGCTL-				;IMAGE CONTROL FLAGS

                                     0000   188 	>

                                     0004       NAME:

                                     0008       DFLTNAME:

                                     000C       HDRBUF:

                                     0010       IMGCTL:

                                     0000   189 ;

                                     0000   190 ; OWN STORAGE:

                                     0000   191 ;

                                 00000000   192 	.PSECT	$$$210,LONG

                                     0000   193 MMG$GL_IACLOCK::

                           00000000  0000   194 	.LONG	0			;IMAGE ACTIVATOR INTERLOCK

                                     0004   195 	.SBTTL	IMAGE ACTIVATOR

                                     0004   196 

                                     0004   197 ;++

                                     0004   198 ; FUNCTIONAL DESCRIPTION:

                                     0004   199 ;

                                     0004   200 ;

                                     0004   201 ; CALLING SEQUENCE:

                                     0004   202 ;

                                     0004   203 ;	CALLG	ARGLIST,SYS$IMGACT

                                     0004   204 ;

                                     0004   205 ;

                                     0004   206 ; INPUT PARAMETERS:

                                     0004   207 ;

                                     0004   208 ;	NAME(AP)	=	STRING DESCRIPTOR OF FILE NAME TO ACTIVATE

                                     0004   209 ;	DFLTNAME(AP)	=	STRING DESCRIPTOR FOR DEFAULT FILE NAME

                                     0004   210 ;				NOT USED IF INITIALIZING SYSTEM

                                     0004   211 ;	HDRBUF(AP)	=	ADDRESS OF 512 BYTE BUFFER IN WHICH THE

                                     0004   212 ;				IMAGE HEADER AND IMAGE FILE DESCRIPTOR ARE RETURNED

                                     0004   213 ;

                                     0004   214 ;				THE FIRST 2 LONG WORDS ARE THE ADDRESSES

                                     0004   215 ;				(IN THE BUFFER) OF:

                                     0004   216 ;					1) THE IMAGE HEADER ($IHDDEF)

                                     0004   217 ;					2) THE IMAGE FILE DESCRIPTOR ($IFDDEF)

                                     0004   218 ;	IMGCTL(AP)	=	IMAGE ACTIVATION CONTROL PARAMETERS

                                     0004   219 ;				BIT 0 = IAC_V_NOACT, SET IF NOT ACTIVATING

                                     0004   220 ;					THE IMAGE.  USED BY INSTALL TO COMPLETE

                                     0004   221 ;					THE ENHANCEMENT OF THE KNOWN FILE ENTRIES

                                     0004   222 ;				BIT 1 = IAC_V_WRITABLE, SET IF IMAGE IS 

                                     0004   223 ;					SUPPOSED TO BE WRITABLE

                                     0004   224 ;

                                     0004   225 ; IMPLICIT INPUTS:

                                     0004   226 ;

                                     0004   227 ;	NONE

                                     0004   228 ;

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page   6

0352            IMAGE ACTIVATOR                                                                                                  (1)



                                     0004   229 ; OUTPUT PARAMETERS:

                                     0004   230 ;

                                     0004   231 ;	NONE

                                     0004   232 ;

                                     0004   233 ; IMPLICIT OUTPUTS:

                                     0004   234 ;

                                     0004   235 ;	NONE

                                     0004   236 ;

                                     0004   237 ; COMPLETION CODES:

                                     0004   238 ;

                                     0004   239 ;	NONE

                                     0004   240 ;

                                     0004   241 ; SIDE EFFECTS:

                                     0004   242 ;

                                     0004   243 ;	NONE

                                     0004   244 ;

                                     0004   245 ;--

                                     0004   246 ;

                                     0004   247 ; **********************************************************************

                                     0004   248 ;

                                     0004   249 ; **************** THE FOLLOWING CODE MAY BE PAGED *****************

                                     0004   250 ;

                                 00000000   251 	.PSECT	Y$EXEPAGED

                                     0000   252 ;

                                     0000   253 ; **********************************************************************

                                     0000   254 ;

                                     0000   255 

                                     0000   256 	.LIST	MEB

                                     0000   257 

                                     0000   258 EXE$IMGACT::

                               00FC  0000   259 	.WORD	^M<R2,R3,R4,R5,R6,R7>

            56   000000EC'9F     DE  0002   260 	MOVAL	@#MMG$IMGACTBUF-MAXNEGOFF,R6 ;SCRATCH AREA BASE ADDRESS

            54       0314 C6     DE  0009   261 	MOVAL	FIRSTHDR(R6),R4		;ADDRESS OF IMAGE HEADER BUFFER

                          64     DF  000E   262 	PUSHAL	(R4)			;PUSH END VIRTUAL ADDRESS (INCLUSIVE)

                          66     DF  0010   263 	PUSHAL	(R6)			;AND STARTVA PARAMETERS

                                     0012   264 	$CRETVA_S INADR=-8(FP),-	;CREATE IMAGE ACTIVATOR SCRATCH PAGES

                                     0012   265 		ACMODE=S^#PSL$C_USER

                          00'    DD  0012       		PUSHL	S^#PSL$C_USER

                          00     DD  0014       		PUSHL	#0

                       F8 AD     7F  0016       		PUSHAQ	-8(FP)

   00000000'GF            03     FB  0019       		CALLS	#3,G^SYS$CRETVA

            4B            50     E9  0020   266 	BLBC	R0,IMGACT_RET		;EXIT IF FAILED TO CREATE

                                 8B  0023   267 	BICB3	#^C<IAC_M_NOACT ! -	;COPY THE CONTROL BITS THAT MAY

                                     0024   268 		IAC_M_WRITABLE>,-	;BE SPECIFIED

         10 AC         FC 8F         0024   269 		IMGCTL(AP),IACFLG(R6)	;TO THE IMAGE ACTIVATOR CONTROL FLAGS

                       58 A6         0028       

                          04     13  002A   270 	BEQL	10$			;BRANCH IF NOACT IS CLEAR

                                     002C   271 ;

                                     002C   272 ; GO THROUGH ALL THE MOTIONS OF ACTIVATING THE IMAGE WITHOUT DAMAGING

                                     002C   273 ; THE PROGRAM THAT CALLED.  THIS IS USED FOR DOING ALL THE KNOWN FILE

                                     002C   274 ; ENTRY ENHANCEMENTS BY THE INSTALL PROGRAM.

                                     002C   275 ;

                                     002C   276 

                                     002C   277 	ASSUME	IAC_V_NOACT EQ 0

            08         58 A6     E8  002C   278 	BLBS	IACFLG(R6),20$		;BRANCH IF NOT ACTUALLY ACTIVATING

                          FFCD'  30  0030   279 10$:	BSBW	RM$RESET		;RESET RMS IMAGE CONTEXT

         04 A6         34 A6     DE  0033   280 	MOVAL	STARTVA(R6),INADR(R6)	;ADDRESS OF STARTVA,ENDVA

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page   7

0352            IMAGE ACTIVATOR                                                                                                  (1)



         D8 A6   00000000'EF     D0  0038   281 20$:	MOVL	MMG$GL_CTLBASVA,CTLBASADR(R6) ;CONTROL REGION BASE ADDRESS

         60 A6            04     D0  0040   282 	MOVL	#4,KRNLARG(R6)		;INIT ARGUMENT LIST FOR KERNEL MODE ROUTINES

         68 A6            56     D0  0044   283 	MOVL	R6,IMGACTCTX(R6)	;ADDRESS OF SCRATCH STORAGE AT 8(AP)

            50         04 AC     D0  0048   284 	MOVL	NAME(AP),R0		;DESCRIPTOR FOR FILE NAME

                                     004C   285 	IFNORD	#8,(R0),IMGACT_ACCVIO 	;ERROR IF CALLER CANNOT ACCESS IT

            08            00     0C  004C       		PROBER	#0,#8,(R0)

                          60         004F       

                          19     13  0050       		BEQL	IMGACT_ACCVIO

            51            60     7D  0052   286 	MOVQ	(R0),R1			;R1 = SIZE, R2 = ADDRESS

                                     0055   287 	IFNORD	R1,(R2),IMGACT_ACCVIO 	;ERROR IS CALLER CANNOT ACCESS STRING

            51            00     0C  0055       		PROBER	#0,R1,(R2)

                          62         0058       

                          10     13  0059       		BEQL	IMGACT_ACCVIO

            55       FF4C C6     DE  005B   288 	MOVAL	FAB(R6),R5		;ADDRESS OF FILE ACCESS BLOCK

   00000000'EF            00'    E0  0060   289 	BBS	S^#EXE$V_INIT,EXE$GL_FLAGS,RMSOPEN ;USE RMS IF SYSTEM INITIALIZED

                          09         0067       

                          FF95'  31  0068   290 	BRW	MANUAL_OPEN		;OPEN THE FILE WITHOUT RMS OR FCP

                                     006B   291 IMGACT_ACCVIO:

                          0574   31  006B   292 	BRW	IMGACT_ACCVIO1

                                     006E   293 IMGACT_RET:

                          0574   31  006E   294 	BRW	IMGACT_ERREXIT

                                     0071   295 ;

                                     0071   296 ; SET UP TO OPEN THE FILE

                                     0071   297 ; R1 = SIZE OF NAME STRING, R2 = ADDRESS OF NAME STRING

                                     0071   298 ;

                                     0071   299 

                                     0071   300 	.ENABL	LSB

                                     0071   301 

                                     0071   302 RMSOPEN:

                                     0071   303 	ASSUME	FAB$B_BLN EQ FAB$B_BID+1 ;ID AND SIZE ADJACENT

            65       5003 8F     B0  0071   304 	MOVW	#<FAB$C_BLN@8+FAB$C_BID>,FAB$B_BID(R5) ;SET ID AND SIZE

         2C A5            52     D0  0076   305 	MOVL	R2,FAB$L_FNA(R5) 	;STORE FILE NAME ADDRESS

         34 A5            51     90  007A   306 	MOVB	R1,FAB$B_FNS(R5) 	;AND SIZE

            50         08 AC     D0  007E   307 	MOVL	DFLTNAME(AP),R0		;DESCRIPTOR FOR DEFAULT NAME STRING

                          17     13  0082   308 	BEQL	20$			;BRANCH IF NONE SPECIFIED

                                     0084   309 	IFNORD	#8,(R0),IMGACT_ACCVIO 	;ERROR IF CALLER CANNOT ACCESS DESCRIPTOR

            08            00     0C  0084       		PROBER	#0,#8,(R0)

                          60         0087       

                          E1     13  0088       		BEQL	IMGACT_ACCVIO

            50            60     7D  008A   310 	MOVQ	(R0),R0			;R0 = SIZE, R1 = ADDRESS

                                     008D   311 	IFNORD	R0,(R1),IMGACT_ACCVIO 	;ERROR IF CALLER CANNOT ACCESS STRING

            50            00     0C  008D       		PROBER	#0,R0,(R1)

                          61         0090       

                          D8     13  0091       		BEQL	IMGACT_ACCVIO

         30 A5            51     D0  0093   312 	MOVL	R1,FAB$L_DNA(R5) 	;SET DEFAULT NAME ADDRESS

         35 A5            50     90  0097   313 	MOVB	R0,FAB$B_DNS(R5) 	;AND SIZE

                                     009B   314 

                                     009B   315 20$:

                                     009B   316 RSX_AME_OPEN:

                                     009B   317 	ASSUME	NAM EQ FAB-NAM$C_BLN

            53         C8 A5     DE  009B   318 	MOVAL	NAM-FAB(R5),R3		;ADDRESS OF NAME BLOCK

         28 A5            53     D0  009F   319 	MOVL	R3,FAB$L_NAM(R5) 	;STORE IN FAB

                                     00A3   320 	ASSUME	NAM$B_BLN EQ NAM$B_BID+1 ;ID AND SIZE ADJACENT

            63       3802 8F     B0  00A3   321 	MOVW	#<NAM$C_BLN@8+NAM$C_BID>,NAM$B_BID(R3) ;SET ID AND SIZE

         04 A3         7D A6     DE  00A8   322 	MOVAL	RSLTNAME+1(R6),NAM$L_RSA(R3) ;SET RESULT NAME STRING ADDRESS

         02 A3         80 8F     90  00AD   323 	MOVB	#NAM$C_MAXRSS,NAM$B_RSS(R3) ;AND MAX SIZE

         0C A3         04 A3     D0  00B2   324 	MOVL	NAM$L_RSA(R3),NAM$L_ESA(R3) ;SET UP EXPANDED STRING TOO

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page   8

0352            IMAGE ACTIVATOR                                                                                                  (1)



         0A A3         02 A3     90  00B7   325 	MOVB	NAM$B_RSS(R3),NAM$B_ESS(R3) ;IN CASE OF FID OPEN OF KNOWN FILE

                                     00BC   326 

                                     00BC   327 	ASSUME	FAB$B_SHR EQ FAB$B_FAC+1

         16 A5         80 8F     9B  00BC   328 	MOVZBW	#FAB$M_EXE,FAB$B_FAC(R5) ;OPEN FOR EXECUTE, DEFAULT SHARING

         58 A6            01     E1  00C1   329 	BBC	#IAC_V_WRITABLE,IACFLG(R6),30$ ;BRANCH IF JUST OPEN FOR READING

                          06         00C5       

         16 A5       4301 8F     B0  00C6   330 	MOVW	#<<FAB$M_SHRGET ! FAB$M_SHRPUT ! FAB$M_UPI>@8 !-

                                     00CC   331 		FAB$M_PUT>,FAB$B_FAC(R5) ;OPEN FOR WRITING, SHARED

                                     00CC   332 

         04 A5   4C060000 8F     D0  00CC   333 30$:	MOVL	#<FAB$M_UFO !-		;USER FILE OPEN

                                     00D4   334 		FAB$M_UFM ! FAB$M_ESC !- ;IN USER MODE

                                     00D4   335 		FAB$M_PPF !-		;PROCESS PERMANENT FILE

                                     00D4   336 		FAB$M_KFO>,FAB$L_FOP(R5) ;KNOWN FILE OPEN

                       18 A5     D4  00D4   337 	CLRL	FAB$L_CTX(R5)		;KNOWN FILE ENTRY ADDRESS RETURNED HERE

         1C A5            01     8E  00D7   338 	MNEGB	#1,FAB$B_RTV(R5)	;ALLOCATE AN "OPTIMAL" WINDOW

                                     00DB   339 					;SMALL FOR CONTIGUOUS FILE (NORMAL CASE)

                                     00DB   340 					;NO WINDOW TURN FOR FRAGMENTED IMAGE

                       03 A3     94  00DB   341 	CLRB	NAM$B_RSL(R3)		;RESULTANT STRING LENGTH IS RETURNED

                                     00DE   342 					;IF FULL OPEN IS DONE, OTHERWISE ONLY

                                     00DE   343 					;EXPANDED STRING LENGTH IS RETURNED

                                     00DE   344 	$OPEN	(R5)			;OPEN THE FILE

                          65     DF  00DE       		PUSHAL	(R5)

   00000000'9F            01     FB  00E0       		CALLS	#$$.TMP1,@#SYS$OPEN

                                     00E7   345 MANUAL_OPN_DONE:

            05            50     E9  00E7   346 	BLBC	R0,32$			;BRANCH IF FAILED TO OPEN SUCCESSFULLY

         20 A6         0C A5     B0  00EA   347 	MOVW	FAB$L_STV(R5),CHAN(R6)	;SAVE CHANNEL ON WHICH FILE IS OPEN

         6C A6         18 A5     D0  00EF   348 32$:	MOVL	FAB$L_CTX(R5),KFIADR(R6) ;KNOWN FILE ENTRY ADDRESS IF ANY

            52            50     D0  00F4   349 	MOVL	R0,R2			;SAVE OPEN RETURN STATUS

         64 A6       0714'CF     DE  00F7   350 	MOVAL	W^OPEN_DONE_KRNL,KRNLROUT(R6) ;SEE IF FILE IS EXECUTE ONLY

                                     00FD   351 					;INCREMENT KNOWN FILE REFERENCE COUNT

                          0666   30  00FD   352 	BSBW	CMKRNL			;IN KERNEL MODE

            15            50     E9  0100   353 	BLBC	R0,38$			;BRANCH IF ERROR

            50            52     D0  0103   354 	MOVL	R2,R0			;OPEN STATUS BACK TO R0

            57         6C A6     D0  0106   355 	MOVL	KFIADR(R6),R7		;GET KNOWN FILE ENTRY ADDRESS

            0D            50     E8  010A   356 	BLBS	R0,40$			;BRANCH IF OPENED SUCCESSFULLY

                          09     13  010D   357 	BEQL	38$			;IF NOT KNOWN IMAGE, THEN EXIT

                          38     E1  010F   358 	BBC	#FAB$V_NAM+<FAB$L_FOP*8>,(R5),- ;AND IF NOT OPENING BY FILE ID

            05            65         0111   359 		38$			;THEN EXIT

                          FF55'  30  0113   360 	BSBW	ZERO_FID		;ZERO THE FILE ID AND TRY AGAIN

                          B4     11  0116   361 	BRB	30$			;ASSUMING THAT FILE WAS DELETED

                          54     11  0118   362 38$:	BRB	IMGACT_RET1

         7C A6         03 A3     90  011A   363 40$:	MOVB	NAM$B_RSL(R3),RSLTNAME(R6) ;BYTE COUNT OF RESULT NAME STRING

                          05     12  011F   364 	BNEQ	50$			;BRANCH IF THIS WAS RETURNED

         7C A6         0B A3     90  0121   365 	MOVB	NAM$B_ESL(R3),RSLTNAME(R6) ;OTHERWISE USE EXPANDED NAME STRING SIZE

                          57     D5  0126   366 50$:	TSTL	R7			;KNOWN FILE ENTRY?

                          47     18  0128   367 	BGEQ	IS_OPEN_NOTKFI1		;BRANCH IF NOT

                                     012A   368 ;

                                     012A   369 ; SUCCESSFUL OPEN OF A KNOWN FILE

                                     012A   370 ;

         14 A7            07     E1  012A   371 	BBC	#KFI$V_PROCPRIV,KFI$W_FLAGS(R7),60$ ;USE THE PRIVILEGE MASK?

                          0E         012E       

                          51     DC  012F   372 	MOVPSL	R1			;IF CALLED FROM USER MODE

            00'           00'    ED  0131   373 	CMPZV	S^#PSL$V_PRVMOD,S^#PSL$S_PRVMOD,R1,S^#PSL$C_USER

            00'           51         0134       

                          05     13  0136   374 	BEQL	60$			;THEN NO ENHANCEMENT OF PRIVILEGE

         E4 A6         24 A7     7D  0138   375 	MOVQ	KFI$Q_PROCPRIV(R7),PROCPRIV(R6) ;USE PRIVILEGES OF THE KNOWN IMAGE

         0B A7            07     E0  013D   376 60$:	BBS	#KFI$V_MARKDEL,KFI$B_KFICTL(R7),100$ ;BRANCH IF MARKED FOR DELETE

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page   9

0352            IMAGE ACTIVATOR                                                                                                  (1)



                          20         0141       

            50       0000'8F     B1  0142   377 	CMPW	#<RMS$_KFF&^XFFFF>,R0	;IF OPEN STATUS IS KNOWN FILE FOUND

                          2A     13  0147   378 	BEQL	IS_OPEN_KFI		;THEN IT IS ALL SET

                          38     E0  0149   379 	BBS	#FAB$V_NAM+<FAB$L_FOP*8>,(R5),- ;IF FILE WAS OPEN BY NAME BLOCK

            26            65         014B   380 		IS_OPEN_KFI		;THEN IT IS ALL SET

                          00     E0  014D   381 	BBS	#KFI$V_KP_OPEN,KFI$W_FLAGS(R7),- ;IF SUPPOSED TO KEEP FILE OPEN

            08         14 A7         014F   382 		80$			;THEN PROMOTE WCB INTO KFI ENTRY

                                     0152   383 ;

                                     0152   384 ; NOT KEEPING THE FILE OPEN, AT LEAST SET UP KNOWN FILE ENTRY SO THAT

                                     0152   385 ; SUBSEQUENT OPENS WILL OPEN BY FILE ID.

                                     0152   386 ;

         64 A6       0073'CF     DE  0152   387 	MOVAL	W^KRNL_SET_FID,KRNLROUT(R6) ;ADR OF ROUTINE TO SET FILE ID

                          0E     11  0158   388 	BRB	120$

         64 A6       00A2'CF     DE  015A   389 80$:	MOVAL	W^MAKE_SHARED_WCB,KRNLROUT(R6) ;INIT KFI ENTRY TO KEEP

                          06     11  0160   390 	BRB	120$			;THE FILE OPEN

         64 A6       009E'CF     DE  0162   391 100$:	MOVAL	W^MARKED_FOR_DEL,KRNLROUT(R6) ;ENTRY IS MARKED FOR DELETE

                                     0168   392 					;GO GET KFI ENTRY DELETED

                          05FB   30  0168   393 120$:	BSBW	CMKRNL			;DO THIS IN KERNEL MODE

            05            50     E8  016B   394 	BLBS	R0,IS_OPEN_KFI		;BRANCH IF SUCCESSFUL

                                     016E   395 

                                     016E   396 	.DSABL	LSB

                                     016E   397 

                                     016E   398 IMGACT_RET1:

                          0474   31  016E   399 	BRW	IMGACT_ERREXIT

                                     0171   400 IS_OPEN_NOTKFI1:

                          38     11  0171   401 	BRB	IS_OPEN_NOTKFI

                                     0173   402 

                                     0173   403 IS_OPEN_KFI:

            51         14 A7     3C  0173   404 	MOVZWL	KFI$W_FLAGS(R7),R1	;GET KNOWN FILE FLAGS WORD

                                     0177   405 

                                     0177   406 	ASSUME	KFI$V_KP_OPEN EQ 0

            03            51     E8  0177   407 	BLBS	R1,10$			;IF NOT KEEPING FILE OPEN

            51            06     AA  017A   408 	BICW	#<KFI$M_KP_RESHDR !-	;THEN MAY NOT KEEP HEADER RESIDENT

                                     017D   409 		KFI$M_KP_SHARED>,R1	;OR MAKE IMAGE SHARED

         5A A6            51     B0  017D   410 10$:	MOVW	R1,KFIFLG(R6)		;KEEP A STABLE COPY OF THE FLAGS

            51            0F     E0  0181   411 	BBS	#KFI$V_COMPATMOD,R1,-	;IF COMPATIBILITY MODE

                                     0184       

                          76'        0184   412 		RSX_KNOWN_FILE		;THEN SKIP READING THE IMAGE HEADER

            51       0102 8F     B3  0185   413 	BITW	#<KFI$M_KP_RESHDR!KFI$M_IS_RESHDR>,R1 ;RESIDENT HDR?

                          1F     13  018A   414 	BEQL	40$			;BRANCH IF NOT SUPPOSED TO BE

            51            08     E1  018C   415 	BBC	#KFI$V_IS_RESHDR,R1,20$	;BRANCH IF NEED TO MAKE IT RESIDENT

                          17         018F       

                                     0190   416 ;

                                     0190   417 ; HEADER IS RESIDENT, GET ITS ADDRESS

                                     0190   418 ;

            53         20 A7     D0  0190   419 	MOVL	KFI$L_IMGHDR(R7),R3	;ADDRESS OF HEADER BUFFER

            54            53     D0  0194   420 	MOVL	R3,R4			;NEED IT IN BOTH REGISTERS

         D0 A6         F4 A3     D0  0197   421 	MOVL	-KFH$C_LENGTH(R3),BUFEND(R6) ;ADDRESS OF END OF BUFFER

         E0 A6            01     CE  019C   422 	MNEGL	#1,HDRVBN(R6)		;IN CASE WE TRY TO READ ANOTHER BLOCK

         58 A6            10     88  01A0   423 	BISB	#IAC_M_IS_RESHDR,IACFLG(R6) ;NOTE IMAGE HEADER IS RESIDENT

                          00AE   31  01A4   424 	BRW	FIRSTHDRBLK1		;PROCESS THE IMAGE HEADER AS USUAL

         58 A6            08     88  01A7   425 20$:	BISB	#IAC_M_KP_RESHDR,IACFLG(R6) ;WANT TO MAKE HEADER RESIDENT

                                     01AB   426 40$:

                                     01AB   427 IS_OPEN_NOTKFI:

         E0 A6            01     D0  01AB   428 	MOVL	#1,HDRVBN(R6)		;ADDRESS OF FIRST HEADER BLOCK

            53            54     D0  01AF   429 	MOVL	R4,R3			;ADDRESS TO READ INTO

                                     01B2   430 

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  10

0352            IMAGE ACTIVATOR                                                                                                  (1)



                                     01B2   431 ;

                                     01B2   432 ; R3 = ADDRESS OF HEADER TO READ INTO

                                     01B2   433 ; R4 = ADDRESS OF IMAGE HEADER = R3 IF FIRST HEADER BLOCK

                                     01B2   434 ;

                                     01B2   435 NXTHDR:

            01            09     9C  01B2   436 	ROTL	#9,#1,R0		;R0=^X200

                          50         01B5       

            53            50     C1  01B6   437 	ADDL3	R0,R3,BUFEND(R6)	;ADDRESS OF END OF BUFFER

                       D0 A6         01B9       

                                     01BB   438 	$QIOW_S-			;READ NEXT IMAGE HEADER BLOCK

                                     01BB   439 		CHAN=CHAN(R6),-		;CHANNEL ON WHICH FILE IS OPEN

                                     01BB   440 		FUNC=#IO$_READVBLK,-	;READ VIRTUAL BLOCK

                                     01BB   441 		IOSB=IOSB(R6),-		;I/O STATUS BLOCK

                                     01BB   442 		P1=(R3),-		;ADDRESS OF BUFFER TO READ INTO

                                     01BB   443 		P2=R0,-			;NUMBER OF BYTES TO READ (^X200)

                                     01BB   444 		P3=HDRVBN(R6)		;VIRTUAL BLOCK NUMBER

                          7E     7C  01BB       		CLRQ	-(SP)

                          00     DD  01BD       		PUSHL	#0

                       E0 A6     DD  01BF       		PUSHL	HDRVBN(R6)

                          50     DD  01C2       		PUSHL	R0

                          63     DF  01C4       		PUSHAL	(R3)

                          7E     7C  01C6       		CLRQ	-(SP)

                       F0 A6     7F  01C8       		PUSHAQ	IOSB(R6)

            7E       0000'8F     3C  01CB       		MOVZWL	#IO$_READVBLK,-(SP)

            7E         20 A6     3C  01D0       		MOVZWL	CHAN(R6),-(SP)

                          00     DD  01D4       		PUSHL	#0

   00000000'GF            0C     FB  01D6       		CALLS	#12,G^SYS$QIOW

            67            50     E9  01DD   445 	BLBC	R0,IMGACT_RET4		;BRANCH IF ERROR

            50         F0 A6     3C  01E0   446 	MOVZWL	IOSB(R6),R0		;GET I/O STATUS

            60            50     E9  01E4   447 	BLBC	R0,IMGACT_RET4		;EXIT IF CANNOT READ HEADER BLOCK

                       E0 A6     D6  01E7   448 	INCL	HDRVBN(R6)		;COUNT THE HEADER BLOCKS READ

            54            53     D1  01EA   449 	CMPL	R3,R4			;IS THIS 1ST HDR?

                          5B     13  01ED   450 	BEQL	FIRSTHDRBLK		;BRANCH IF YES

                          02EB   31  01EF   451 	BRW	CHKISD			;CHECK ISD ADDRESS AND SIZE

                                     01F2   452 

                                     01F2   453 ;

                                     01F2   454 ; THE IMAGE OPENED WAS AN RSX TASK

                                     01F2   455 ; START THE RSX APPLICATION MIGRATION EXECUTIVE (RSX AME)

                                     01F2   456 ;

                                     01F2   457 

                                     01F2   458 

                                     01F2   459 	.ENABL	LSB

                                     01F2   460 

                                     01F2   461 RSX_IMAGE:

                          57     D5  01F2   462 	TSTL	R7			;KNOWN FILE?

                          0D     18  01F4   463 	BGEQ	20$			;BRANCH IF NOT

                          FF76'  30  01F6   464 	BSBW	KFI_COMPAT_MODE		;YES, INIT COMPAT MODE KNOWN FILE ENTRY

                          03     11  01F9   465 	BRB	10$

                                     01FB   466 RSX_KNOWN_FILE:

                          055E   30  01FB   467 	BSBW	KFI_DECREF		;IF KNOWN FILE, RELEASE THE REFERENCE

         50 A6         18 A5     D0  01FE   468 10$:	MOVL	FAB$L_CTX(R5),CMKFIADR(R6) ;SAVE KFI ADR AND SEQUENCE NO.

   00000000'EF            00'    E1  0203   469 20$:	BBC	S^#EXE$V_INIT,EXE$GL_FLAGS,BADIMGHDR ;MUST HAVE RMS AVAILABLE

                          37         020A       

         20 A6            10     9C  020B   470 	ROTL	#16,CHAN(R6),CHAN(R6)	;SAVE RSX IMAGE CHANNEL

                       20 A6         020F       

         2C A5         30'AF     DE  0211   471 	MOVAL	B^RSX_AME_NAM,FAB$L_FNA(R5) ;ADDRESS OF RSX AME NAME

         34 A5         03'8F     90  0216   472 	MOVB	#RSX_AME_SIZ,FAB$B_FNS(R5) ;SIZE OF RSX AME NAME

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  11

0352            IMAGE ACTIVATOR                                                                                                  (1)



         30 A5         33'AF     DE  021B   473 	MOVAL	B^RSX_AME_DNAM,FAB$L_DNA(R5) ;DEFAULT NAME ADDRESS

         35 A5         0F'8F     90  0220   474 	MOVB	#RSX_AME_DSIZ,FAB$B_DNS(R5) ;DEFAULT NAME SIZE

                                     0225   475 

                                     0225   476 	ASSUME	KFIFLG EQ IACFLG+2

         58 A6   FFFFFFFE 8F     CA  0225   477 	BICL	#^C<IAC_M_NOACT>,IACFLG(R6) ;CLEAN START FOR AME ACTIVATION

                          FE6B   31  022D   478 	BRW	RSX_AME_OPEN		;OPEN THE RSX AME

                                     0230   479 

                                     0230   480 	.DSABL	LSB

                                     0230   481 

                                     0230   482 RSX_AME_NAM:

                           58 53 52  0230   483 	.ASCII	/RSX/

                           00000003  0233   484 	RSX_AME_SIZ=.-RSX_AME_NAM

                                     0233   485 RSX_AME_DNAM:

2E 3A 4D 45 54 53 59 53 24 53 59 53  0233   486 	.ASCII	/SYS$SYSTEM:.EXE/

                           45 58 45  023F       

                           0000000F  0242   487 	RSX_AME_DSIZ=.-RSX_AME_DNAM

                                     0242   488 BADIMGHDR:

            50       0000'8F     3C  0242   489 	MOVZWL	#SS$_BADIMGHDR,R0

                                     0247   490 IMGACT_RET4:

                          039B   31  0247   491 	BRW	IMGACT_ERREXIT

                                     024A   492 ;

                                     024A   493 ; VALIDATE THE IMAGE HEADER

                                     024A   494 ;

                                     024A   495 FIRSTHDRBLK:

            50       01FE C4     32  024A   496 	CVTWL	^X1FE(R4),R0		;RSX TASK IMAGE?

                          A1     13  024F   497 	BEQL	RSX_IMAGE		;BRANCH IF YES

                          50     D6  0251   498 	INCL	R0			;MUST BE -1 ELSE ERROR

                          ED     12  0253   499 	BNEQ	BADIMGHDR		;BRANCH IF BAD HEADER

                                     0255   500 FIRSTHDRBLK1:

                                 B1  0255   501 	CMPW	IHD$W_SIZE(R4),-	;DOES IHD FIT WITH WORST CASE IFD

       0160 8F            64         0256   502 		#<512-<8+IFD$C_LENGTH+<<NAM$C_MAXRSS+4>&^C<3>>>> ;IN HEADER BUFFER

                          E6     14  025A   503 	BGTR	BADIMGHDR		;BAD HEADER IF T DOESN'T

         0C A4       3130 8F     B1  025C   504 	CMPW	#IHX$K_MAJORID,IHD$W_MAJORID(R4) ;CROSS LINKER FORMAT?

                          0D     12  0262   505 	BNEQ	60$			;BRANCH IF NOT

                                     0264   506 ;

                                     0264   507 ; CROSS LINKER FORMAT

                                     0264   508 ;

                                     0264   509 

                                     0264   510 	ASSUME	IAC_V_KP_RESHDR EQ IAC_V_XLINKER+1

            02            01     F0  0264   511 	INSV	#1,#IAC_V_XLINKER,#2,IACFLG(R6) ;SET CROSS LINKER FORMAT

         58 A6            02         0267       

                                     026A   512 					;NO RESIDENT HDR FOR CROSS LINKER FORMAT

         DC A6         02 A4     9A  026A   513 	MOVZBL	IHX$B_HDRBLKCNT(R4),HDRBLKCNT(R6) ;GET HEADER BLOCK COUNT

                          27     11  026F   514 	BRB	70$

                                     0271   515 

         0C A4       3230 8F     B1  0271   516 60$:	CMPW	#IHD$K_MAJORID,IHD$W_MAJORID(R4) ;NATIVE FORMAT?

                          C9     12  0277   517 	BNEQ	BADIMGHDR		;BRANCH IF BAD HEADER

         DC A6         10 A4     9A  0279   518 	MOVZBL	IHD$B_HDRBLKCNT(R4),HDRBLKCNT(R6) ; HEADER BLOCK COUNT

                                     027E   519 	ASSUME	IHD$W_IMGIOCNT EQ IHD$W_IOCHANCNT+2

         4C A6         1C A4     D0  027E   520 	MOVL	IHD$W_IOCHANCNT(R4),IOCHANCNT(R6) ;CHANNEL COUNT AND IMAGE

                                     0283   521 					;I/O COUNT SPECIFIED AT LINK TIME

         02 A4            20     B1  0283   522 	CMPW	#IHD$L_LNKFLAGS,IHD$W_ACTIVOFF(R4) ;LINKER FLAGS IN THE HEADER?

                          05     18  0287   523 	BGEQ	65$			;BRANCH IF NOT

         5C A6         20 A4     D0  0289   524 	MOVL	IHD$L_LNKFLAGS(R4),LNKFLAGS(R6) ;YES, COPY TO SCRATCH AREA

            02         11 A4     91  028E   525 65$:	CMPB	IHD$B_IMGTYPE(R4),#IHD$K_LIM ;IS THIS A LINKABLE IMAGE?

                          04     12  0292   526 	BNEQ	70$			;BRANCH IF NOT

         58 A6            20     88  0294   527 	BISB	#IAC_M_LIM,IACFLG(R6)	;YES, NOTE THAT IT IS

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  12

0352            IMAGE ACTIVATOR                                                                                                  (1)



                                     0298   528 ;

                                     0298   529 ; ADD OTHER VALIDITY CHECKS HERE

                                     0298   530 ;

         0E A4       3130 8F     B1  0298   531 70$:	CMPW	#IHD$K_MINORID,IHD$W_MINORID(R4) ;MINOR ID MAY BE MORE RECENT

                          A2     1A  029E   532 	BGTRU	BADIMGHDR		;ERROR IF IT IS OLDER

                                     02A0   533 ;

                                     02A0   534 ; CHANNEL COUNT PARAMETER IS CURRENTLY IGNORED

                                     02A0   535 ;

            51         4E A6     3C  02A0   536 	MOVZWL	IMGIOCNT(R6),R1		;IMAGE I/O PAGE COUNT SPECIFIED AT LINK TIME

                          07     12  02A4   537 	BNEQ	80$			;BRANCH IF SPECIFIED

            51   00000000'EF     3C  02A6   538 	MOVZWL	SGN$GW_IMGIOCNT,R1	;OTHERWISE USE SYSTEM DEFAULT

            51            09     9C  02AD   539 80$:	ROTL	#9,R1,R1		;FORM BYTE COUNT

                          51         02B0       

         D8 A6            51     C3  02B1   540 	SUBL3	R1,CTLBASADR(R6),R0	;EXTEND THE "SHELL"

                          50         02B5       

         D8 A6            50     D0  02B6   541 	MOVL	R0,CTLBASADR(R6)	;AND SET NEW BASE

                                     02BA   542 

                                     02BA   543 	ASSUME	IAC_V_NOACT EQ 0

            3A         58 A6     E8  02BA   544 	BLBS	IACFLG(R6),90$		;BRANCH IF NOT ACTIVATING

            7E            50     7D  02BE   545 	MOVQ	R0,-(SP)		;SAVE IMAGE I/O SECTION DESCRIPTOR

            51            7140   9E  02C1   546 	MOVAB	-(R1)[R0],R1		;ENDVA=STARTVA+SIZE-1

         34 A6            50     7D  02C5   547 	MOVQ	R0,STARTVA(R6)		;STORE RANGE TO CREATE

            66            03     D0  02C9   548 	MOVL	#CRETVA$_NARGS,ARGCNT(R6) ;# OF PARAMS TO CRETVA

         0C A6       0000'8F     B0  02CC   549 	MOVW	#<PRT$C_UREW @ 8 ! PSL$C_EXEC>,ACMODE(R6) ;EXEC PAGES

                                     02D2   550 	$CMKRNL_S W^MMG$CRETVA,(R6)	;CREATE THE PAGES USING PRIVILEGED

                          66     DF  02D2       		PUSHAL	(R6)

                     0000'CF     DF  02D4       		PUSHAL	W^MMG$CRETVA

   00000000'GF            02     FB  02D8       		CALLS	#2,G^SYS$CMKRNL

                                     02DF   551 					;KERNEL MODE ENTRY POINT TO CRETVA

            6F            50     E9  02DF   552 	BLBC	R0,IMGACT_RET2		;EXIT IF FAILED TO CREATE

                                     02E2   553 

                                     02E2   554 	ASSUME	IMP$L_IOSEGLEN EQ IMP$L_IOSEGADDR+4

   00000004'9F            8E     7D  02E2   555 	MOVQ	(SP)+,@#PIO$GW_IIOIMPA+IMP$L_IOSEGADDR ;IMAGE I/O ADDRESS AND SIZE

            01            02     EF  02E9   556 	EXTZV	#IHD$V_NOP0BUFS,#1,LNKFLAGS(R6),R0 ;PASS THROUGH THE P0 SPACE

            50         5C A6         02EC       

            05            50     F0  02EF   557 	INSV	R0,#IMP$V_NOP0BUFS,#1,@#PIO$GW_IIOIMPA ;BUFFER INHIBIT FLAG TO RMS

   00000000'9F            01         02F2       

                                     02F8   558 ;

                                     02F8   559 ; IMAGE IS ACTIVATED FOR USER MODE

                                     02F8   560 ;

         0C A6            00'    D0  02F8   561 90$:	MOVL	S^#PSL$C_USER,ACMODE(R6) ;INIT ACMODE PARAMETER

         14 A6         74 A6     DE  02FC   562 	MOVAL	GSDNAMSIZ(R6),GSDNAM(R6) ;ADR OF GLOBAL SECTION NAME DESCRIPTOR

         18 A6         F8 A6     DE  0301   563 	MOVAL	IDMATCHCTL(R6),IDENT(R6) ;ADR OF GBL SECTION MATCH CONTROL

   80000000 8F         D8 A6     C3  0306   564 	SUBL3	CTLBASADR(R6),#^X80000000,CTLBASCNT(R6) ;NO OF BYTES IN SHELL

                       D4 A6         030E       

                          01C4   31  0310   565 	BRW	NXTISDADR		;GET ADDRESS OF FIRST ISD

                                     0313   566 ;

                                     0313   567 ; SET UP CONTEXT FOR MAPPING OR CREATING GLOBAL SECTIONS FOR SHARABLE KNOWN FILE

                                     0313   568 ;

                                     0313   569 KFI_SHARED:

                       B8 A6     D5  0313   570 	TSTL	KFINAMSTR(R6)		;GLOBAL SECTION NAME INITIALIZED?

                          22     12  0316   571 	BNEQ	20$			;BRANCH IF YES

                          0300   30  0318   572 	BSBW	KFI_GBLSECNMINI		;NO, INIT THE NAME STRING

         C8 A6            01     D0  031B   573 	MOVL	#ISD$K_MATEQU,KFIMATCHCTL(R6) ;ASSUME MATCH EQUAL, NOT LINKABLE IMG

         CC A6         18 A5     D0  031F   574 	MOVL	FAB$L_CTX(R5),KFIMATCHCTL+4(R6) ;IDENT = KFIADR ! SEQUENCE NO.

         58 A6            05     E1  0324   575 	BBC	#IAC_V_LIM,IACFLG(R6),20$ ;BRANCH IF NOT LINKABLE IMAGE

                          11         0328       

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  13

0352            IMAGE ACTIVATOR                                                                                                  (1)



                       CC A6     D4  0329   576 	CLRL	KFIMATCHCTL+4(R6)	;ASSUME MATCH ALWAYS FOR LINKABLE IMAGE

                          18     EF  032C   577 	EXTZV	#IHD$V_MATCHCTL,#IHD$S_MATCHCTL,- ;GET MATCH CONTROL

         5C A6            03         032E   578 		LNKFLAGS(R6),KFIMATCHCTL(R6) ;FROM LINK FLAGS

                       C8 A6         0331       

                          05     13  0333   579 	BEQL	20$			;BRANCH IF MATCH ALWAYS

                                     0335   580 ;

                                     0335   581 ; IDENT LONG WORD MAY BE INFERRED AS PRESENT IF THE LNKFLAGS CONTAIN

                                     0335   582 ; AN NON-ZERO MATCHCTL FIELD.

                                     0335   583 ;

         CC A6         24 A4     D0  0335   584 	MOVL	IHD$L_IDENT(R4),KFIMATCHCTL+4(R6) ;GET VALUE TO COMPARE

                          0300   30  033A   585 20$:	BSBW	KFI_GBLSECNMNXT		;FORM NEXT GLOBAL SECTION NAME

                       70 A6     B6  033D   586 	INCW	GBLSECCNT(R6)		;UPDATE THE SECTION NUMBER

         10 A6            01     A8  0340   587 	BISW	#SEC$M_GBL,FLAGS(R6)	;FORCE GLOBAL SECTION

         F8 A6         C8 A6     7D  0344   588 	MOVQ	KFIMATCHCTL(R6),IDMATCHCTL(R6) ;SET GBL SEC MATCH CONTROL

                          09     E1  0349   589 	BBC	#KFI$V_IS_SHARED,KFIFLG(R6),- ;IF NOT ALREADY SET UP AS SHARED

            4D         5A A6         034B   590 		PROCESS_SEC		;CREATE THE SECTIONS NOW

                          0127   31  034E   591 	BRW	KFI_GLOBAL_SEC		;OTHERWISE JUST MAP THE SECTION

                                     0351   592 

                                     0351   593 IMGACT_RET2:

                          0291   31  0351   594 	BRW	IMGACT_ERREXIT

                                     0354   595 

                                     0354   596 ;

                                     0354   597 ; PROCESS THE NEXT IMAGE SECTION DESCRIPTOR

                                     0354   598 ; R3 = ISD ADDRESS

                                     0354   599 ; NOTE THAT IF NOT ACTUALLY ACTIVATING IMAGE (SEE HDRBUF PARAMETER DESCRIPTION),

                                     0354   600 ; THE INADR PARAMETER TO CRETVA, CRMPSC, OR MGBLSC IS 0.  THIS WILL RESULT

                                     0354   601 ; IN AN ACCESS VIOLATION RETURN FROM ALL OF THE ABOVE EXCEPT IN THE SPECIAL

                                     0354   602 ; CASE OF A CRMPSC OF A PERMANENT GLOBAL SECTION.

                                     0354   603 ;

                                     0354   604 NXTISD:

            52         02 A3     3C  0354   605 	MOVZWL	ISD$W_PAGCNT(R3),R2	;NUMBER OF PAGES IN THIS SECTION

            52            09     9C  0358   606 	ROTL	#9,R2,R1		;CONVERT TO NUMBER OF BYTES

                          51         035B       

         04 A3            09     78  035C   607 	ASHL	#9,ISD$L_VPNPFC(R3),R0	;STARTING VIRTUAL ADDRESS OF SECTION

                          50         0360       

            50            00'    E1  0361   608 	BBC	S^#VA$V_P1,R0,10$	;IF P1 SPACE ADDRESS

                          04         0364       

            50         D4 A6     C2  0365   609 	SUBL	CTLBASCNT(R6),R0	;THEN BIAS BY SIZE OF "SHELL"

            51            7140   9E  0369   610 10$:	MOVAB	-(R1)[R0],R1		;ENDVA = STARTVA+COUNT-1

         34 A6            50     7D  036D   611 	MOVQ	R0,STARTVA(R6)		;SET RANGE TO CREATE

            50         08 A3     3C  0371   612 	MOVZWL	ISD$L_FLAGS(R3),R0	;SECTION FLAGS

                       F0 8F     8B  0375   613 	BICB3	#^C<ISD$M_GBL ! ISD$M_CRF ! - ;GET GLOBAL, COPY ON REFERENCE

                                     0378   614 		ISD$M_DZRO ! ISD$M_WRT>, - ;DEMAND ZERO AND WRITABLE BITS

         10 A6            50         0378   615 		R0,FLAGS(R6)		;FROM SECTION FLAGS

                                     037B   616 

                                     037B   617 	ASSUME	SEC$V_SYSGBL GT SEC$V_PERM

                                     037B   618 	ASSUME	SEC$V_PERM GE 8

                                     037B   619 	ASSUME	SEC$V_SYSGBL LE 15

         11 A6         C0 8F     90  037B   620 	MOVB	#<SEC$M_SYSGBL ! -	;IF THE SECTIONS ARE GLOBAL

                                     0380   621 		SEC$M_PERM>@-8,FLAGS+1(R6) ;THEN THEY ARE SYSTEM WIDE, PERMANENT

                                     0380   622 

                                     0380   623 	ASSUME	SEC$V_GBL EQ 0

            4F            50     E8  0380   624 	BLBS	R0,GLOBAL_SEC		;BRANCH IF GLOBAL SECTION

            50            02     E1  0383   625 	BBC	#SEC$V_DZRO,R0,15$	;BRANCH IF NOT DEMAND ZERO

                          03         0386       

                          0128   31  0387   626 	BRW	DZRO_SEC		;DEMAND ZERO ISD

                                     038A   627 

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  14

0352            IMAGE ACTIVATOR                                                                                                  (1)



                                     038A   628 ;

                                     038A   629 ; CRF SECTIONS ARE GLOBAL FOR LINKABLE IMAGES, BUT NOT FOR NORMAL SHARED IMAGES

                                     038A   630 ;

            50            01     E1  038A   631 15$:	BBC	#SEC$V_CRF,R0,20$	;BRANCH IF NOT COPY ON REFERENCE

                          05         038D       

         58 A6            05     E1  038E   632 	BBC	#IAC_V_LIM,IACFLG(R6),PROCESS_SEC ;BRANCH IF NOT LINKABLE IMAGE

                          08         0392       

         5A A6            02     E1  0393   633 20$:	BBC	#KFI$V_KP_SHARED,KFIFLG(R6),PROCESS_SEC ;BRANCH IF SHARED

                          03         0397       

                          FF78   31  0398   634 	BRW	KFI_SHARED

                                     039B   635 ;

                                     039B   636 ; PROCESS IMAGE SECTION DESCRIPTOR

                                     039B   637 ;

                                     039B   638 PROCESS_SEC:

         24 A6            52     D0  039B   639 	MOVL	R2,PAGCNT(R6)		;AND SIZE OF SECTION IN PAGES

         28 A6         0C A3     D0  039F   640 	MOVL	ISD$L_VBN(R3),VBN(R6)	;FILE VIRTUAL BLOCK NUMBER

         58 A6            02     E0  03A4   641 	BBS	#IAC_V_XLINKER,IACFLG(R6),10$ ;IGNORE PFC IF CROSS LINKER

                          05         03A8       

         30 A6         07 A3     9A  03A9   642 	MOVZBL	ISD$B_PFC(R3),PFC(R6)	;PAGE FAULT CLUSTER

            66            0C     D0  03AE   643 10$:	MOVL	#CRMPSC$_NARGS,ARGCNT(R6) ;SET THE ARGUMENT COUNT

                                     03B1   644 20$:	$CRMPSC_G (R6)			;AND CREATE AND MAP THE PROCESS SECTION

   00000000'GF            66     FA  03B1       		CALLG	(R6),G^SYS$CRMPSC

            14            50     E8  03B8   645 	BLBS	R0,NXTISDADR1		;BRANCH IF SUCCESSFUL

         10 A6            00     E4  03BB   646 	BBSC	#SEC$V_GBL,FLAGS(R6),30$ ;BRANCH IF TRYING TO CREATE GLOBAL

                          06         03BF       

                                     03C0   647 

                                     03C0   648 	ASSUME	IAC_V_NOACT EQ 0

            8D         58 A6     E9  03C0   649 	BLBC	IACFLG(R6),IMGACT_RET2	;ERROR UNLESS NOT ACTUALLY ACTIVATING

                          09     11  03C4   650 	BRB	NXTISDADR1		;OTHERWISE JUST IGNORE THE ERROR

                                     03C6   651 ;

                                     03C6   652 ; FAILED TO CREATE A GLOBAL SECTION, IF REALLY ACTIVATING AN IMAGE, TRY

                                     03C6   653 ; TO CREATE AND MAP A PROCESS SECTION INSTEAD.

                                     03C6   654 ;

         58 A6         40 8F     88  03C6   655 30$:	BISB	#IAC_M_NOTSHARED,IACFLG(R6) ;DON'T SET IS_SHARED

                                     03CB   656 

                                     03CB   657 	ASSUME	IAC_V_NOACT EQ 0

            E2         58 A6     E9  03CB   658 	BLBC	IACFLG(R6),20$		;UNLESS NOT ACTUALLY ACTIVATING,

                                     03CF   659 					;TRY CREATING PROCESS SECTION

                                     03CF   660 NXTISDADR1:

                          0105   31  03CF   661 	BRW	NXTISDADR

                                     03D2   662 ;

                                     03D2   663 ; GLOBAL IMAGE SECTION DESCRIPTOR

                                     03D2   664 ;

                                     03D2   665 GLOBAL_SEC:

                                     03D2   666 ;

                                     03D2   667 ; MAKE SURE THAT THERE CAN BE NO CREATION OR DELETION OF GLOBAL SECTIONS

                                     03D2   668 ; FOR THE KNOWN FILES AT THIS POINT.  OTHERWISE IT WOULD BE POSSIBLE TO

                                     03D2   669 ; MAP A SECTION FROM ONE KNOWN FILE AND THE SUPPOSEDLY RELATED SECTION(S)

                                     03D2   670 ; FROM ANOTHER.

                                     03D2   671 ;

   00000000'9F            00'    E0  03D2   672 	BBS	S^#RND$V_IACLOCK,@#CTL$GL_RUNDNFLG,10$ ;BRANCH IF ALREADY LOCKED

                          0B         03D9       

         64 A6   00000059'EF     9E  03DA   673 	MOVAB	SET_ACTIVE_LCK,KRNLROUT(R6) ;CALL THE LOCK ROUTINE

                          0381   30  03E2   674 	BSBW	CMKRNL			;IN KERNEL MODE

                       FC A6     D4  03E5   675 10$:	CLRL	IDMATCHCTL+4(R6)	;ASSUME NO IDENT SPECIFIED

                                     03E8   676 

                                     03E8   677 	ASSUME	ISD$K_MATALL EQ 0

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  15

0352            IMAGE ACTIVATOR                                                                                                  (1)



                          04     EF  03E8   678 	EXTZV	#ISD$V_MATCHCTL,#ISD$S_MATCHCTL,- ;GET MATCH CONTROL FIELD

            50            03         03EA   679 		R0,IDMATCHCTL(R6)	;FROM ISD FLAGS

                       F8 A6         03EC       

                          13     13  03EE   680 	BEQL	20$			;BRANCH IF NO IDENT SPECIFIED

         FC A6         10 A3     D0  03F0   681 	MOVL	ISD$L_IDENT(R3),IDMATCHCTL+4(R6) ;SET DESIRED SECTION IDENT

            03         F8 A6     D1  03F5   682 	CMPL	IDMATCHCTL(R6),#ISD$K_MATNEV ;IF MATCH NEVER,

                          08     19  03F9   683 	BLSS	20$

            50       0000'8F     3C  03FB   684 	MOVZWL	#SS$_NOSUCHSEC,R0	;THEN ASSUME "NO SUCH SECTION"

                          008F   31  0400   685 	BRW	GBL_SEC_MATNEV		;AND GO MAP A PRIVATE COPY IF PRESENT

            51         14 A3     9E  0403   686 20$:	MOVAB	ISD$T_GBLNAM(R3),R1	;ADDRESS OF GLOBAL SECTION NAME IN ISD

            50            81     9A  0407   687 	MOVZBL	(R1)+,R0		;SIZE OF COUNTED STRING

            51            50     C1  040A   688 	ADDL3	R0,R1,R2		;ADDRESS OF LAST+1 BYTE

                          52         040D       

                                     040E   689 ;

                                     040E   690 ; THE FORMAT OF THE GLOBAL SECTION NAME IS UP TO 11 CHARACTERS OF NAME

                                     040E   691 ; FOLLOWED BY "_001" FOR THE FIRST GLOBAL ISD FROM THAT LINKABLE IMAGE.

                                     040E   692 ; ALL GLOBAL ISD'S FOR A GIVEN LINKABLE IMAGE ARE IN NUMERIC ORDER AND

                                     040E   693 ; DENSE IN THAT NO OTHER GLOBAL ISD'S CAN INTERVENE.

                                     040E   694 ;

                          72     DD  040E   695 	PUSHL	-(R2)			;SAVE "_00n" FROM END

            6E   3130305F 8F     D1  0410   696 	CMPL	#^A/_001/,(SP)		;FIRST GLOBAL ISD FOR THIS LINKABLE IMAGE?

                          2F     12  0417   697 	BNEQ	40$			;BRANCH IF NOT, ALREADY TRANSLATED

         34 A6            01     C3  0419   698 	SUBL3	#1,STARTVA(R6),RETENDVA(R6) ;SAVE STARTING VA FOR FIRST

                       40 A6         041D       

                                     041F   699 					;SECTION WHERE SUBSEQUENT SECTIONS

                                     041F   700 					;STORE IT IF "LAST CLUSTER"

            52         B4 A6     9E  041F   701 	MOVAB	LIMNAMSIZ+4(R6),R2	;ADR OF 2ND LONG WORD OF STRING DESCRIPTOR

            62         9C A6     9E  0423   702 	MOVAB	LIMNAMSTR(R6),(R2)	;SET UP STRING DESCRIPTOR

            72            14     9A  0427   703 	MOVZBL	#20,-(R2)		;WITH ADDRESS AND SIZE

            50            04     C2  042A   704 	SUBL	#4,R0			;STRIP OFF THE "_001"

         74 A6            50     7D  042D   705 	MOVQ	R0,GSDNAMSIZ(R6)	;SET DESCRIPTOR OF LINKABLE IMAGE NAME

            51         74 A6     9E  0431   706 	MOVAB	GSDNAMSIZ(R6),R1	;ADDRESS OF NAME DESCRIPTOR

                                     0435   707 ;

                                     0435   708 ; SEE IF THE NAME WITH "LIB$" TACKED ON THE FRONT AND THE "_001" STRIPPED

                                     0435   709 ; OFF THE BACK WILL TRANSLATE.  USE THE RESULT AS THE GLOBAL SECTION NAME

                                     0435   710 ; WITH THE "_00n" APPENDED.

                                     0435   711 ;

                          53     DD  0435   712 	PUSHL	R3			;SAVE ISD ADDRESS

                          0223   30  0437   713 	BSBW	IAC$TRNGBLSEC		;TRANSLATE GLOBAL SECTION NAME

                          08     BA  043A   714 	POPR	#^M<R3>			;RECOVER ISD ADDRESS

         04 B2         5F 8F     91  043C   715 	CMPB	#^A/_/,@4(R2)		;GOT A LEADING "_"?

                          05     12  0441   716 	BNEQ	40$			;BRANCH IF NOT

                          62     D7  0443   717 	DECL	(R2)			;YES, STRIP IT OFF

                       04 A2     D6  0445   718 	INCL	4(R2)

            50         B0 A6     7D  0448   719 40$:	MOVQ	LIMNAMSIZ(R6),R0	;GET TRANSLATED NAME DESCRIPTOR

            51            50     C1  044C   720 	ADDL3	R0,R1,R2		;FORM ADDRESS TO STORE SUFFIX

                          52         044F       

            62            8E     D0  0450   721 	MOVL	(SP)+,(R2)		;RECOVER SAVED SUFFIX

            50            04     C0  0453   722 	ADDL	#4,R0			;AND COUNT THE ADDITIONAL CHARACTERS

         74 A6            50     7D  0456   723 	MOVQ	R0,GSDNAMSIZ(R6)	;SET GLOBAL SECTION NAME DESCRIPTOR

                                     045A   724 ;

                                     045A   725 ; IF GLOBAL ISD AND "LAST CLUSTER", THEN MAP THE GLOBAL SECTIONS

                                     045A   726 ; ACCORDING TO THEIR ACTUAL SIZES IGNORING THE STARTING VIRTUAL

                                     045A   727 ; PAGE NUMBER(S) AND PAGE COUNT(S) OF THE GLOBAL ISD(S)

                                     045A   728 ;

         08 A3            07     E1  045A   729 	BBC	#ISD$V_LASTCLU,ISD$L_FLAGS(R3),60$ ;BRANCH IF NOT "LAST CLUSTER"

                          19         045E       

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  16

0352            IMAGE ACTIVATOR                                                                                                  (1)



            2F         58 A6     E8  045F   730 	BLBS	IACFLG(R6),GBL_SEC_MATNEV ;DON'T ALTER INADR IF NOT ACTIVATING

                                     0463   731 					;CAN SKIP THE MAP GLOBAL SECTION

         04 A6         3C A6     9E  0463   732 	MOVAB	RETSTARTVA(R6),INADR(R6) ;SWITCH TO ALTERNATE RANGE TO MAP

         08 A6         3C A6     9E  0468   733 	MOVAB	RETSTARTVA(R6),RETADR(R6) ;MUST GET RETURN RANGE MAPPED

         40 A6            01     C1  046D   734 	ADDL3	#1,RETENDVA(R6),RETSTARTVA(R6) ;FIRST PAGE OF NEXT SECTION

                       3C A6         0471       

                                     0473   735 					;IS LAST ADR+1 OF PREVIOUS

            01            1E     9C  0473   736 	ROTL	#30,#1,RETENDVA(R6)	;"INFINITE" ENDVA, USE SECTION SIZE

                       40 A6         0476       

                                     0478   737 60$:					;LAST CLUSTER IS ASSUMED P0 SPACE

                                     0478   738 KFI_GLOBAL_SEC:

            66            07     D0  0478   739 	MOVL	#MGBLSC$_NARGS,ARGCNT(R6) ;SET ARGUMENT COUNT

                                     047B   740 	$MGBLSC_G (R6)			;AND MAP THE GLOBAL SECTION

   00000000'GF            66     FA  047B       		CALLG	(R6),G^SYS$MGBLSC

         08 A3            07     E1  0482   741 	BBC	#ISD$V_LASTCLU,ISD$L_FLAGS(R3),10$ ;IF NOT LAST CLUSTER

                          08         0486       

                                     0487   742 					;LEAVE INADR, RETADR ALONE

                                     0487   743 					;SAVES 2 STORES ON NORMAL PATH

                                     0487   744 					;REQUIRED IF NOT ACTIVATING

         04 A6         34 A6     9E  0487   745 	MOVAB	STARTVA(R6),INADR(R6)	;BACK TO STANDARD INPUT RANGE

                       08 A6     D4  048C   746 	CLRL	RETADR(R6)		;NO OTHER PATHS USE RETADR

            45            50     E8  048F   747 10$:	BLBS	R0,NXTISDADR		;BRANCH IF SUCCESSFUL

                                     0492   748 GBL_SEC_MATNEV:

                                     0492   749 

                                     0492   750 	ASSUME	IAC_V_NOACT EQ 0

            41         58 A6     E8  0492   751 	BLBS	IACFLG(R6),NXTISDADR	;SUCCESSFUL IF NOT ACTIVATING

                       0C A3     D5  0496   752 	TSTL	ISD$L_VBN(R3)		;IF SECTION IS PRESENT IN THE IMAGE FILE

                          14     13  0499   753 	BEQL	IMGACT_RET3

         10 A6            01     AA  049B   754 	BICW	#SEC$M_GBL,FLAGS(R6)	;THEN USE THAT COPY RATHER THAN QUIT

         10 A6            03     E1  049F   755 	BBC	#SEC$V_WRT,FLAGS(R6),10$ ;IF TRIED TO MAP A WRITABLE GLOBAL SECTION

                          04         04A3       

         10 A6            02     A8  04A4   756 	BISW	#SEC$M_CRF,FLAGS(R6)	;THEN MUST BE COPY ON REFERENCE PROCESS SECTION

            52         02 A3     3C  04A8   757 10$:	MOVZWL	ISD$W_PAGCNT(R3),R2	;GET SECTION PAGE COUNT

                          FEEC   31  04AC   758 	BRW	PROCESS_SEC

                                     04AF   759 IMGACT_RET3:

                          0133   31  04AF   760 	BRW	IMGACT_ERREXIT

                                     04B2   761 ;

                                     04B2   762 ; DEMAND ZERO PRIVATE SECTION, R1 = ENDVA

                                     04B2   763 ;

                                     04B2   764 DZRO_SEC:

         0B A3         FD 8F     91  04B2   765 	CMPB	#ISD$K_USRSTACK,ISD$B_TYPE(R3) ;IF THIS IS THE USER STACK ISD

                          0D     12  04B7   766 	BNEQ	110$

            51            01     C1  04B9   767 	ADDL3	#1,R1,USRSTACKADR(R6)	;SAVE ADDRESS OF TOP OF STACK

                       EC A6         04BC       

         34 A6   00000000'EF     C2  04BE   768 	SUBL	SGN$GL_EXUSRSTK,STARTVA(R6) ;GIVE HIM THE EXTRA STACK PAGES

            66            03     D0  04C6   769 110$:	MOVL	#CRETVA$_NARGS,ARGCNT(R6) ;SET THE ARGUMENT COUNT

                                     04C9   770 	$CRETVA_G (R6)			;AND CREATE THE DEMAND ZERO PAGES

   00000000'GF            66     FA  04C9       		CALLG	(R6),G^SYS$CRETVA

            04            50     E8  04D0   771 	BLBS	R0,NXTISDADR		;BRANCH IF CREATE SUCCEEDED

                                     04D3   772 

                                     04D3   773 	ASSUME	IAC_V_NOACT EQ 0

            D8         58 A6     E9  04D3   774 	BLBC	IACFLG(R6),IMGACT_RET3	;ERROR IF ACTIVATING IMAGE

                                     04D7   775 					;SUCCESSFUL IF NOT ACTIVATING IMAGE

                                     04D7   776 

                                     04D7   777 NXTISDADR:

            50            63     3C  04D7   778 	MOVZWL	ISD$W_SIZE(R3),R0	;USE THE SIZE OF THIS ISD

            53            50     C0  04DA   779 	ADDL	R0,R3			;TO FORM THE ADDRESS OF THE NEXT ONE

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  17

0352            IMAGE ACTIVATOR                                                                                                  (1)



                                     04DD   780 

                                     04DD   781 	.ENABL	LSB

                                     04DD   782 

                                     04DD   783 CHKISD:

         D0 A6            53     C3  04DD   784 	SUBL3	R3,BUFEND(R6),R2	;SPACE LEFT IN BUFFER

                          52         04E1       

                          21     15  04E2   785 	BLEQ	BADIMGHDR1		;ERROR IF AT OR OFF THE END

            50            63     32  04E4   786 	CVTWL	ISD$W_SIZE(R3),R0	;SIZE OF THIS ISD

                          46     13  04E7   787 	BEQL	END_OF_ISDS		;IF ZERO THEN ALL DONE

                          25     19  04E9   788 	BLSS	NXTHDRADR		;IF NEGATIVE THEN GET NEXT HEADER BLOCK

            52            50     D1  04EB   789 	CMPL	R0,R2			;DOES ISD FIT IN THIS BUFFER?

                          15     14  04EE   790 	BGTR	BADIMGHDR1		;ERROR IF NOT

            0C            50     D1  04F0   791 	CMPL	R0,#ISD$K_LENDZRO	;AT LEAST AS BIG AS SMALLEST ISD?

                          10     19  04F3   792 	BLSS	BADIMGHDR1		;ERROR IF NOT

                                     04F5   793 	ASSUME	SEC$V_GBL EQ 0

                                     04F5   794 	ASSUME	SEC$V_DZRO EQ 2

                                 8B  04F5   795 	BICB3	#^C<SEC$M_GBL ! SEC$M_DZRO>,-

         08 A3         FA 8F         04F6   796 		ISD$L_FLAGS(R3),R1	;GET GBL AND DZRO BITS

                          51         04FA       

                          0B     13  04FB   797 	BEQL	120$			;BRANCH IF NOT GBL AND NOT DZRO

            0D            51     E9  04FD   798 	BLBC	R1,140$			;BRANCH IF NOT GBL BUT DZRO

                                     0500   799 ;

                                     0500   800 ; GLOBAL ISD

                                     0500   801 ;

            24            50     D1  0500   802 115$:	CMPL	R0,#ISD$K_LENGLBL	;RIGHT LENGTH FOR GLOBAL ISD?

                          08     13  0503   803 	BEQL	140$			;BRANCH IF OK

                                     0505   804 BADIMGHDR1:

                          FD3A   31  0505   805 	BRW	BADIMGHDR		;IMAGE HEADER IS BAD FORMAT

                                     0508   806 ;

                                     0508   807 ; PROCESS SECTION ISD

                                     0508   808 ;

            10            50     D1  0508   809 120$:	CMPL	R0,#ISD$K_LENPRIV	;RIGHT LENGTH FOR PROCESS ISD?

                          F3     12  050B   810 	BNEQ	115$			;GLOBAL LENGTH IS OK TOO

                                     050D   811 

                          FE44   31  050D   812 140$:	BRW	NXTISD			;GO PROCESS THIS ISD

                                     0510   813 

                                     0510   814 	.DSABL	LSB

                                     0510   815 

                                     0510   816 ;

                                     0510   817 ; MORE ISD'S IN THE NEXT HEADER BLOCK

                                     0510   818 ;

                                     0510   819 NXTHDRADR:

                       DC A6     D7  0510   820 	DECL	HDRBLKCNT(R6)		;ANY MORE HEADER BLOCKS?

                          F0     15  0513   821 	BLEQ	BADIMGHDR1		;ERROR IF NOT

            53       0114 C6     DE  0515   822 	MOVAL	OTHERHDR(R6),R3		;ADDRESS OF BUFFER FOR SUBSEQUENT HEADER BLOCKS

         58 A6            08     8A  051A   823 	BICB	#IAC_M_KP_RESHDR,IACFLG(R6) ;ONLY SINGLE BLOCK HEADERS MAY BE RESIDENT

                          FC91   31  051E   824 	BRW	NXTHDR			;READ THE NEXT HEADER BLOCK

                                     0521   825 ;

                                     0521   826 ; NOT ACTIVATING THE IMAGE, JUST COMPLETE THE KNOWN FILE ENTRY ENHANCEMENT

                                     0521   827 ; AND RETURN AN ACCESS VIOLATION

                                     0521   828 ;

                                     0521   829 NOACT:

         64 A6       07B5'CF     DE  0521   830 	MOVAL	W^KFI_MAK_SHR_RES,KRNLROUT(R6) ;SET ROUTINE TO CALL

                          023C   30  0527   831 	BSBW	CMKRNL			;FINISH KNOWN FILE ENHANCEMENTS

                          00'    DD  052A   832 	PUSHL	S^#SS$_ACCVIO		;SET ACCESS VIOLATION STATUS

                          00BB   31  052C   833 	BRW	IMGACT_ERREXIT1		;AND EXIT WITH ACCESS VIOLATION STATUS

                                     052F   834 END_OF_ISDS:

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  18

0352            IMAGE ACTIVATOR                                                                                                  (1)



         F0 A6            53     7D  052F   835 	MOVQ	R3,IOSB(R6)		;SAVE ADR OF END AND BEGIN OF HEADER

                                     0533   836 					;IN CASE IT IS BEING MADE RESIDENT

                                     0533   837 

                                     0533   838 	ASSUME	IAC_V_NOACT EQ 0

            EA         58 A6     E8  0533   839 	BLBS	IACFLG(R6),NOACT	;BRANCH IF NOT ACTIVATING THE IMAGE

         58 A6            02     E1  0537   840 	BBC	#IAC_V_XLINKER,IACFLG(R6),150$ ;BRANCH IF NOT CROSS LINKER FORMAT

                          26         053B       

                                     053C   841 ;

                                     053C   842 ; THIS IS A CROSS LINKER HEADER, MAKE IT INTO A NATIVE MODE FORMAT

                                     053C   843 ;

         02 A4            10     B0  053C   844 	MOVW	#IHX$T_IMGNAM,IHD$W_ACTIVOFF(R4) ;FORM A NATIVE MODE HEADER

         10 A4         04 A4     7D  0540   845 	MOVQ	IHX$Q_STARTADR(R4),IHX$T_IMGNAM(R4) ;MOVE THE START ADDRESS VECTOR

                       04 A4     7C  0545   846 	CLRQ	IHD$W_SYMDBGOFF(R4)	;CLEAR THE OFFSETS TO OTHER AREAS

                       18 A4     7C  0548   847 	CLRQ	IHX$T_IMGNAM+8(R4)

            64            28     B0  054B   848 	MOVW	#IHX$L_DSTVBN,IHD$W_SIZE(R4) ;ASSUME JUST TRANSFER ADDRESSES PRESENT

       3130 8F         0E A4     B1  054E   849 	CMPW	IHD$W_MINORID(R4),#IHX$K_MINORID1 ;DEBUG DATA TOO?

                          0C     19  0554   850 	BLSS	150$			;BRANCH IF NOT

         18 A4         34 A4     D0  0556   851 	MOVL	IHX$L_TFRADR3(R4),IHX$T_IMGNAM+8(R4) ;STORE 3RD TRANSFER ADDRESS

         04 A4            64     B0  055B   852 	MOVW	IHD$W_SIZE(R4),IHD$W_SYMDBGOFF(R4) ;SYMBOL TABLE AREA OFFSET

            64            0C     A0  055F   853 	ADDW	#12,IHD$W_SIZE(R4)	;ADJUST SIZE

                                     0562   854 ;

                                     0562   855 ; BIAS ANY P1 TRANSFER ADDRESSES

                                     0562   856 ;

         58 A6            04     E0  0562   857 150$:	BBS	#IAC_V_IS_RESHDR,IACFLG(R6),180$ ;IF RESIDENT HEADER, ALREADY DONE

                          1A         0566       

            53         02 A4     3C  0567   858 	MOVZWL	IHD$W_ACTIVOFF(R4),R3	;OFFSET TO TRANSFER VECTOR

            53            54     C0  056B   859 	ADDL	R4,R3			;ADDRESS OF TRANSFER VECTOR

            52            03     D0  056E   860 	MOVL	#3,R2			;NUMBER OF TRANSFER ADDRESSES

                                     0571   861 

            83            1F'    9C  0571   862 160$:	ROTL	S^#<31-VA$V_P1>,(R3)+,R0 ;P1 BIT TO SIGN BIT

                          50         0574       

                          0A     13  0575   863 	BEQL	180$			;BRANCH IF NULL VECTOR, NO MORE TO DO

                          05     14  0577   864 	BGTR	170$			;BRANCH IF NOT P1 SPACE

         FC A3         D4 A6     C2  0579   865 	SUBL	CTLBASCNT(R6),-4(R3)	;BIAS THE P1 SPACE ADDRESS

            F0            52     F5  057E   866 170$:	SOBGTR	R2,160$			;LOOP THROUGH ALL TRANSFER ADDRESSES

            53         0C AC     D0  0581   867 180$:	MOVL	HDRBUF(AP),R3		;ADDRESS OF RETURN BUFFER

                                     0585   868 	IFNOWRT	#512,(R3),IMGACT_ACCVIO1 ;ERROR IF CALLER CANNOT WRITE 512 BYTES

       0200 8F            00     0D  0585       		PROBEW	#0,#512,(R3)

                          63         058A       

                          55     13  058B       		BEQL	IMGACT_ACCVIO1

            50            64     3C  058D   869 	MOVZWL	(R4),R0			;SIZE OF IMAGE HEADER DESCRIPTOR

            83         08 A3     9E  0590   870 	MOVAB	8(R3),(R3)+		;SET ADR OF IHD IN BUFFER

            83         04 A340   9E  0594   871 	MOVAB	4(R3)[R0],(R3)+		;SET ADR OF IFD IN BUFFER

            64            50     28  0599   872 	MOVC3	R0,(R4),(R3)		;MOVE THE IMAGE HEADER DESCRIPTOR

                          63         059C       

                                     059D   873 ;

                                     059D   874 ; R3 CONTAINS THE ADDRESS OF THE NEXT BYTE NOT STORED INTO

                                     059D   875 ;

            50            14     D0  059D   876 	MOVL	#IFD$K_LENGTH,R0	;SIZE OF IMAGE FILE DESCRIPTOR

                                     05A0   877 					;IF NO RESULTANT STRING

            51         7C A6     9A  05A0   878 	MOVZBL	RSLTNAME(R6),R1		;SIZE OF RESULTANT STRING

                          0E     13  05A4   879 	BEQL	200$			;BRANCH IF NULL

            51            04     C0  05A6   880 	ADDL	#4,R1			;ADD COUNT BYTE AND ROUND UP

            51            03     CA  05A9   881 	BICL	#3,R1			;TO LONG WORD BOUNDARY

            50            10     9C  05AC   882 	ROTL	#16,R0,R0		;RESULT NAME OFFSET IN HIGH WORD

                          50         05AF       

            51            14     A1  05B0   883 	ADDW3	#IFD$K_LENGTH,R1,R0	;SIZE OF IFD INCLUDING RESULT STRING

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  19

0352            IMAGE ACTIVATOR                                                                                                  (1)



                          50         05B3       

            83            50     D0  05B4   884 200$:	MOVL	R0,(R3)+		;SIZE AND NAME OFFSET

                          83     D4  05B7   885 	CLRL	(R3)+			;2 RESERVED OFFSETS

            83         20 A6     D0  05B9   886 	MOVL	CHAN(R6),(R3)+		;IMAGE CHANNEL AND COMPAT MODE CHAN

                                     05BD   887 

                                     05BD   888 	ASSUME	IFDFLAGS EQ CMKFIADR+4

            83         50 A6     7D  05BD   889 	MOVQ	CMKFIADR(R6),(R3)+	;COMPAT MODE KNOWN FILE ENTRY ADDRESS

                                     05C1   890 					;AND IMAGE FILE DESCRIPTOR FLAGS

         7C A6            51     28  05C1   891 	MOVC3	R1,RSLTNAME(R6),(R3)	;MOVE THE RESULTANT NAME STRING

                          63         05C5       

         64 A6       077E'CF     DE  05C6   892 	MOVAL	W^SETCTLREG,KRNLROUT(R6) ;SET UP USER STACK, PROCESS PRIVILEGES,

                          0197   30  05CC   893 	BSBW	CMKRNL			;AND RELEASE KNOWN FILE ENTRY

                          00'    DD  05CF   894 	PUSHL	S^#SS$_NORMAL		;SAVE SUCCESSFUL COMPLETION INDICATION

                                     05D1   895 IMGACT_EXIT:

                                     05D1   896 	$CRETVA_S INADR=-8(FP),-	;MAKE IMAGE ACTIVATOR SCRATCH PAGES

                                     05D1   897 		ACMODE=S^#PSL$C_USER	;DEMAND ZERO AGAIN

                          00'    DD  05D1       		PUSHL	S^#PSL$C_USER

                          00     DD  05D3       		PUSHL	#0

                       F8 AD     7F  05D5       		PUSHAQ	-8(FP)

   00000000'GF            03     FB  05D8       		CALLS	#3,G^SYS$CRETVA

                          01     BA  05DF   898 	POPR	#^M<R0>			;RECOVER STATUS CODE

                                 04  05E1   899 	RET				;AND RETURN

                                     05E2   900 

                                     05E2   901 IMGACT_ACCVIO1:

            50            00'    3C  05E2   902 	MOVZWL	S^#SS$_ACCVIO,R0	;ACCESS VIOLATION

                                     05E5   903 IMGACT_ERREXIT:

                          50     DD  05E5   904 	PUSHL	R0			;SAVE ERROR STATUS

                          0172   30  05E7   905 	BSBW	KFI_DECREF		;RELEASE KNOWN FILE ENTRY IF ANY

                                     05EA   906 ;

                                     05EA   907 ; 0(SP) = ERROR STATUS

                                     05EA   908 ;

                                     05EA   909 IMGACT_ERREXIT1:

            52         20 A6     D0  05EA   910 	MOVL	CHAN(R6),R2		;GET BOTH CHANNELS

                          52     B5  05EE   911 	TSTW	R2			;FIRST CHANNEL ASSIGNED?

                          0C     13  05F0   912 	BEQL	20$			;BRANCH IF NOT

                                     05F2   913 10$:	$DASSGN_S R2			;DEASSIGN THE CHANNEL

            7E            52     3C  05F2       		MOVZWL	R2,-(SP)

   00000000'GF            01     FB  05F5       		CALLS	#1,G^SYS$DASSGN

                          52     B4  05FC   914 	CLRW	R2			;THIS CHANNEL IS DEASSIGNED

            52            10     9C  05FE   915 20$:	ROTL	#16,R2,R2		;GET SECOND CHANNEL IF ANY

                          52         0601       

                          EE     12  0602   916 	BNEQ	10$			;BRANCH IF ANOTHER TO DEASSIGN

                                     0604   917 

                                     0604   918 	ASSUME	IAC_V_RETRY EQ 8

            0D         59 A6     E8  0604   919 	BLBS	IACFLG+1(R6),30$	;BRANCH IF SUPPOSED TO RETRY

         64 A6   00000080'EF     9E  0608   920 	MOVAB	IAC$CLRIACLOCK,KRNLROUT(R6) ;CLEAR IMAGE ACTIVATOR LOCK

                          0153   30  0610   921 	BSBW	CMKRNL			;IF ONE WAS SET

                          BC     11  0613   922 	BRB	IMGACT_EXIT		;AND EXIT

            5E            5D     D0  0615   923 30$:	MOVL	FP,SP			;RESET THE STACK FRAME

                          F9E7   31  0618   924 	BRW	EXE$IMGACT+2		;AND RESTART THE SERVICE FROM THE BEGINNING

                                     061B   925 	.SBTTL	KFI_GBLSECNMINI, KFI_GBLSECNMNXT, IAC$TRNGBLSEC

                                     061B   926 ;

                                     061B   927 ; KFI_GBLSECNMINI - INITIALIZE KNOW FILE GLOBAL SECTION NAME STRING

                                     061B   928 ;

                                     061B   929 ; CALLING SEQUENCE:

                                     061B   930 ;

                                     061B   931 ;	BSBW	KFI_GBLSECNMINI

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  20

0352            KFI_GBLSECNMINI, KFI_GBLSECNMNXT, IAC$TRNGBLSEC                                                                  (1)



                                     061B   932 ;

                                     061B   933 ; INPUTS:

                                     061B   934 ;

                                     061B   935 ;	R6 = ADDRESS OF IMAGE ACTIVATOR SCRATCH STORAGE

                                     061B   936 ;	R7 = ADDRESS OF KNOWN FILE ENTRY

                                     061B   937 ;

                                     061B   938 ; OUTPUTS:

                                     061B   939 ;

                                     061B   940 ;	R2,R3 PRESERVED

                                     061B   941 ;	KFINAMSTR(R6) = COUNTED ASCII STRING FOR GLOBAL SECTION NAME

                                     061B   942 ;

                                     061B   943 KFI_GBLSECNMINI:

                          3C     BB  061B   944 	PUSHR	#^M<R2,R3,R4,R5>	;SAVE REGISTERS FROM MOVC

            53         B8 A6     9E  061D   945 	MOVAB	KFINAMSTR(R6),R3	;ADDRESS TO STORE GLOBAL SEC NAME STRING

            51         0E A7     9A  0621   946 	MOVZBL	KFI$B_FILNAM(R7),R1	;OFFSET TO KNOWN FILE "FILE NAME" STRING

            51            57     C0  0625   947 	ADDL	R7,R1			;ADDRESS OF FILE NAME STRING

            50            81     9A  0628   948 	MOVZBL	(R1)+,R0		;SIZE OF STRING TO MOVE

            50            04     81  062B   949 	ADDB3	#4,R0,(R3)+		;STORE BYTE COUNT OF GBL SEC NAME STRING

                          83         062E       

                                     062F   950 					;HIGH 24 BITS OF R0 ASSUMED ZERO

            61            50     28  062F   951 	MOVC3	R0,(R1),(R3)		;MOVE THE FILE NAME AND COUNT BYTE

                          63         0632       

            63   3030305F 8F     D0  0633   952 	MOVL	#^A/_000/,(R3)		;STORE SECTION NAME SUFFIX

                          3C     BA  063A   953 	POPR	#^M<R2,R3,R4,R5>	;RESTORE SAVED REGISTERS

                                 05  063C   954 	RSB

                                     063D   955 

                                     063D   956 ;

                                     063D   957 ; KFI_GBLSECNMNXT - FORM THE NEXT KNOWN FILE GLOBAL SECTION NAME BY

                                     063D   958 ;	BY ADDING 1 (IN ASCII) TO THE LAST CHARACTERS OF THE NAME

                                     063D   959 ;

                                     063D   960 ; CALLING SEQUENCE:

                                     063D   961 ;

                                     063D   962 ;	BSBW	KFI_GBLSECNMNXT

                                     063D   963 ;

                                     063D   964 ; INPUTS:

                                     063D   965 ;

                                     063D   966 ;	KFINAMSTR(R6) = COUNTED ASCII GLOBAL SECTION NAME

                                     063D   967 ;

                                     063D   968 ; OUTPUTS:

                                     063D   969 ;

                                     063D   970 ;	R2,R3 PRESERVED

                                     063D   971 ;	GLOBAL SECTION NAME ALTERED TO GET THE "NEXT" NAME

                                     063D   972 ;	GSDNAMSIZ(R6) - GLOBAL SECTION NAME DESCRIPTOR SET UP

                                     063D   973 ;

                                     063D   974 KFI_GBLSECNMNXT:

            51         B8 A6     9E  063D   975 	MOVAB	KFINAMSTR(R6),R1	;ADDRESS OF COUNTED STRING

            50            81     9A  0641   976 	MOVZBL	(R1)+,R0		;SIZE OF STRING

         74 A6            50     7D  0644   977 	MOVQ	R0,GSDNAMSIZ(R6)	;SET GLOBAL SECTION NAME DESCRIPTOR

            51            50     C0  0648   978 	ADDL	R0,R1			;ADDRESS OF LAST+1 BYTE

                          71     96  064B   979 10$:	INCB	-(R1)			;ADD ONE

            39            61     91  064D   980 	CMPB	(R1),#^A/9/		;IN DECIMAL ASCII

                          0A     15  0650   981 	BLEQ	20$			;BRANCH IF NO CARRY

            61            30     90  0652   982 	MOVB	#^A/0/,(R1)		;STORE ZERO AND CARRY A ONE

         FF A1         5F 8F     91  0655   983 	CMPB	#^A/_/,-1(R1)		;NO CARRY PAST THE SEPARATOR

                          EF     12  065A   984 	BNEQ	10$

                                 05  065C   985 20$:	RSB

                                     065D   986 ;

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  21

0352            KFI_GBLSECNMINI, KFI_GBLSECNMNXT, IAC$TRNGBLSEC                                                                  (1)



                                     065D   987 ; IAC$TRNGBLSEC - TRANSLATE GLOBAL SECTION NAME

                                     065D   988 ;

                                     065D   989 ; INPUTS:

                                     065D   990 ;

                                     065D   991 ;	R1 = ADDRESS OF STRING DESCRIPTOR FOR THE GLOBAL SECTION NAME

                                     065D   992 ;		WITHOUT THE SECTION SUFFIX ("_001"), UP TO 11 CHARACTERS

                                     065D   993 ;	R2 = ADDRESS OF OUTPUT STRING DESCRIPTOR

                                     065D   994 ;		THIS STRING BUFFER SHOULD BE AT LEAST 19 BYTES LONG SINCE THE

                                     065D   995 ;		"LIB$" PREFIX MAY BE PRESENT ON THE FRONT OF THE RETURNED

                                     065D   996 ;		STRING AND THE CALLER IS PRESUMABLY GOING TO CONTRUCT

                                     065D   997 ;		A GLOBAL SECTION NAME OF UP TO 15 CHARACTERS FROM THE

                                     065D   998 ;		REMAINDER OF THE RETURNED STRING.

                                     065D   999 ;

                                     065D  1000 ; OUTPUTS:

                                     065D  1001 ;

                                     065D  1002 ;	R0 = SS$_NORMAL IF THE NAME TRANSLATED AT LEAST ONCE.

                                     065D  1003 ;		THE RESULTANT STRING MAY HAVE A LEADING "_".

                                     065D  1004 ;	   = SS$_NOTRAN IF THE NAME FAILED TO TRANSLATE EVEN ONCE.

                                     065D  1005 ;		THE RESULTANT STRING DESCRIPTOR POINTS TO A COPY

                                     065D  1006 ;		OF THE INPUT STRING IN THE OUTPUT STRING BUFFER.

                                     065D  1007 ;	   = LOW BIT CLEAR IF ERROR

                                     065D  1008 ;

                                     065D  1009 IAC$TRNGBLSEC::

            53         04 A1     D0  065D  1010 	MOVL	4(R1),R3		;ADDRESS OF INPUT STRING

                       08 A3     DD  0661  1011 	PUSHL	8(R3)			;CONSTRUCT STRING ON STACK

            7E            63     7D  0664  1012 	MOVQ	(R3),-(SP)		;UP TO 12 CHARACTERS

                                     0667  1013 					;ACTUALLY A 9 CHARACTER FILE NAME

                 2442494C 8F     DD  0667  1014 	PUSHL	#^A/LIB$/		;WITH LIBRARY PREFIX

                                     066D  1015 ;

                                     066D  1016 ; 0(SP) = 16 BYTE NAME STRING

                                     066D  1017 ;

                          5E     DD  066D  1018 	PUSHL	SP			;FORM DESCRIPTOR FOR THE NAME STRING

            61            04     C1  066F  1019 	ADDL3	#4,(R1),-(SP)		;SIZE OF STRING WITH LIBRARY PREFIX

                          7E         0672       

                                     0673  1020 ;

                                     0673  1021 ; 0(SP) = STRING DESCRIPTOR FOR INPUT NAME

                                     0673  1022 ; 24 BYTES ON STACK

                                     0673  1023 ;

            53            5E     D0  0673  1024 	MOVL	SP,R3			;ADDRESS OF INPUT NAME DESCRIPTOR

                          62     DD  0676  1025 	PUSHL	(R2)			;SAVE OUTPUT STRING BUFFER SIZE

                          7E     D4  0678  1026 	CLRL	-(SP)			;COUNT NUMBER OF TRANSLATES ATTEMPTED

            62         04 AE     D0  067A  1027 20$:	MOVL	4(SP),(R2)		;RESTORE OUTPUT STRING BUFFER SIZE

                                     067E  1028 	$TRNLOG_S -			;TRY TO TRANSLATE THE NAME

                                     067E  1029 		LOGNAM=(R3),-		;ADDRESS OF INPUT NAME DESCRIPTOR

                                     067E  1030 		RSLLEN=(R2),-		;RETURN RESULT STRING LENGTH

                                     067E  1031 		RSLBUF=(R2)		;RESULT BUFFER DESCRIPTOR

                          00     DD  067E       		PUSHL	#0

                          00     DD  0680       		PUSHL	#0

                          00     DD  0682       		PUSHL	#0

                          62     7F  0684       		PUSHAQ	(R2)

                          62     3F  0686       		PUSHAW	(R2)

                          63     7F  0688       		PUSHAQ	(R3)

   00000000'GF            06     FB  068A       		CALLS	#6,G^SYS$TRNLOG

            50            00'    D1  0691  1032 	CMPL	S^#SS$_NORMAL,R0	;TRANSLATE SUCCESSFULLY?

                          17     12  0694  1033 	BNEQ	40$			;BRANCH IF NOT

            63            62     7D  0696  1034 	MOVQ	(R2),(R3)		;USE OUTPUT DESCRIPTOR FOR INPUT

         04 B2         5F 8F     91  0699  1035 	CMPB	#^A/_/,@4(R2)		;DO NOT TRANSLATE "THROUGH" THE "_"

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  22

0352            KFI_GBLSECNMINI, KFI_GBLSECNMNXT, IAC$TRNGBLSEC                                                                  (1)



                          24     13  069E  1036 	BEQL	80$

            6E            0A     F2  06A0  1037 	AOBLSS	#10,(SP),20$		;LIMIT THE NUMBER OF TRANSLATES

                          D6         06A3       

            50   00000000'8F     D0  06A4  1038 	MOVL	#RMS$_LNE,R0		;LOGICAL NAME ERROR IF TOO MANY

                          17     11  06AB  1039 	BRB	80$

            50       0000'8F     B1  06AD  1040 40$:	CMPW	#SS$_NOTRAN,R0		;IF STATUS IS "NO TRANSLATION"

                          10     12  06B2  1041 	BNEQ	80$

                          6E     D5  06B4  1042 	TSTL	(SP)			;AND THIS IS THE FIRST TRY

                          05     13  06B6  1043 	BEQL	60$			;THEN RETURN NOTRAN

                                     06B8  1044 					;AND GO TAKE PREFIX OFF RETURN STRING

            50            00'    3C  06B8  1045 	MOVZWL	S^#SS$_NORMAL,R0	;CONVERT NOTRAN TO NORMAL SINCE NOT FIRST

                          07     11  06BB  1046 	BRB	80$

            62            04     C2  06BD  1047 60$:	SUBL	#4,(R2)			;PULL PREFIX OUT OF

         04 A2            04     C0  06C0  1048 	ADDL	#4,4(R2)		;RETURN STRING DESCRIPTOR

            5E            20     C0  06C4  1049 80$:	ADDL	#16+8+8,SP		;REMOVE SCRATCH STORAGE FROM STACK

                                 05  06C7  1050 	RSB				;AND RETURN TO CALLER

                                     06C8  1051 	.SBTTL	KFI_LOCKR, KFI_LOCK_MTX, KFI_INCREF, OPEN_DONE_KRNL

                                     06C8  1052 ;

                                     06C8  1053 ; KERNEL MODE ROUTINE FOR LOCKING THE KNOWN FILE MUTEX FOR READING OR WRITING

                                     06C8  1054 ;	THIS ROUTINE CALLS ITS CALLER AS A COROUTINE SUCH THAT WHEN

                                     06C8  1055 ; THAT ROUTINE RETURNS VIA AN RSB, THE MUTEX IS UNLOCKED AND THIS ROUTINE

                                     06C8  1056 ; THEN RETURNS WITH AN RSB TO THE CALLERS' CALLER.  E.G.

                                     06C8  1057 ;

                                     06C8  1058 ; THIS ROUTINE CALLED VIA BSB

                                     06C8  1059 ;

                                     06C8  1060 ;	...

                                     06C8  1061 ;	...

                                     06C8  1062 ;

                                     06C8  1063 ;	BSBW	KFI_LOCKR

                                     06C8  1064 ;

                                     06C8  1065 ;	OR

                                     06C8  1066 ;

                                     06C8  1067 ;	BSBW	KFI_LOCKW

                                     06C8  1068 ;

                                     06C8  1069 ; PROCESS UNDER THE PROTECTION OF THE WRITE MUTEX

                                     06C8  1070 ;

                                     06C8  1071 ;	...

                                     06C8  1072 ;	...

                                     06C8  1073 ;

                                     06C8  1074 ; RETURN TO UNLOCK MUTEX WITH R0 = STATUS CODE.  RETURN IS THEN MADE

                                     06C8  1075 ; VIA RSB TO THIS ROUTINE'S CALLER.

                                     06C8  1076 ;

                                     06C8  1077 ;	RSB

                                     06C8  1078 ;

                                     06C8  1079 ; CALLING SEQUENCE:

                                     06C8  1080 ;

                                     06C8  1081 ;	BSBW	KFI_LOCKR

                                     06C8  1082 ;	BSBW	KFI_LOCKW

                                     06C8  1083 ;

                                     06C8  1084 ; INPUTS:

                                     06C8  1085 ;

                                     06C8  1086 ;	R4 = PROCESS CONTROL BLOCK ADDRESS

                                     06C8  1087 ;

                                     06C8  1088 KFI_LOCKR:

            52   00000000'EF     DE  06C8  1089 	MOVAL	SCH$LOCKR,R2		;ADDRESS OF LOCK FOR READING ROUTINE

                                     06CF  1090 ;

                                     06CF  1091 ; ENTER HERE WITH R2 = ADDRESS OF LOCK ROUTINE

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  23

0352            KFI_LOCKR, KFI_LOCK_MTX, KFI_INCREF, OPEN_DONE_                                                                  (1)



                                     06CF  1092 ;

                                     06CF  1093 KFI_LOCK_MTX:

                          02     BA  06CF  1094 	POPR	#^M<R1>			;PICK UP RETURN ADDRESS

            50   00000000'EF     DE  06D1  1095 	MOVAL	L^EXE$GL_KFIMTX,R0	;ADDRESS OF KNOWN FILE MUTEX

                          50     DD  06D8  1096 	PUSHL	R0			;SAVE MUTEX ADDRESS

                       E1'AF     DF  06DA  1097 	PUSHAL	B^20$			;CALLER WILL RSB TO HERE

                          51     DD  06DD  1098 	PUSHL	R1			;CALLER'S ADDRESS TO CALL BACK

                          62     17  06DF  1099 	JMP	(R2)			;LOCK THE MUTEX AND RETURN TO

                                     06E1  1100 					;THIS ROUTINE'S CALLER AT IPL=ASTDEL

                                     06E1  1101 ;

                                     06E1  1102 ; UNLOCK THE MUTEX NOW AND RETURN TO CALLER'S CALLER.

                                     06E1  1103 ; R0 = SYSTEM STATUS CODE

                                     06E1  1104 ; R4 = PROCESS CONTROL BLOCK ADDRESS

                                     06E1  1105 ;

                          50     DD  06E1  1106 20$:	PUSHL	R0			;SAVE STATUS CODE

            50         04 AE     D0  06E3  1107 	MOVL	4(SP),R0		;MUTEX ADDRESS

                 00000000'EF     16  06E7  1108 	JSB	SCH$UNLOCK		;UNLOCK THE KNOWN FILE MUTEX

                                     06ED  1109 	SETIPL	#0			;BACK TO IPL 0

            00'           00     DA  06ED       		MTPR	#0,S^#PR$_IPL

                          03     BA  06F0  1110 	POPR	#^M<R0,R1>		;RECOVER STATUS, CLEAN OFF MUTEX ADDRESS

                                 05  06F2  1111 	RSB				;AND RETURN

                                     06F3  1112 ;

                                     06F3  1113 ;	INCREMENT KNOWN FILE ENTRY REFERENCE COUNT THUS LOCKING THE ENTRY FROM

                                     06F3  1114 ; DELETION WHILE IT IS IN USE BY THE IMAGE ACTIVATOR.  IT WILL BE UNLOCKED

                                     06F3  1115 ; AT THE COMPLETION OF THE IMAGE ACTIVATION.  LOCKING THE ENTRY THIS WAY

                                     06F3  1116 ; MAKES IT UNNECESSARY TO HOLD A MUTEX FOR THE ENTIRE IMAGE ACTIVATION, WHICH

                                     06F3  1117 ; WOULD HAVE REQUIRED RUNNING ENTIRELY IN KERNEL MODE.

                                     06F3  1118 ;

                                     06F3  1119 ;	UNDER THE PROTECTION OF THE READ MUTEX THIS ROUTINE VERIFIES THAT

                                     06F3  1120 ; THE KNOWN FILE ENTRY ADDRESS AND THE SEQUENCE NUMBER BITS IN THE LOW BITS

                                     06F3  1121 ; OF THE ADDRESS STILL AGREE.  THE ENTRY MIGHT HAVE BEEN DELETED FROM THE

                                     06F3  1122 ; KNOWN FILE QUEUE AFTER IT WAS FOUND BY THE KNOWN FILE SCAN IN RMS OPEN

                                     06F3  1123 ; BUT BEFORE THE IMAGE ACTIVATOR COULD LOCK THE ENTRY.

                                     06F3  1124 ;

                                     06F3  1125 ;	THE SEQUENCE NUMBER CHECK BEING PERFORMED DEPENDS UPON THE FACT

                                     06F3  1126 ; THAT DELETED ENTRIES ARE PLACED ON A FREE LIST FOR KNOWN FILE ENTRIES

                                     06F3  1127 ; RATHER THAN BEING RELEASED TO DYNAMIC POOL.  THIS IS KEY SINCE ONCE RELEASED

                                     06F3  1128 ; TO POOL, A KNOWN FILE ENTRY COULD BE ALIASED (MALICIOUSLY OR OTHERWISE)

                                     06F3  1129 ; WITH POSSIBLY SERIOUS EFFECTS ON THE IMAGE ACTIVATOR.

                                     06F3  1130 ;

                                     06F3  1131 ; CALLING SEQUENCE:

                                     06F3  1132 ;

                                     06F3  1133 ;	THIS ROUTINE IS INVOKED IN KERNEL MODE AT IPL 0 WITH A JSB INSTRUCTION

                                     06F3  1134 ;

                                     06F3  1135 ; INPUTS:

                                     06F3  1136 ;

                                     06F3  1137 ;	R4 = PCB ADDRESS FROM THE CHANGE MODE TO KERNEL DISPATCHER

                                     06F3  1138 ;	R6 = IMAGE ACTIVATOR CONTEXT AREA ADDRESS

                                     06F3  1139 ;	R7 = KNOWN FILE ENTRY ADDRESS IF NEGATIVE

                                     06F3  1140 ;	R0-R4 MAY BE ALTERED

                                     06F3  1141 ;	R5 MUST BE PRESERVED

                                     06F3  1142 ;

                                     06F3  1143 KFI_INCREF:

                          D3     10  06F3  1144 	BSBB	KFI_LOCKR		;COROUTINE CALL TO LOCK KFI MUTEX FOR READING

            57            03     8A  06F5  1145 	BICB	#KFI$M_KFISEQ,R7	;CLEAR SEQUENCE NUMBER BITS IN KFIADR

         13 A7         6C A6     8D  06F8  1146 	XORB3	KFIADR(R6),KFI$B_KFISEQ(R7),R0 ;CHECK THAT SEQUENCE BITS

                          50         06FD       

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  24

0352            KFI_LOCKR, KFI_LOCK_MTX, KFI_INCREF, OPEN_DONE_                                                                  (1)



            50            03     93  06FE  1147 	BITB	#KFI$M_KFISEQ,R0	;ARE THE SAME AS IN THE KFI ENTRY

                          0B     12  0701  1148 	BNEQ	20$			;BRANCH IF THEY DISAGREE

                       10 A7     B6  0703  1149 	INCW	KFI$W_REFCNT(R7)	;LOCK THE KFI ENTRY AGAINST DELETION

         6C A6            57     D0  0706  1150 	MOVL	R7,KFIADR(R6)		;STORE KFI ADR WITHOUT SEQUENCE BITS

            50            00'    3C  070A  1151 	MOVZWL	S^#SS$_NORMAL,R0	;SUCCESSFUL RETURN

                                 05  070D  1152 	RSB

                                     070E  1153 ;

                                     070E  1154 ; MAKE IT APPEAR AS IF NO KNOWN FILE ENTRY WAS FOUND AND RETRY THE IMAGE ACTIVATION

                                     070E  1155 ;

                       6C A6     D4  070E  1156 20$:	CLRL	KFIADR(R6)		;NO KNOWN FILE ENTRY

                          FA10'  31  0711  1157 	BRW	KRNL_RETRY_RSB		;SET RETRY, AND RETURN ERROR

                                     0714  1158 ;

                                     0714  1159 ; THIS ROUTINE IS CALLED IN KERNEL MODE AFTER THE FILE IS OPENED

                                     0714  1160 ; (NOT NECESSARILY SUCCESSFULLY) IN ORDER TO FIND OUT IF THE FILE

                                     0714  1161 ; IS EXECUTE ONLY AND IN ORDER TO INCREMENT THE KNOWN FILE REFERENCE COUNT

                                     0714  1162 ; IF THIS IS A KNOWN FILE

                                     0714  1163 ;

                                     0714  1164 ;

                                     0714  1165 ; CALLING SEQUENCE:

                                     0714  1166 ;

                                     0714  1167 ;	THIS ROUTINE IS INVOKED IN KERNEL MODE AT IPL 0 WITH A JSB INSTRUCTION

                                     0714  1168 ;

                                     0714  1169 ; INPUTS:

                                     0714  1170 ;

                                     0714  1171 ;	R4 = PCB ADDRESS FROM THE CHANGE MODE TO KERNEL DISPATCHER

                                     0714  1172 ;	R6 = IMAGE ACTIVATOR CONTEXT AREA ADDRESS

                                     0714  1173 ;	R7 = KNOWN FILE ENTRY ADDRESS IF NEGATIVE

                                     0714  1174 ;	R0-R4 MAY BE ALTERED

                                     0714  1175 ;	R5 MUST BE PRESERVED

                                     0714  1176 ;

                                     0714  1177 OPEN_DONE_KRNL:

            50         20 A6     3C  0714  1178 	MOVZWL	CHAN(R6),R0		;CHANNEL IF FILE WAS OPENED

                 00000000'EF     16  0718  1179 	JSB	IOC$VERIFYCHAN		;VERIFY CHANNEL, RETURN CCB ADR

            33            50     E9  071E  1180 	BLBC	R0,20$			;BRANCH IF CHANNEL NO GOOD

            50         04 A1     D0  0721  1181 	MOVL	CCB$L_WIND(R1),R0	;GET FILE WINDOW IF OPENED OK

                          2D     18  0725  1182 	BGEQ	20$			;BRANCH IF NO WINDOW

            50         18 A0     D0  0727  1183 	MOVL	WCB$L_FCB(R0),R0	;GET FILE CONTROL BLOCK ADDRESS

                          27     13  072B  1184 	BEQL	20$			;BRANCH IF "NOT_FCP_WINDOW"

            51         00'A0     3C  072D  1185 	MOVZWL	B^FCB$W_FILEPROT(R0),R1	;PROTECTION WORD

            52         00'A0     D0  0731  1186 	MOVL	B^FCB$L_FILEOWNER(R0),R2 ;AND OWNER OF THE FILE

                          51     DD  0735  1187 	PUSHL	R1			;SAVE PROTECTION FOR SYSTEM CHECK

                 00000000'EF     16  0737  1188 	JSB	EXE$CHKRDACCES		;SEE IF FILE MAY BE READ

                          02     BA  073D  1189 	POPR	#^M<R1>			;RECOVER SAVED PROTECTION

            12            50     E8  073F  1190 	BLBS	R0,20$			;BRANCH IF FILE IS READABLE

         00'B4            00'    E0  0742  1191 	BBS	S^#PRV$V_LOG_IO,@B^PCB$L_PHD(R4),10$ ;IF PROCESS HAS LOGICAL I/O

                          05         0746       

         00'B4            00'    E1  0747  1192 	BBC	S^#PRV$V_PHY_IO,@B^PCB$L_PHD(R4),15$ ;OR PHYSICAL I/O PRIVILEGE

                          03         074B       

            05            51     E9  074C  1193 10$:	BLBC	R1,20$			;THEN CHECK SYSTEM READ ACCESS

                                     074F  1194 					;BRANCH IF READABLE TO SYSTEM

         54 A6            00     E2  074F  1195 15$:	BBSS	#IFD$V_EXEONLY,IFDFLAGS(R6),20$ ;NOTE FILE IS EXECUTE ONLY

                          00         0753       

                          57     D5  0754  1196 20$:	TSTL	R7			;IF FILE IS A KNOWN FILE

                          9B     12  0756  1197 	BNEQ	KFI_INCREF		;COUNT A REFERENCE FOR IT AND RETURN

            50            00'    D0  0758  1198 	MOVL	S^#SS$_NORMAL,R0	;OTHERWISE JUST RETURN SUCCESSFULLY

                                 05  075B  1199 	RSB

                                     075C  1200 	.SBTTL	KFI_DECREF, CMKRNL, SETCTLREG

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  25

0352            KFI_DECREF, CMKRNL, SETCTLREG                                                                                    (1)



                                     075C  1201 ;

                                     075C  1202 ; EXEC MODE ROUTINE TO DECREMENT THE KNOWN FILE REFERENCE COUNT

                                     075C  1203 ;

                                     075C  1204 ; CALLING SEQUENCE:

                                     075C  1205 ;

                                     075C  1206 ;	BSBW	KFI_DECREF

                                     075C  1207 ;

                                     075C  1208 ; INPUTS:

                                     075C  1209 ;

                                     075C  1210 ;	R6 = ADDRESS OF IMAGE ACTIVATOR CONTEXT AREA

                                     075C  1211 ;	R7 = KNOWN FILE ENTRY ADDRESS IF NEGATIVE

                                     075C  1212 ;

                                     075C  1213 

                                     075C  1214 	.ENABL	LSB

                                     075C  1215 

                                     075C  1216 KFI_DECREF:

                          57     D5  075C  1217 	TSTL	R7

                          13     18  075E  1218 	BGEQ	10$			;BRANCH IF NOT A KNOWN FILE

         64 A6       07E9'CF     DE  0760  1219 	MOVAL	W^KRNL_KFI_DECREF,KRNLROUT(R6) ;DEC REFCNT IN KERNEL MODE

                                     0766  1220 ;

                                     0766  1221 ; EXEC MODE ROUTINE TO CALL A DESIRED ROUTINE IN KERNEL MODE

                                     0766  1222 ;

                                     0766  1223 ; CALLING SEQUENCE:

                                     0766  1224 ;

                                     0766  1225 ;	BSBW	CMKNRL

                                     0766  1226 ;

                                     0766  1227 ; INPUTS:

                                     0766  1228 ;

                                     0766  1229 ;	KRNLARG(R6) = ARGUMENT LIST TO BE PASSED TO THE DISPATCHER BELOW

                                     0766  1230 ;

                                     0766  1231 CMKRNL:

                                     0766  1232 	$CMKRNL_S B^KRNL_DISPAT,KRNLARG(R6) ;CALL THE DIPATCHER IN KERNEL MODE

                       60 A6     DF  0766       		PUSHAL	KRNLARG(R6)

                       74'AF     DF  0769       		PUSHAL	B^KRNL_DISPAT

   00000000'GF            02     FB  076C       		CALLS	#2,G^SYS$CMKRNL

                                 05  0773  1233 10$:	RSB

                                     0774  1234 

                                     0774  1235 	.DSABL	LSB

                                     0774  1236 

                                     0774  1237 ;

                                     0774  1238 ; KERNEL MODE ROUTINE TO DISPATCH TO DESIRED ROUTINE

                                     0774  1239 ;

                                     0774  1240 ; CALLING SEQUENCE:

                                     0774  1241 ;

                                     0774  1242 ;	CALLG	KRNL_DISPAT,ARGLIST

                                     0774  1243 ;

                                     0774  1244 ; INPUTS:

                                     0774  1245 ;

                                     0774  1246 ;	 4(AP) = SUBROUTINE TO CALL WITH JSB

                                     0774  1247 ;	 8(AP) = ADDRESS OF IMAGE ACTIVATOR CONTEXT AREA

                                     0774  1248 ;	12(AP) = KNOWN FILE ENTRY ADDRESS IF NON-ZERO

                                     0774  1249 ;	R4     = PROCESS CONTROL BLOCK ADDRESS FROM CHANGE MODE TO KERNEL DISPATCHER

                                     0774  1250 ;

                                     0774  1251 ; OUTPUTS:

                                     0774  1252 ;

                                     0774  1253 ;	R0 = STATUS CODE

                                     0774  1254 ;

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  26

0352            KFI_DECREF, CMKRNL, SETCTLREG                                                                                    (1)



                                     0774  1255 KRNL_DISPAT:

                               00CC  0774  1256 	.WORD	^M<R2,R3,R6,R7>

            56         08 AC     7D  0776  1257 	MOVQ	8(AP),R6		;R6 = ADR OF CONTEXT AREA

                                     077A  1258 					;R7 = KNOWN FILE ENTRY ADR IF NEGATIVE

                       04 BC     16  077A  1259 	JSB	@4(AP)			;CALL DESIRED KERNEL MODE ROUTINE

                                 04  077D  1260 	RET				;AND RETURN TO EXEC MODE

                                     077E  1261 ;

                                     077E  1262 ; KERNEL MODE ROUTINE FOR SETTING UP THE USER STACK AND PROCESS PRIVILEGE MASK

                                     077E  1263 ;

                                     077E  1264 ; CALLING SEQUENCE:

                                     077E  1265 ;

                                     077E  1266 ;	THIS ROUTINE IS INVOKED IN KERNEL MODE AT IPL 0 WITH A JSB INSTRUCTION

                                     077E  1267 ;

                                     077E  1268 ; INPUTS:

                                     077E  1269 ;

                                     077E  1270 ;	R4 = PCB ADDRESS FROM THE CHANGE MODE TO KERNEL DISPATCHER

                                     077E  1271 ;	R6 = IMAGE ACTIVATOR CONTEXT AREA ADDRESS

                                     077E  1272 ;	R7 = KNOWN FILE ENTRY ADDRESS IF NEGATIVE

                                     077E  1273 ;	R0-R4 MAY BE ALTERED

                                     077E  1274 ;	R5 MUST BE PRESERVED

                                     077E  1275 ;

                                     077E  1276 

                                     077E  1277 	.ENABL	LSB

                                     077E  1278 

                                     077E  1279 SETCTLREG:

                 00000080'EF     16  077E  1280 	JSB	IAC$CLRIACLOCK		;CLEAR IMAGE ACTIVATOR LOCK IF SET

            50         EC A6     D0  0784  1281 	MOVL	USRSTACKADR(R6),R0	;USER STACK ADDRESS IF SPECIFIED

                          04     12  0788  1282 	BNEQ	10$			;BRANCH IF ANY STACK ALLOCATED

            50         D8 A6     D0  078A  1283 	MOVL	CTLBASADR(R6),R0	;NO STACK ALLOCATED, USE END OF P1 SPACE

   00000000'9F            50     D0  078E  1284 10$:	MOVL	R0,@#CTL$AL_STACK+<PSL$C_USER*4> ;SET USER STACK ADR IN CTRL REGION

            50   00000000'EF     C2  0795  1285 	SUBL	SGN$GL_EXUSRSTK,R0	;RESERVE SAFETY AREA

            00'           50     DA  079C  1286 	MTPR	R0,S^#PR$_USP		;SET PROCESSOR REGISTER

            50   00000000'9F     7D  079F  1287 	MOVQ	@#CTL$GQ_PROCPRIV,R0	;GET PROCESS DEFAULT PRIVILEGES

            50         E4 A6     C8  07A6  1288 	BISL	PROCPRIV(R6),R0		;ENHANCE FOR PRIVILEGED KNOWN IMAGE

            51         E8 A6     C8  07AA  1289 	BISL	PROCPRIV+4(R6),R1	;

   00000000'FF            50     7D  07AE  1290 	MOVQ	R0,@CTL$GL_PHD		;STORE PRIVILEGE MASK

                                     07B5  1291 KFI_MAK_SHR_RES:

                          57     D5  07B5  1292 	TSTL	R7			;KNOWN FILE?

                          35     18  07B7  1293 	BGEQ	60$			;BRANCH IF NO

         5A A6            02     E1  07B9  1294 	BBC	#KFI$V_KP_SHARED,KFIFLG(R6),20$ ;BRANCH IF NOT SUPPOSED TO BE SHARED

                          19         07BD       

         5A A6            09     E0  07BE  1295 	BBS	#KFI$V_IS_SHARED,KFIFLG(R6),20$ ;BRANCH IF ALREADY MADE SHARED

                          14         07C2       

                                     07C3  1296 

                                     07C3  1297 	ASSUME	KFI$L_IDENT EQ KFI$B_MATCHCTL+4

         2C A7         C8 A6     7D  07C3  1298 	MOVQ	KFIMATCHCTL(R6),KFI$B_MATCHCTL(R7) ;SAVE GLOBAL SECTION MATCH

                                     07C8  1299 					;CONTROL FOR DELETE GLOBAL SECTION LOGIC

         16 A7         70 A6     B0  07C8  1300 	MOVW	GBLSECCNT(R6),KFI$W_GBLSECCNT(R7) ;SET COUNT OF GLOBAL SECTIONS

         58 A6            06     E0  07CD  1301 	BBS	#IAC_V_NOTSHARED,IACFLG(R6),20$ ;DON'T SET IS_SHARED IF

                          05         07D1       

                                     07D2  1302 					;ONE OR MORE GLOBAL SECTIONS

                                     07D2  1303 					;FAILED TO BE CREATED.

         14 A7            09     E6  07D2  1304 	BBSSI	#KFI$V_IS_SHARED,KFI$W_FLAGS(R7),20$ ;KNOWN FILE IS SHARED NOW

                          00         07D6       

         58 A6            03     E1  07D7  1305 20$:	BBC	#IAC_V_KP_RESHDR,IACFLG(R6),40$ ;BRANCH IF NOT MAKING IMG HDR RESIDENT

                          03         07DB       

                          F94C'  30  07DC  1306 	BSBW	KRNL_MAK_RESHDR		;MAKE IMAGE HEADER RESIDENT

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  27

0352            KFI_DECREF, CMKRNL, SETCTLREG                                                                                    (1)



                                     07DF  1307 					;R4 MUST BE PROCESS CONTROL BLOCK ADR

         58 A6            05     E1  07DF  1308 40$:	BBC	#IAC_V_LIM,IACFLG(R6),50$ ;BRANCH IF NOT LINKABLE IMAGE

                          05         07E3       

         14 A7            06     E6  07E4  1309 	BBSSI	#KFI$V_LIM,KFI$W_FLAGS(R7),50$ ;KFI ENTRY IS FOR LINKABLE IMAGE

                          00         07E8       

                                     07E9  1310 50$:

                                     07E9  1311 ;

                                     07E9  1312 ; FALL THROUGH TO KRNL_KFI_DECREF

                                     07E9  1313 ;

                                     07E9  1314 ;

                                     07E9  1315 ; KERNEL MODE ROUTINE TO DECREMENT THE KNOWN FILE REFERENCE COUNT

                                     07E9  1316 ; ***** THE FOLLOWING ALTERATIONS ARE MADE TO THE KNOWN FILE ENTRY

                                     07E9  1317 ; ***** WITHOUT THE PROTECTION OF A MUTEX AND ARE ONLY PROPERLY INTERLOCKED

                                     07E9  1318 ; ***** IN A SINGLE PROCESSOR SYSTEM.  A READ MUTEX IS REQUIRED TO MAKE

                                     07E9  1319 ; ***** THIS CODE WORK CORRECTLY FOR A SYMMETRIC MULTI-PROCESSING SYSTEM.

                                     07E9  1320 ;

                                     07E9  1321 ;	THE REFERENCE COUNT LOGIC WORKS AS FOLLOWS.  IN THE KNOWN FILE

                                     07E9  1322 ; SCANNER, THE KNOWN FILE ENTRY ADDRESS IS STORED IN FAB$L_CTX WITH THE

                                     07E9  1323 ; TWO LOW ORDER BITS OF KFI$B_KFISEQ.  WHEN THE IMAGE ACTIVATOR REGAINS 

                                     07E9  1324 ; CONTROL AFTER THE $OPEN AND FAB$L_CTX IS NON-ZERO, IT GRABS THE READ 

                                     07E9  1325 ; MUTEX IN ORDER TO BUMP THE REFCNT THUS PROTECTING THE KNOWN FILE ENTRY

                                     07E9  1326 ; FROM SUBSTANTIVE CHANGE.  IN ORDER TO CLOSE THE WINDOW BETWEEN THE KNOWN

                                     07E9  1327 ; FILE SCANNER STORING THE KFI ENTRY ADDRESS AND THE IMAGE ACTIVATOR 

                                     07E9  1328 ; LOCKING THE KNOWN FILE ENTRY, A SEQUENCE NUMBER FIELD IS MAINTAINED

                                     07E9  1329 ; IN THE KNOWN FILE ENTRY.  AFTER GRABBING THE READ MUTEX THE SEQUENCE 

                                     07E9  1330 ; BITS IN FAB$L_CTX ARE COMPARED WITH KFI$B_KFISEQ.  IF THEY DON'T AGREE

                                     07E9  1331 ; THEN THE KNOWN FILE ENTRY WAS DELETED AND POSSIBLY REUSED.  IT WOULD

                                     07E9  1332 ; TAKE 4 SUCH CYCLES TO FOUL UP THE SEQUENCE CHECK AND 2 RATHER STRETCHES

                                     07E9  1333 ; THE IMAGINATION.  IT IS KEY TO THIS DESIGN THAT THE KNOWN FILE ENTRIES

                                     07E9  1334 ; ARE NEVER RETURNED TO PAGED POOL BUT INSTEAD ARE KEPT ON A KNOWN FILE

                                     07E9  1335 ; ENTRY FREE LIST.  THIS IS THE ONLY WAY THAT THE SEQUENCE NUMBER BEHAVES

                                     07E9  1336 ; PROPERLY.  A UTILITY MIGHT BE ABLE TO MOVE THEM FROM THE FREE LIST TO

                                     07E9  1337 ; PAGED POOL, BUT THE IMAGE ACTIVATOR CANNOT DO IT ON THE FLY.  AT THE 

                                     07E9  1338 ; COMPLETION OF THE IMAGE ACTIVATION (SUCCESSFULLY OR NOT) THE REFCNT

                                     07E9  1339 ; IS DECREMENTED, RELEASING THIS PROCESS' REQUIREMENT THAT THE KNOWN 

                                     07E9  1340 ; FILE ENTRY REMAIN STABLE.

                                     07E9  1341 ;

                                     07E9  1342 ;	THE COUNTER IS BIASED BY 1 FOR THE EXISTENCE OF THE KNOWN FILE ENTRY

                                     07E9  1343 ; ON THE KNOWN FILE QUEUE, SO IT CAN NEVER REACH ZERO UNLESS THE KNOWN

                                     07E9  1344 ; FILE ENTRY HAS BEEN "DELETED".  THE DELETE OPERATION MERELY REMOVES THIS

                                     07E9  1345 ; BIAS FROM THE REFCNT, REMOVES THE ENTRY FROM THE "ACTIVE" KNOWN FILE LIST

                                     07E9  1346 ; AND QUEUES IT ON THE DELETE PENDING LIST.  ONLY IF THE ENTRY IS ON THE

                                     07E9  1347 ; DELETE PENDING LIST (WHERE THE KNOWN FILE SCANNER WILL NOT FIND IT), CAN

                                     07E9  1348 ; THE FOLLOWING DECREMENT TAKE THE REFERENCE COUNT TO ZERO.  IN THIS CASE

                                     07E9  1349 ; NO OTHER PROCESS COULD POSSIBLY BE USING THE ENTRY AND IT IS THE TIME TO

                                     07E9  1350 ; COMPLETE ITS DELETION.

                                     07E9  1351 ;

                                     07E9  1352 ; CALLING SEQUENCE:

                                     07E9  1353 ;

                                     07E9  1354 ;	THIS ROUTINE IS INVOKED IN KERNEL MODE AT IPL 0 WITH A JSB INSTRUCTION

                                     07E9  1355 ;

                                     07E9  1356 ; INPUTS:

                                     07E9  1357 ;

                                     07E9  1358 ;	R4 = PCB ADDRESS FROM THE CHANGE MODE TO KERNEL DISPATCHER

                                     07E9  1359 ;	R6 = IMAGE ACTIVATOR CONTEXT AREA ADDRESS

                                     07E9  1360 ;	R7 = KNOWN FILE ENTRY ADDRESS IF NON-ZERO

                                     07E9  1361 ;	R0-R4 MAY BE ALTERED

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  28

0352            KFI_DECREF, CMKRNL, SETCTLREG                                                                                    (1)



                                     07E9  1362 ;	R5 MUST BE PRESERVED

                                     07E9  1363 ;

                                     07E9  1364 KRNL_KFI_DECREF:

                       10 A7     B7  07E9  1365 	DECW	KFI$W_REFCNT(R7)	;ONE LESS REFERENCE FOR THE KNOWN FILE ENTRY

                          04     15  07EC  1366 	BLEQ	80$			;BRANCH IF READY TO BE DELETED

            50            00'    3C  07EE  1367 60$:	MOVZWL	S^#SS$_NORMAL,R0	;INDICATE SUCCESS

                                 05  07F1  1368 	RSB

                          F80B'  31  07F2  1369 80$:	BRW	KFI_RELEASE		;GO RELEASE THE KNOWN FILE ENTRY

                                     07F5  1370 

                                     07F5  1371 	.DSABL	LSB

                                     07F5  1372 	.SBTTL	IMAGE ACTIVATOR INTERLOCK LOGIC

                                     07F5  1373 

                                     07F5  1374 ;

                                     07F5  1375 ; THE FOLLOWING CODE IS DESIGNED TO INTERLOCK THE CREATION AND DELETION

                                     07F5  1376 ; OF THE GLOBAL SECTIONS ASSOCIATED WITH LINKABLE (SHAREABLE) IMAGES SO

                                     07F5  1377 ; THAT THERE IS NO RACE BETWEEN THE CREATION OF THE GLOBAL SECTIONS FOR

                                     07F5  1378 ; A GIVEN LINKABLE IMAGE AND THE ACTIVATION OF AN IMAGE THAT REFERENCES

                                     07F5  1379 ; THOSE GLOBAL SECTIONS.  THE GOAL IS TO GUARANTEE THAT AN IMAGE

                                     07F5  1380 ; REFERENCING THE GLOBAL SECTIONS OF A LINKABLE IMAGE GETS ALL OF ITS

                                     07F5  1381 ; GLOBAL SECTIONS FROM THE SAME LINKABLE IMAGE.

                                     07F5  1382 ;

                                     07F5  1383 ;

                                     07F5  1384 ; **********************************************************************

                                     07F5  1385 ;

                                     07F5  1386 ; **************** THE FOLLOWING CODE MUST BE RESIDENT *****************

                                     07F5  1387 ;

                                 00000000  1388 	.PSECT	$MMGCOD

                                     0000  1389 ;

                                     0000  1390 ; **********************************************************************

                                     0000  1391 ;

                                     0000  1392 ;

                                     0000  1393 ; LOCK THE KNOWN FILE MUTEX FOR WRITING AND GET THE IMAGE ACTIVATOR LOCK

                                     0000  1394 ; FOR WRITING.  WAIT FOR THE KNOWN FILE MUTEX IF BUSY.  IF IMAGE ACIVATOR

                                     0000  1395 ; LOCK CANNOT BE SET THEN RELEASE THE MUTEX AND WAIT FOR THE IMAGE

                                     0000  1396 ; ACTIVATOR LOCK.

                                     0000  1397 ;

                                     0000  1398 ; CALLING SEQUENCE:

                                     0000  1399 ;

                                     0000  1400 ;	BSBW	IAC_KFI_LOCKW		;KERNEL MODE ROUTINE

                                     0000  1401 ;

                                     0000  1402 ; INPUTS:

                                     0000  1403 ;

                                     0000  1404 ;	R0 = ADDRESS OF KNOWN FILE MUTEX

                                     0000  1405 ;	R4 = PROCESS CONTROL BLOCK ADDRESS

                                     0000  1406 ;	IPL = 0

                                     0000  1407 ;

                                     0000  1408 ; OUTPUTS:

                                     0000  1409 ;	

                                     0000  1410 ;	IPL = ASTDEL

                                     0000  1411 ;	KNOWN FILE MUTEX LOCKED FOR WRITING

                                     0000  1412 ;	MMG$IACLOCK SET TO PCB ADDRESS

                                     0000  1413 ;	RND$V_IACLOCK SET IN CTL$GL_RUNDNFLG

                                     0000  1414 ;

                                     0000  1415 IAC_KFI_LOCKW:

                          50     DD  0000  1416 10$:	PUSHL	R0			;SAVE ADDRESS OF KNOWN FILE MUTEX

                          FFFB'  30  0002  1417 	BSBW	SCH$LOCKW		;LOCK THE MUTEX FOR WRITING

                                     0005  1418 ;

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  29

0352            IMAGE ACTIVATOR INTERLOCK LOGIC                                                                                  (1)



                                     0005  1419 ; RETURNS AT IPL=ASTDEL

                                     0005  1420 ;

                                     0005  1421 	DSBINT	S^#IPL$_SYNCH		;STACK CURRENT IPL, RAISE TO SYNCH

            7E            00'    DB  0005       		MFPR	S^#PR$_IPL,-(SP)

            00'           00'    DA  0008       		MTPR	S^#IPL$_SYNCH,S^#PR$_IPL

                     0000'CF     D5  000B  1422 	TSTL	W^MMG$GL_IACLOCK	;SEE IF LOCK IS ALREADY IN USE

                          24     13  000F  1423 	BEQL	60$			;BRANCH IF IT IS AVAILABLE

       0000'CF            54     D1  0011  1424 	CMPL	R4,W^MMG$GL_IACLOCK	;ALREADY LOCKED BY THIS PROCESS?

                          2A     13  0016  1425 	BEQL	80$			;BRANCH IF YES

                                     0018  1426 ;

                                     0018  1427 ; CANNOT LOCK THE IMAGE ACTIVATOR LOCK, RELEASE THE KNOWN FILE MUTEX

                                     0018  1428 ;

                                     0018  1429 	ENBINT				;BACK TO ASTDEL

            00'           8E     DA  0018       		MTPR	(SP)+,S^#PR$_IPL

            50            6E     D0  001B  1430 	MOVL	(SP),R0			;RECOVER MUTEX ADDRESS

                          FFDF'  30  001E  1431 	BSBW	SCH$UNLOCK		;RELEASE THE KNOWN FILE MUTEX

                                     0021  1432 ;

                                     0021  1433 ; MUST NOW WAIT FOR THE IMAGE ACTIVATOR LOCK

                                     0021  1434 ;

                                     0021  1435 	SETIPL	S^#IPL$_SYNCH		;BACK TO SYNCH

            00'           00'    DA  0021       		MTPR	S^#IPL$_SYNCH,S^#PR$_IPL

                     0000'CF     D5  0024  1436 	TSTL	W^MMG$GL_IACLOCK	;DID IT JUST BECOME AVAILABLE?

                          07     12  0028  1437 	BNEQ	40$			;BRANCH IF NOT

                                     002A  1438 	SETIPL	#0			;YES, START FROM SCRATCH

            00'           00     DA  002A       		MTPR	#0,S^#PR$_IPL

                          01     BA  002D  1439 30$:	POPR	#^M<R0>			;GET THE KNOWN FILE MUTEX ADDRESS

                          CF     11  002F  1440 	BRB	10$			;AND GO LOCK THE MUTEX AGAIN

                          15     10  0031  1441 40$:	BSBB	WAIT_ACTIVE_LCK		;WAIT FOR IMAGE ACTIVATOR LOCK

                          F8     11  0033  1442 	BRB	30$			;AND THEN START OVER

                                     0035  1443 ;

                                     0035  1444 ; IMAGE ACTIVATOR LOCK IS AVAILABLE, LOCK IT NOW

                                     0035  1445 ;

       0000'CF            54     D0  0035  1446 60$:	MOVL	R4,W^MMG$GL_IACLOCK	;RECORD PCB ADDRESS OF LOCKER

   00000000'9F            00'    E2  003A  1447 	BBSS	S^#RND$V_IACLOCK,@#CTL$GL_RUNDNFLG,80$ ;UNDO THIS IN RUNDOWN

                          00         0041       

                          03     BA  0042  1448 80$:	POPR	#^M<R0,R1>		;R0=SAVED IPL, CLEAN OFF SAVED MUTEX ADR

                                     0044  1449 	ENBINT	R0			;RESTORE IPL TO ASTDEL

            00'           50     DA  0044       		MTPR	R0,S^#PR$_IPL

                                 05  0047  1450 	RSB

                                     0048  1451 ;

                                     0048  1452 ; WAIT FOR IMAGE ACTIVATOR LOCK TO BECOME AVAILABLE

                                     0048  1453 ;

                                     0048  1454 ; CALLING SEQUENCE:

                                     0048  1455 ;

                                     0048  1456 ;	BSBW	WAIT_ACTIVE_LOCK	;KERNEL MODE ROUTINE

                                     0048  1457 ;

                                     0048  1458 ; INPUTS:

                                     0048  1459 ;

                                     0048  1460 ;	IPL=SYNCH

                                     0048  1461 ;

                                     0048  1462 ; OUTPUTS:

                                     0048  1463 ;

                                     0048  1464 ;	R4 = CURRENT PCB ADDRESS

                                     0048  1465 ;

                                     0048  1466 WAIT_ACTIVE_LCK:

                          7E     DC  0048  1467 	MOVPSL	-(SP)

            00'           00     F0  004A  1468 	INSV	#0,S^#PSL$V_IPL,S^#PSL$S_IPL,(SP) ;FORM PC, PSL PAIR ON STACK

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  30

0352            IMAGE ACTIVATOR INTERLOCK LOGIC                                                                                  (1)



            6E            00'        004D       

            51            00'    3C  004F  1469 	MOVZWL	S^#RSN$_IACLOCK,R1	;RESOURCE TO WAIT FOR

                          FFAB'  30  0052  1470 	BSBW	MMG$RESRCWAIT		;WAIT THIS PROCESS

                          FFA8'  30  0055  1471 	BSBW	MMG$SVPCTX		;AND RESCHEDULE

                                 05  0058  1472 	RSB				;RETURN AND TRY AGAIN

                                     0059  1473 ;

                                     0059  1474 ; LOCK THE IMAGE ACTIVATOR LOCK FOR READING, THUS GUARANTEEING THAT

                                     0059  1475 ; THE GLOBAL SECTIONS FOR A LINKABLE IMAGE WILL REMAIN CONSISTENT WHILE

                                     0059  1476 ; THE PROGRAM LOOPS THROUGH AND MAPS EACH ONE.

                                     0059  1477 ;

                                     0059  1478 ; CALLING SEQUENCE:

                                     0059  1479 ;

                                     0059  1480 ;	BSBW	SET_ACTIVE_LCK		;KERNEL MODE ROUTINE

                                     0059  1481 ;

                                     0059  1482 ; INPUTS:

                                     0059  1483 ;

                                     0059  1484 ;	R4 = CURRENT PROCESS CONTROL BLOCK ADDRESS

                                     0059  1485 ;	IPL = 0

                                     0059  1486 ;

                                     0059  1487 ; OUTPUTS:

                                     0059  1488 ;

                                     0059  1489 ;	R0 = SUCCESS STATUS

                                     0059  1490 ;	W^MMG$GL_IACLOCK INCREMENTED

                                     0059  1491 ;	RND$V_IACLOCK SET IN CTL$GL_RUNDNFLG TO MAKE SURE THAT RUNDOWN

                                     0059  1492 ;		WILL UNDO THIS INCREMENT.

                                     0059  1493 ;

                                     0059  1494 SET_ACTIVE_LCK:

                                     0059  1495 10$:	SETIPL	S^#IPL$_SYNCH		;RAISE IPL

            00'           00'    DA  0059       		MTPR	S^#IPL$_SYNCH,S^#PR$_IPL

                     0000'CF     D5  005C  1496 	TSTL	W^MMG$GL_IACLOCK	;WRITE LOCKED?

                          13     19  0060  1497 	BLSS	30$			;BRANCH IF YES, MUST WAIT

                     0000'CF     D6  0062  1498 	INCL	W^MMG$GL_IACLOCK	;RECORD ANOTHER READ LOCK

   00000000'9F            00'    E2  0066  1499 	BBSS	S^#RND$V_IACLOCK,@#CTL$GL_RUNDNFLG,20$ ;RUNDOWN SHOULD UNDO THIS

                          00         006D       

                                     006E  1500 20$:	SETIPL	#0			;BACK TO IPL 0

            00'           00     DA  006E       		MTPR	#0,S^#PR$_IPL

            50            00'    D0  0071  1501 	MOVL	S^#SS$_NORMAL,R0	;RETURN SUCCESS STATUS

                                 05  0074  1502 	RSB

                                     0075  1503 ;

                                     0075  1504 ; SOMEONE HAS THE IMAGE ACTIVATOR LOCK WRITE LOCKED

                                     0075  1505 ;

       0000'CF            54     D1  0075  1506 30$:	CMPL	R4,W^MMG$GL_IACLOCK	;IF IT IS THIS PROCESS

                          F2     13  007A  1507 	BEQL	20$			;THEN OK

                          CA     10  007C  1508 	BSBB	WAIT_ACTIVE_LCK		;WAIT FOR IMAGE ACTIVATOR LOCK

                          D9     11  007E  1509 	BRB	10$			;AND START OVER

                                     0080  1510 ;

                                     0080  1511 ; RELEASE IMAGE ACTIVATOR LOCK

                                     0080  1512 ;

                                     0080  1513 ; CALLING SEQUENCE:

                                     0080  1514 ;

                                     0080  1515 ;	BSBW	IAC$CLRIACLOCK		;KERNEL MODE ROUTINE

                                     0080  1516 ;

                                     0080  1517 ; INPUTS:

                                     0080  1518 ;

                                     0080  1519 ;	R4 = PROCESS CONTROL BLOCK ADDRESS

                                     0080  1520 ;	IPL = 0

                                     0080  1521 ;

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  31

0352            IMAGE ACTIVATOR INTERLOCK LOGIC                                                                                  (1)



                                     0080  1522 ; OUTPUTS:

                                     0080  1523 ;

                                     0080  1524 ;	R0 = SUCCESS STATUS

                                     0080  1525 ;	W^MMG$GL_IACLOCK DECREMENTED IF READ LOCKED, CLEARED IF WRITE LOCKED

                                     0080  1526 ;	RND$V_IACLOCK CLEARED IN CTL$GL_RUNDNFLG

                                     0080  1527 ;

                                     0080  1528 IAC$CLRIACLOCK::

                                     0080  1529 	SETIPL	S^#IPL$_SYNCH		;RAISE TO SYNCH

            00'           00'    DA  0080       		MTPR	S^#IPL$_SYNCH,S^#PR$_IPL

   00000000'9F            00'    E5  0083  1530 	BBCC	S^#RND$V_IACLOCK,@#CTL$GL_RUNDNFLG,40$ ;BRANCH IF NOT LOCKED

                          19         008A       

       0000'CF            54     D1  008B  1531 	CMPL	R4,W^MMG$GL_IACLOCK	;WRITE LOCKED?

                          06     13  0090  1532 	BEQL	20$			;BRANCH IF YES, CLEAR THE LOCK

                     0000'CF     D7  0092  1533 	DECL	W^MMG$GL_IACLOCK	;COUNT ONE LESS READ LOCK

                          04     11  0096  1534 	BRB	30$

                     0000'CF     D4  0098  1535 20$:	CLRL	W^MMG$GL_IACLOCK	;CLEAR THE WRITE LOCK

                          06     12  009C  1536 30$:	BNEQ	40$			;BRANCH IF STILL READ LOCKED

            50            00'    3C  009E  1537 	MOVZWL	S^#RSN$_IACLOCK,R0	;RESOURCE TO REPORT AVAILABLE

                          FF5C'  30  00A1  1538 	BSBW	SCH$RAVAIL		;REPORT IT AS AVAILABLE

                                     00A4  1539 40$:	SETIPL	#0			;BACK TO IPL 0

            00'           00     DA  00A4       		MTPR	#0,S^#PR$_IPL

            50            00'    D0  00A7  1540 	MOVL	S^#SS$_NORMAL,R0	;RETURN SUCCESS STATUS

                                 05  00AA  1541 	RSB

                                     00AB  1542 	.SBTTL	KFI_RELEASE - RELEASE THE KNOWN FILE ENTRY

                                     00AB  1543 

                                 00000000  1544 	.PSECT	YF$LOWUSE

                                     0000  1545 

                                     0000  1546 ;

                                     0000  1547 ; KERNEL MODE ROUTINE TO COMPLETE THE DELETION OF A KNOWN FILE ENTRY 

                                     0000  1548 ; AFTER THE REFERENCE COUNT HAS GONE TO ZERO

                                     0000  1549 ;

                                     0000  1550 ; CALLING SEQUENCE:

                                     0000  1551 ;

                                     0000  1552 ;	THIS ROUTINE IS INVOKED IN KERNEL MODE AT IPL 0 WITH A JSB INSTRUCTION

                                     0000  1553 ;

                                     0000  1554 ; INPUTS:

                                     0000  1555 ;

                                     0000  1556 ;	R4 = PCB ADDRESS FROM THE CHANGE MODE TO KERNEL DISPATCHER

                                     0000  1557 ;	R6 = IMAGE ACTIVATOR CONTEXT AREA ADDRESS

                                     0000  1558 ;	R7 = KNOWN FILE ENTRY ADDRESS IF NEGATIVE

                                     0000  1559 ;	R0-R4 MAY BE ALTERED

                                     0000  1560 ;	R5 MUST BE PRESERVED

                                     0000  1561 ;

                                     0000  1562 KFI_RELEASE:

                          0091   30  0000  1563 	BSBW	KFI_LOCKW		;LOCK THE KNOWN FILE MUTEX FOR WRITING

                       10 A7     B5  0003  1564 	TSTW	KFI$W_REFCNT(R7)	;RELEASE ENTRY IF STILL NOT REFERENCED

                          5F     14  0006  1565 	BGTR	80$			;OTHERWISE LEAVE IT ALONE

         0B A7            02     E1  0008  1566 	BBC	#KFI$V_DONOTOPEN,KFI$B_KFICTL(R7),20$ ;BRANCH IF NO WINDOW PRESENT

                          09         000C       

            52         1C A7     D0  000D  1567 	MOVL	KFI$L_WINDOW(R7),R2	;GET WINDOW ADDRESS

                          03     18  0011  1568 	BGEQ	20$			;BRANCH IF NONE THERE

                       0E A2     B7  0013  1569 	DECW	WCB$W_REFCNT(R2)	;REMOVE THE BIAS FOR THE KNOWN FILE ENTRY

                                     0016  1570 					;LAST DEASSIGN WILL REALLY DEACCESS THE FILE

         14 A7            02     E1  0016  1571 20$:	BBC	#KFI$V_KP_SHARED,KFI$W_FLAGS(R7),40$ ;BRANCH IF NOT SHARABLE

                          29         001A       

            53         16 A7     3C  001B  1572 	MOVZWL	KFI$W_GBLSECCNT(R7),R3	;GET COUNT OF SECTIONS

                          23     13  001F  1573 	BEQL	40$			;BRANCH IF NONE WERE CREATED

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  32

0352            KFI_RELEASE - RELEASE THE KNOWN FILE ENTRY                                                                       (1)



                          05F7'  30  0021  1574 	BSBW	KFI_GBLSECNMINI		;INITIALIZE THE KNOW FILE GBL SECTION NAME

         C8 A6         2C A7     9A  0024  1575 	MOVZBL	KFI$B_MATCHCTL(R7),KFIMATCHCTL(R6) ;GET GBL SECTION

         CC A6         30 A7     D0  0029  1576 	MOVL	KFI$L_IDENT(R7),KFIMATCHCTL+4(R6) ;MATCH CONTROL

                          060C'  30  002E  1577 30$:	BSBW	KFI_GBLSECNMNXT		;NEXT GLOBAL SECTION NAME

                       C8 A6     7F  0031  1578 	PUSHAQ	KFIMATCHCTL(R6)		;ADDRESS OF IDENT QUAD WORD

                       74 A6     7F  0034  1579 	PUSHAQ	GSDNAMSIZ(R6)		;ADDRESS OF GLOBAL SECTION NAME DESCRIP

            7E       C001 8F     3C  0037  1580 	MOVZWL	#<SEC$M_SYSGBL ! SEC$M_PERM ! SEC$M_GBL>,-(SP) ;FLAGS

       0000'CF            03     FB  003C  1581 	CALLS	#3,W^MMG$DGBLSC1	;DELETE THE GLOBAL SECTION

            EA            53     F5  0041  1582 	SOBGTR	R3,30$			;LOOP THROUGH ALL POSSIBLE SECTIONS

         14 A7            08     E1  0044  1583 40$:	BBC	#KFI$V_IS_RESHDR,KFI$W_FLAGS(R7),60$ ;BRANCH IF HEADER IS NOT RESIDENT

                          0B         0048       

         20 A7            0C     C3  0049  1584 	SUBL3	#12,KFI$L_IMGHDR(R7),R0	;ADDRESS OF IMAGE HEADER TO RELEASE

                          50         004D       

                 00000000'EF     16  004E  1585 	JSB	EXE$DEAPAGED		;DEALLOCATE PAGED POOL

            53         12 A7     9A  0054  1586 60$:	MOVZBL	KFI$B_KFIQNUM(R7),R3	;GET KNOWN FILE QUEUE NUMBER

            53   00000000'FF43   D0  0058  1587 	MOVL	@EXE$GL_KNOWNFIL[R3],R3	;ADDRESS OF QUEUE HEADS

                                     0060  1588 ;

                                     0060  1589 ;  0(R3) = ACTIVE QUEUE HEAD

                                     0060  1590 ;  8(R3) = DELETE PENDING QUEUE HEAD

                                     0060  1591 ; 16(R3) = FREE ENTRY QUEUE HEAD

                                     0060  1592 ;

            57            67     0F  0060  1593 	REMQUE	(R7),R7			;REMOVE KFI ENTRY FROM ITS CURRENT QUEUE

         14 B3            67     0E  0063  1594 	INSQUE	(R7),@20(R3)		;AND PUT IT ON THE TAIL OF THE FREE ENTRY QUEUE

            50            00'    3C  0067  1595 80$:	MOVZWL	S^#SS$_NORMAL,R0	;SET SUCCESSFUL RETURN STATUS

                                 05  006A  1596 	RSB				;AND RETURN

                                     006B  1597 	.SBTTL	SET/ZERO_FID, KFI_LOCKW

                                     006B  1598 

                                 0000006B  1599 	.PSECT	YF$LOWUSE

                                     006B  1600 

                                     006B  1601 ;

                                     006B  1602 ; EXEC MODE ROUTINE TO ZERO THE FILE ID IN KNOWN FILE ENTRY

                                     006B  1603 ;

                                     006B  1604 ; CALLING SEQUENCE:

                                     006B  1605 ;

                                     006B  1606 ;	BSBW	ZERO_FID

                                     006B  1607 ;

                                     006B  1608 ; INPUTS:

                                     006B  1609 ;

                                     006B  1610 ;	R6 = ADDRESS OF CONTEXT AREA

                                     006B  1611 ;

                                     006B  1612 ZERO_FID:

         64 A6         87'AF     DE  006B  1613 	MOVAL	B^KRNL_ZERO_FID,KRNLROUT(R6) ;ZERO FILE ID IN KERNEL MODE

                          06F3'  31  0070  1614 	BRW	CMKRNL

                                     0073  1615 ;

                                     0073  1616 ; KERNEL MODE ROUTINES TO SET AND CLEAR FILE ID IN THE KNOWN FILE ENTRY

                                     0073  1617 ;

                                     0073  1618 ; CALLING SEQUENCE:

                                     0073  1619 ;

                                     0073  1620 ;	THIS ROUTINE IS INVOKED IN KERNEL MODE AT IPL 0 WITH A JSB INSTRUCTION

                                     0073  1621 ;

                                     0073  1622 ; INPUTS:

                                     0073  1623 ;

                                     0073  1624 ;	R4 = PCB ADDRESS FROM THE CHANGE MODE TO KERNEL DISPATCHER

                                     0073  1625 ;	R6 = IMAGE ACTIVATOR CONTEXT AREA ADDRESS

                                     0073  1626 ;	R7 = KNOWN FILE ENTRY ADDRESS

                                     0073  1627 ;	R0-R4 MAY BE ALTERED

                                     0073  1628 ;	R5 MUST BE PRESERVED

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  33

0352            SET/ZERO_FID, KFI_LOCKW                                                                                          (1)



                                     0073  1629 ;

                                     0073  1630 KRNL_SET_FID:

                          1F     10  0073  1631 	BSBB	KFI_LOCKW		;COROUTINE CALL TO LOCK MUTEX FOR WRITING

                                     0075  1632 ;

                                     0075  1633 ; KNOWN FILE SCANNER SHOULD CAUSE THIS FILE TO BE OPENED BY FILE ID.

                                     0075  1634 ;

         0B A7            01     E2  0075  1635 	BBSS	#KFI$V_FILIDOPEN,KFI$B_KFICTL(R7),40$ ;SET TO OPEN BY FILE ID

                          0A         0079       

                                     007A  1636 					;BRANCH IF ALREADY OPENING BY FILE ID

         1C A7       FF38 C6     7D  007A  1637 	MOVQ	NAM$W_FID+NAM(R6),KFI$W_FID(R7) ;SET FILE ID TO USE

            50            00'    3C  0080  1638 	MOVZWL	S^#SS$_NORMAL,R0	;INDICATE SUCCESSFUL RETURN

                                 05  0083  1639 	RSB

                                     0084  1640 ;

                                     0084  1641 ; THIS IS THE CASE OF A SECOND PROCESS TRYING TO SET UP THE KNOWN FILE

                                     0084  1642 ; ENTRY FOR OPENING BY FILE ID.  2 OR MORE PROCESSES MADE IT THROUGH THE

                                     0084  1643 ; FULL OPEN BY FILE NAME LOGIC BEFORE ANY OF THEM COULD SET UP FOR FILE ID

                                     0084  1644 ; OPEN.  SINCE IT IS POSSIBLE THAT THE OPENS WERE ACTUALLY FOR DIFFERENT FILES

                                     0084  1645 ; IT IS NECESSARY TO FORCE THIS CALLER THROUGH THE ERROR EXIT PATH AND

                                     0084  1646 ; CAUSE A FULL RETRY.

                                     0084  1647 ;

                          009D   31  0084  1648 40$:	BRW	KRNL_RETRY_RSB

                                     0087  1649 ;

                                     0087  1650 ; KERNEL MODE ROUTINE TO ZERO THE FILE ID IN THE KNOWN FILE ENTRY

                                     0087  1651 ;

                                     0087  1652 ; CALLING SEQUENCE:

                                     0087  1653 ;

                                     0087  1654 ;	THIS ROUTINE IS INVOKED IN KERNEL MODE AT IPL 0 WITH A JSB INSTRUCTION

                                     0087  1655 ;

                                     0087  1656 ; INPUTS:

                                     0087  1657 ;

                                     0087  1658 ;	R4 = PCB ADDRESS FROM THE CHANGE MODE TO KERNEL DISPATCHER

                                     0087  1659 ;	R6 = IMAGE ACTIVATOR CONTEXT AREA ADDRESS

                                     0087  1660 ;	R7 = KNOWN FILE ENTRY ADDRESS IF NEGATIVE

                                     0087  1661 ;	R0-R4 MAY BE ALTERED

                                     0087  1662 ;	R5 MUST BE PRESERVED

                                     0087  1663 ;

                                     0087  1664 KRNL_ZERO_FID:

                          0B     10  0087  1665 	BSBB	KFI_LOCKW		;COROUTINE CALL TO LOCK MUTEX FOR WRITING

         0B A7            02     8A  0089  1666 	BICB	#KFI$M_FILIDOPEN,KFI$B_KFICTL(R7) ;STOP OPENING BY FILE ID

                       1C A7     7C  008D  1667 	CLRQ	KFI$W_FID(R7)		;ZERO THE FILE ID

            50            00'    3C  0090  1668 	MOVZWL	S^#SS$_NORMAL,R0	;SUCCESSFUL RETURN

                                 05  0093  1669 	RSB

                                     0094  1670 ;

                                     0094  1671 ; ENTRY POINT TO LOCK THE KNOWN FILE MUTEX FOR WRITING

                                     0094  1672 ;

                                     0094  1673 KFI_LOCKW:

            52   00000000'EF     DE  0094  1674 	MOVAL	IAC_KFI_LOCKW,R2	;ADDRESS OF LOCK ROUTINE

                          0631'  31  009B  1675 	BRW	KFI_LOCK_MTX		;JOIN KFI_LOCK CODE

                                     009E  1676 	.SBTTL	MARKED_FOR_DEL, MAKE_SHARED_WCB

                                     009E  1677 

                                 0000009E  1678 	.PSECT	YF$LOWUSE

                                     009E  1679 ;

                                     009E  1680 ; KERNEL MODE ROUTINE TO PUT A WINDOW INTO THE KNOWN FILE ENTRY AND THUS

                                     009E  1681 ; AVOID ALL SUBSEQUENT OPENS FOR THIS FILE.

                                     009E  1682 ;

                                     009E  1683 ; CALLING SEQUENCE:

                                     009E  1684 ;

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  34

0352            MARKED_FOR_DEL, MAKE_SHARED_WCB                                                                                  (1)



                                     009E  1685 ;	THIS ROUTINE IS INVOKED IN KERNEL MODE AT IPL 0 WITH A JSB INSTRUCTION

                                     009E  1686 ;

                                     009E  1687 ; INPUTS:

                                     009E  1688 ;

                                     009E  1689 ;	R4 = PCB ADDRESS FROM THE CHANGE MODE TO KERNEL DISPATCHER

                                     009E  1690 ;	R6 = IMAGE ACTIVATOR CONTEXT AREA ADDRESS

                                     009E  1691 ;	R7 = KNOWN FILE ENTRY ADDRESS IF NEGATIVE

                                     009E  1692 ;	R0-R4 MAY BE ALTERED

                                     009E  1693 ;	R5 MUST BE PRESERVED

                                     009E  1694 ;

                                     009E  1695 

                                     009E  1696 	.ENABL	LSB

                                     009E  1697 

                                     009E  1698 MARKED_FOR_DEL:

                          F4     10  009E  1699 	BSBB	KFI_LOCKW		;LOCK KNOWN FILE MUTEX FOR WRITING

                          38     11  00A0  1700 	BRB	60$			;MARK THE KFI ENTRY FOR DELETION

                                     00A2  1701 MAKE_SHARED_WCB:

                          F0     10  00A2  1702 	BSBB	KFI_LOCKW		;LOCK THE KNOWN FILE MUTEX FOR WRITING

            50         20 A6     3C  00A4  1703 	MOVZWL	CHAN(R6),R0		;CHANNEL ON WHICH FILE IS OPEN

                 00000000'EF     16  00A8  1704 	JSB	IOC$VERIFYCHAN		;VERIFY IT AND RETURN CCB ADR IN R1

            28            50     E9  00AE  1705 	BLBC	R0,40$			;BRANCH IF BAD CHANNEL

                                     00B1  1706 ;

                                     00B1  1707 ; NOW SET THE "DONOTOPEN" BIT IN KFICTL SO THAT SUBSEQUENT KNOWN FILE

                                     00B1  1708 ; OPENS WILL BYPASS OPENING THE FILE AND RETURN RMS$_KFF

                                     00B1  1709 ; IT IS POSSIBLE THAT AT THIS POINT THE "DONOTOPEN" BIT IS ALREADY

                                     00B1  1710 ; SET.  THIS WOULD HAPPEN IF 2 OR MORE PROCESSES ARE TRYING TO ACTIVATE 

                                     00B1  1711 ; THIS IMAGE FILE.  EACH GOT THE FILE OPEN INDIVIDUALLY AND EACH TRIED TO

                                     00B1  1712 ; CALL THIS ROUTINE TO ENHANCE THE KNOWN FILE ENTRY.  THE FIRST ONE

                                     00B1  1713 ; ENHANCED THE ENTRY, THE OTHERS WILL BACK ALL THE WAY OUT, CLOSE THE FILE

                                     00B1  1714 ; AND RETRY THE IMAGE ACTIVATION FROM THE TOP.

                                     00B1  1715 ;

         0B A7            02     E2  00B1  1716 	BBSS	#KFI$V_DONOTOPEN,KFI$B_KFICTL(R7),100$ ;SET INDICATOR THAT FILE

                          6E         00B5       

                                     00B6  1717 					;IS ALREADY OPEN, BRANCH IF ALREADY SET

            52         04 A1     D0  00B6  1718 	MOVL	CCB$L_WIND(R1),R2	;GET FILE WINDOW ADDRESS FROM CHANNEL

         0B A2            03     E2  00BA  1719 	BBSS	#WCB$V_SHRWCB,WCB$B_ACCESS(R2),20$ ;MAKE WINDOW SHARED

                          05         00BE       

                                     00BF  1720 					;BRANCH IF IT ALREADY IS

                                     00BF  1721 

                           00000000  00BF  1722 	.IF	EQ,<WCB$L_PID+2-WCB$W_REFCNT>

            01            10     9C  00BF  1723 	ROTL	#16,#1,WCB$W_REFCNT-2(R2) ;SET REFCNT TO 1, PID TO 0

                       0C A2         00C2       

                                     00C4  1724 	.IFF

                                     00C4  1725 	MOVW	#1,WCB$W_REFCNT(R2)	;INIT REFCNT T0 1 FOR THE COPY IN THE CCB

                                     00C4  1726 	.ENDC

                                     00C4  1727 

         1C A7            52     D0  00C4  1728 20$:	MOVL	R2,KFI$L_WINDOW(R7)	;PUT WCB POINTER IN KNOWN FILE ENTRY

                       0E A2     B6  00C8  1729 	INCW	WCB$W_REFCNT(R2)	;COUNT A 2ND REF FOR THE KNOWN FILE ENTRY

            50         18 A2     D0  00CB  1730 	MOVL	WCB$L_FCB(R2),R0	;FILE CONTROL BLOCK ADDRESS

                          05     13  00CF  1731 	BEQL	30$			;BRANCH IF NOT AN FCP WINDOW

         00'A0            00'    E0  00D1  1732 	BBS	S^#FCB$V_MARKDEL,B^FCB$W_STATUS(R0),60$

                          04         00D5       

                                     00D6  1733 					;BRANCH IF FILE IS MARKED FOR DELETE

            50            00'    3C  00D6  1734 30$:	MOVZWL	S^#SS$_NORMAL,R0	;SUCCESSFUL COMPLETION STATUS

                                 05  00D9  1735 40$:	RSB

                                     00DA  1736 ;

                                     00DA  1737 ; MUST DELETE THIS KNOWN FILE ENTRY AND MAKE ANOTHER

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  35

0352            MARKED_FOR_DEL, MAKE_SHARED_WCB                                                                                  (1)



                                     00DA  1738 ;

            53         12 A7     9A  00DA  1739 60$:	MOVZBL	KFI$B_KFIQNUM(R7),R3	;WHICH KNOWN FILE QUEUE IS THIS ENTRY ON

            53   00000000'FF43   D0  00DE  1740 	MOVL	@EXE$GL_KNOWNFIL[R3],R3	;ADR OF QUEUE HEADS FOR THIS KNOWN FILE QUEUE

                                     00E6  1741 ;

                                     00E6  1742 ;  0(R3) = ACTIVE QUEUE HEADER

                                     00E6  1743 ;  8(R3) = DELETE PENDING QUEUE HEADER

                                     00E6  1744 ; 16(R3) = FREE ENTRY QUEUE HEADER

                                     00E6  1745 ;

         0B A7            06     E0  00E6  1746 	BBS	#KFI$V_NOREPLACE,KFI$B_KFICTL(R7),80$ ;BRANCH IF DELETE NOT REPLACE

                          2C         00EA       

            50         10 B3     0F  00EB  1747 	REMQUE	@16(R3),R0		;GET A FREE ENTRY TO USE

                          E5     1D  00EF  1748 	BVS	30$			;BRANCH IF NONE AVAILABLE

                                     00F1  1749 					;IGNORE THE DELETE PENDING

            7E         13 A0     98  00F1  1750 	CVTBL	KFI$B_KFISEQ(R0),-(SP)	;SAVE SEQUENCE NUMBER OF NEW ENTRY

                          39     BB  00F5  1751 	PUSHR	#^M<R0,R3,R4,R5>	;SAVE THESE FROM MOVC

            67         08 A7     28  00F7  1752 	MOVC3	KFI$W_SIZE(R7),(R7),(R0) ;COPY THE KNOWN FILE ENTRY

                          60         00FB       

                          39     BA  00FC  1753 	POPR	#^M<R0,R3,R4,R5>	;RESTORE SAVED REGISTERS

         13 A0            8E     F6  00FE  1754 	CVTLB	(SP)+,KFI$B_KFISEQ(R0)	;RESTORE SEQUENCE NUMBER OF NEW ENTRY

         0B A0         C6 8F     8A  0102  1755 	BICB	#<KFI$M_FILIDOPEN !-	;ALL KFI ENTRY ENHANCEMENTS

                                     0107  1756 		KFI$M_DONOTOPEN !-	;WILL BE DONE ON THE FIRST

                                     0107  1757 		KFI$M_NOREPLACE ! -

                                     0107  1758 		KFI$M_MARKDEL>,KFI$B_KFICTL(R0) ;ACTIVATION OF THE IMAGE

         10 A0            01     B0  0107  1759 	MOVW	#1,KFI$W_REFCNT(R0)	;1 REFERENCE FOR THE KFI ENTRY ITSELF

                                     010B  1760 

                                     010B  1761 	ASSUME	KFI$W_GBLSECCNT EQ KFI$W_FLAGS+2

         14 A0         14 A0     9A  010B  1762 	MOVZBL	KFI$W_FLAGS(R0),KFI$W_FLAGS(R0) ;HIGH BYTE OF FLAGS CONTAINS

                                     0110  1763 					;ONLY THE DYNAMIC BITS

                                     0110  1764 					;ALSO ZERO GBLSECCNT

                                     0110  1765 

                                     0110  1766 	ASSUME	KFI$L_IMGHDR EQ KFI$L_WINDOW+4

                       1C A0     7C  0110  1767 	CLRQ	KFI$L_WINDOW(R0)	;NO OPEN CONTEXT YET

         04 B7            60     0E  0113  1768 	INSQUE	(R0),@KFI$L_KFIQBL(R7)	;PUT THIS ENTRY IN THE ACTIVE LIST

                                     0117  1769 80$:

            57            67     0F  0117  1770 	REMQUE	(R7),R7			;REMOVE THE KFI ENTRY FROM THE ACTIVE QUEUE

                       10 A7     B7  011A  1771 	DECW	KFI$W_REFCNT(R7)	;REMOVE BIAS FROM REFCNT

                       13 A7     96  011D  1772 	INCB	KFI$B_KFISEQ(R7)	;ALTER SEQUENCE NUMBER OF DELETED ENTRY

                                     0120  1773 					;WHERE THE OLD ENTRY WAS.

         08 A3            67     0E  0120  1774 	INSQUE	(R7),8(R3)		;PLACE DELETED ENTRY ON DELETE PENDING QUEUE

                                     0124  1775 KRNL_RETRY_RSB:

                                     0124  1776 

                                     0124  1777 	ASSUME	IAC_V_RETRY GE 8

                                     0124  1778 	ASSUME	IAC_V_RETRY LE 15

         59 A6            01     88  0124  1779 100$:	BISB	#IAC_M_RETRY@-8,IACFLG+1(R6) ;INDICATE THAT IMAGE ACTIVATION SHOULD

                                     0128  1780 					;BE RESTARTED FROM THE BEGINNING

                          50     D4  0128  1781 	CLRL	R0			;AFTER A FULL ERROR EXIT CLEANUP

                                 05  012A  1782 	RSB

                                     012B  1783 

                                     012B  1784 	.DSABL	LSB

                                     012B  1785 	.SBTTL	KRNL_MAK_RESHDR, KFI_COMPAT_MODE

                                     012B  1786 ;

                                     012B  1787 ; KERNEL MODE ROUTINE TO MAKE AN IMAGE HEADER RESIDENT

                                     012B  1788 ;

                                     012B  1789 ; CALLING SEQUENCE:

                                     012B  1790 ;

                                     012B  1791 ;	THIS ROUTINE IS INVOKED IN KERNEL MODE AT IPL 0 WITH A JSB INSTRUCTION

                                     012B  1792 ;

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  36

0352            KRNL_MAK_RESHDR, KFI_COMPAT_MODE                                                                                 (1)



                                     012B  1793 ; INPUTS:

                                     012B  1794 ;

                                     012B  1795 ;	R4 = PCB ADDRESS FROM THE CHANGE MODE TO KERNEL DISPATCHER

                                     012B  1796 ;	R6 = IMAGE ACTIVATOR CONTEXT AREA ADDRESS

                                     012B  1797 ;	R7 = KNOWN FILE ENTRY ADDRESS IF NEGATIVE

                                     012B  1798 ;	R0-R4 MAY BE ALTERED

                                     012B  1799 ;	R5 MUST BE PRESERVED

                                     012B  1800 ;	IOSB(R6) = ADDRESS OF END OF IMAGE HEADER

                                     012B  1801 ;	IOSB+4(R6) = ADDRESS OF BEGINNING OF IMAGE HEADER

                                     012B  1802 ;

                                     012B  1803 KRNL_MAK_RESHDR:

                          FF66   30  012B  1804 	BSBW	KFI_LOCKW		;LOCK THE MUTEX FOR WRITING

                                     012E  1805 					;CO-ROUTINE CALL BACK

                                     012E  1806 					;RSB TO UNLOCK AND RETURN TO CALLER

         14 A7            08     E0  012E  1807 	BBS	#KFI$V_IS_RESHDR,KFI$W_FLAGS(R7),20$ ;BRANCH IF ALREADY RESIDENT

                          38         0132       

         F0 A6         F4 A6     C3  0133  1808 	SUBL3	IOSB+4(R6),IOSB(R6),R1	;SIZE OF IMAGE HEADER

                          51         0138       

            51            10     C0  0139  1809 	ADDL	#<KFH$C_LENGTH+4>,R1	;3 LONG WORDS OVERHEAD AT BEGINNING

                                     013C  1810 					;FOR DYNAMIC STRUCTURE FORMAT

                                     013C  1811 					;1 LONG WORD AT END TO INCLUDE

                                     013C  1812 					;STOPPER FOR THE IMAGE HEADER

                          51     DD  013C  1813 	PUSHL	R1			;SAVE SIZE TO ALLOCATE

                 00000000'EF     16  013E  1814 	JSB	EXE$ALOPAGED		;ALLOCATE FROM PAGED POOL

                          02     BA  0144  1815 	POPR	#^M<R1>			;RECOVER SIZE TO BE ALLOCATED

            25            50     E9  0146  1816 	BLBC	R0,40$			;BRANCH IF FAILED

                                     0149  1817 

                                     0149  1818 	ASSUME	KFH$L_BUFEND EQ 0

                                     0149  1819 	ASSUME	KFH$L_KFIADR EQ 4

                                     0149  1820 	ASSUME	KFH$C_LENGTH EQ 12

            52            51     C1  0149  1821 	ADDL3	R1,R2,(R2)+		;STORE ADDRESS OF END OF HEADER

                          82         014C       

                                     014D  1822 					;IN THE FIRST LONG WORD

            82            57     D0  014D  1823 	MOVL	R7,(R2)+		;KFI ENTRY ADDRESS IN 2ND LONG WORD

            82            51     B0  0150  1824 	MOVW	R1,(R2)+		;SIZE OF KNOWN FILE HEADER

            82            00'    9B  0153  1825 	MOVZBW	S^#DYN$C_KFH,(R2)+	;TYPE OF DYNAMIC DATA

         20 A7            52     D0  0156  1826 	MOVL	R2,KFI$L_IMGHDR(R7)	;ADDRESS OF KNOWN FILE HEADER

            51            0C     C2  015A  1827 	SUBL	#KFH$C_LENGTH,R1	;SIZE OF HEADER TO MOVE

                          30     BB  015D  1828 	PUSHR	#^M<R4,R5>		;SAVE THESE FROM MOVC

         F4 B6            51     28  015F  1829 	MOVC3	R1,@IOSB+4(R6),(R2)	;MOVE THE HEADER TO KNOWN FILE HEADER

                          62         0163       

                          30     BA  0164  1830 	POPR	#^M<R4,R5>		;RESTORE REGISTERS

         14 A7            08     E6  0166  1831 	BBSSI	#KFI$V_IS_RESHDR,KFI$W_FLAGS(R7),20$ ;HEADER IS RESIDENT NOW

                          00         016A       

            50            00'    3C  016B  1832 20$:	MOVZWL	S^#SS$_NORMAL,R0	;SUCCESSFUL RETURN INDICATION

                                 05  016E  1833 40$:	RSB

                                     016F  1834 ;

                                     016F  1835 ; EXEC MODE ROUTINE TO DO THE KNOWN FILE ENHANCEMENT OF A COMPATIBILITY MODE IMAGE.

                                     016F  1836 ;

                                     016F  1837 KFI_COMPAT_MODE:

         64 A6         77'AF     9E  016F  1838 	MOVAB	B^10$,KRNLROUT(R6)	;ADDRESS OF KERNEL MODE ROUTINE

                          05EF'  31  0174  1839 	BRW	CMKRNL			;CALL THE FOLLOWING IN KERNEL MODE

                                     0177  1840 					;AND THEN RETURN TO THIS ROUTINE'S CALLER

                                     0177  1841 ;

                                     0177  1842 ; KERNEL MODE ROUTINE TO DO THE KNOW FILE ENHANCEMENT OF A COMPATIBLITY MODE IMAGE

                                     0177  1843 ;

                                     0177  1844 ; CALLING SEQUENCE:

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  37

0352            KRNL_MAK_RESHDR, KFI_COMPAT_MODE                                                                                 (1)



                                     0177  1845 ;

                                     0177  1846 ;	THIS ROUTINE IS INVOKED IN KERNEL MODE AT IPL 0 WITH A JSB INSTRUCTION

                                     0177  1847 ;

                                     0177  1848 ; INPUTS:

                                     0177  1849 ;

                                     0177  1850 ;	R4 = PCB ADDRESS FROM THE CHANGE MODE TO KERNEL DISPATCHER

                                     0177  1851 ;	R6 = IMAGE ACTIVATOR CONTEXT AREA ADDRESS

                                     0177  1852 ;	R7 = KNOWN FILE ENTRY ADDRESS IF NEGATIVE

                                     0177  1853 ;	R0-R4 MAY BE ALTERED

                                     0177  1854 ;	R5 MUST BE PRESERVED

                                     0177  1855 ;

         5A A6            02     E1  0177  1856 10$:	BBC	#KFI$V_KP_SHARED,KFIFLG(R6),50$ ;BRANCH IF NOT SUPPOSED TO BE SHARED

                          33         017B       

                                     017C  1857 ;

                                     017C  1858 ; COMPATIBILITY MODE SHARED KNOWN FILE

                                     017C  1859 ;

         14 A7            01     E7  017C  1860 	BBCCI	#KFI$V_KP_RESHDR,KFI$W_FLAGS(R7),40$ ;MAY NOT KEEP HEADER RESIDENT

                          00         0180       

                          0497'  30  0181  1861 40$:	BSBW	KFI_GBLSECNMINI		;INIT FOR GLOBAL SECTION NAME

                          04B6'  30  0184  1862 	BSBW	KFI_GBLSECNMNXT		;FORM NEXT/FIRST GLOBAL SECTION NAME

         C8 A6            01     D0  0187  1863 	MOVL	#ISD$K_MATEQU,KFIMATCHCTL(R6) ;IDENT WILL BE MATCH EQUAL

         CC A6       FF64 C6     D0  018B  1864 	MOVL	FAB+FAB$L_CTX(R6),KFIMATCHCTL+4(R6) ;ON KFIADR ! SEQUENCE NO.

            54       0314 C6     9E  0191  1865 	MOVAB	FIRSTHDR(R6),R4		;ADDRESS OF COMPAT MODE LABEL BLOCK

                                     0196  1866 ;

                                     0196  1867 ; SEE IF COMPATIBILITY MODE IMAGE IS A MULTI-USER IMAGE OR A LIBRARY/COMMON

                                     0196  1868 ;

         18 A4       4000 8F     B3  0196  1869 	BITW	#TS$NHD,L$BFLG(R4)	;IS THERE A HEADER?

                          13     12  019C  1870 	BNEQ	60$			;BRANCH IF NOT, MUST BE LIBRARY

            51       00F4 C4     3C  019E  1871 	MOVZWL	L$BLUN+2(R4),R1		;VBN OF MULTI-USER READ-ONLY SEGMENT

            50       00F6 C4     3C  01A3  1872 	MOVZWL	L$BLUN+4(R4),R0		;SIZE (64 BYTE UNITS) OF SEGMENT IF PRESENT

                          12     12  01A8  1873 	BNEQ	80$			;BRANCH IF IT IS PRESENT

                                     01AA  1874 ;

                                     01AA  1875 ; THIS IMAGE IS NEITHER A MULTI-USER IMAGE NOR A LIBRARY/COMMON

                                     01AA  1876 ;

         14 A7            02     E7  01AA  1877 	BBCCI	#KFI$V_KP_SHARED,KFI$W_FLAGS(R7),120$ ;CANNOT BE SHARED

                          52         01AE       

                          50     11  01AF  1878 50$:	BRB	120$

                                     01B1  1879 ;

                                     01B1  1880 ; COMPATIBILITY MODE IMAGE HAS NO HEADER, TREAT IT AS A LIBRARY/COMMON

                                     01B1  1881 ;

            51       00EE C4     3C  01B1  1882 60$:	MOVZWL	L$BHRB(R4),R1		;STARTING VBN - 1 OF COMMON

                          51     D6  01B6  1883 	INCL	R1			;STARTING VBN OF COMMON

            50         0E A4     3C  01B8  1884 	MOVZWL	L$BLDZ(R4),R0		;SIZE IN 64 BYTE UNITS

            50            07     C0  01BC  1885 80$:	ADDL	#7,R0			;ROUND UP SIZE TO THE NEXT 512 BYTES

            50            08     C6  01BF  1886 	DIVL	#8,R0			;AND FORM PAGE COUNT

            52       C001 8F     3C  01C2  1887 	MOVZWL	#<SEC$M_SYSGBL ! SEC$M_PERM ! - ;PERMANENT SYSTEM WIDE

                                     01C7  1888 		SEC$M_GBL>,R2		;GLOBAL SECTION, READ ONLY

         58 A6            01     E1  01C7  1889 	BBC	#IAC_V_WRITABLE,IACFLG(R6),100$ ;BRANCH IF READ ONLY SECTION

                          03         01CB       

            52            08     C8  01CC  1890 	BISL	#SEC$M_WRT,R2		;MAKE SECTION WRITABLE

                                     01CF  1891 100$:	$CRMPSC_S -			;CREATE THE SECTION

                                     01CF  1892 		INADR=0,-		;WITHOUT MAPPING IT

                                     01CF  1893 		ACMODE=S^#PSL$C_USER,-	;FOR USER MODE

                                     01CF  1894 		FLAGS=R2,-

                                     01CF  1895 		GSDNAM=GSDNAMSIZ(R6),-

                                     01CF  1896 		IDENT=KFIMATCHCTL(R6),-

                                     01CF  1897 		CHAN=CHAN(R6),-		;CHANNEL ON WHICH THE FILE IS OPEN

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  38

0352            KRNL_MAK_RESHDR, KFI_COMPAT_MODE                                                                                 (1)



                                     01CF  1898 		PAGCNT=R0,-

                                     01CF  1899 		VBN=R1

                          7E     7C  01CF       		CLRQ	-(SP)

                          51     DD  01D1       		PUSHL	R1

                          50     DD  01D3       		PUSHL	R0

            7E         20 A6     3C  01D5       		MOVZWL	CHAN(R6),-(SP)

                          00     DD  01D9       		PUSHL	#0

                       C8 A6     7F  01DB       		PUSHAQ	KFIMATCHCTL(R6)

                       74 A6     7F  01DE       		PUSHAQ	GSDNAMSIZ(R6)

                          52     DD  01E1       		PUSHL	R2

                          00'    DD  01E3       		PUSHL	S^#PSL$C_USER

                          00     DD  01E5       		PUSHL	#0

                          00     DD  01E7       		PUSHL	#0

   00000000'GF            0C     FB  01E9       		CALLS	#12,G^SYS$CRMPSC

            13            50     E9  01F0  1900 	BLBC	R0,140$			;BRANCH IF FAILED TO CREATE GLOBAL SECTION

                                     01F3  1901 					;DON'T SET COMPATMOD BIT

                                     01F3  1902 					;KEEP TRYING ON EACH ACTIVATION

                                     01F3  1903 ;

                                     01F3  1904 ; GLOBAL SECTION SUCCESSFULLY CREATED

                                     01F3  1905 ;

                                     01F3  1906 	ASSUME	KFI$L_IDENT EQ KFI$B_MATCHCTL+4

         2C A7         C8 A6     7D  01F3  1907 	MOVQ	KFIMATCHCTL(R6),KFI$B_MATCHCTL(R7) ;RECORD IDENT FOR DELETING PURPOSES

         16 A7            01     B0  01F8  1908 	MOVW	#1,KFI$W_GBLSECCNT(R7)	;ONE GLOBAL SECTION TO DELETE

         14 A7            09     E6  01FC  1909 	BBSSI	#KFI$V_IS_SHARED,KFI$W_FLAGS(R7),120$ ;WAS MADE SHARED

                          00         0200       

         14 A7            0F     E6  0201  1910 120$:	BBSSI	#KFI$V_COMPATMOD,KFI$W_FLAGS(R7),140$ ;IS COMPAT MODE IMAGE

                          00         0205       

                       B8 A6     D4  0206  1911 140$:	CLRL	KFINAMSTR(R6)		;MUST CLEAN UP ALL SIDE EFFECTS

                                     0209  1912 					;SO THAT RSX.EXE CAN BE ACTIVATED

                          05DD'  31  0209  1913 	BRW	KRNL_KFI_DECREF		;RELEASE REFERENCE ON COMPAT MODE

                                     020C  1914 					;KNOWN FILE ENTRY AND RETURN

                                     020C  1915 					;TO THIS ROUTINE'S CALLER

                                     020C  1916 	.SBTTL	MANUAL FILE OPEN - NO RMS OR FCP AVAILABLE

                                     020C  1917 ;

                                     020C  1918 ; CALLING SEQUENCE:

                                     020C  1919 ;

                                     020C  1920 ;	BRW	MANUAL_OPEN

                                     020C  1921 ;

                                     020C  1922 ; INPUTS:

                                     020C  1923 ;

                                     020C  1924 ;	RUNS IN EXEC MODE

                                     020C  1925 ;	R0 = ADDRESS OF NAME STRING DESCRIPTOR

                                     020C  1926 ;	R1 = SIZE OF NAME STRING

                                     020C  1927 ;	R2 = ADDRESS OF NAME STRING

                                     020C  1928 ;	R4 = ADDRESS OF INDEX FILE HEADER BUFFER

                                     020C  1929 ;	R5 = ADDRESS OF FILE ACCESS BLOCK (FAB)

                                     020C  1930 ;	R6 = ADDRESS OF SCRATCH AREA

                                     020C  1931 ;

                                     020C  1932 ; OUTPUTS:

                                     020C  1933 ;

                                     020C  1934 ;	FILESIZE(R6) = SIZE OF FILE

                                     020C  1935 ;	FILELBN(R6)  = STARTING LOGICAL BLOCK OF FILE

                                     020C  1936 ;		     = 0 IF NOT FOUND OR NOT CONTIGUOUS

                                     020C  1937 ;	BRANCHES TO FILE_IS_OPEN IF SUCCESSFUL

                                     020C  1938 ;	RETURNS WITH ERROR STATUS IN R0 IF NOT

                                     020C  1939 ;

                                     020C  1940 

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  39

0352            MANUAL FILE OPEN - NO RMS OR FCP AVAILABLE                                                                       (1)



                                 00000000  1941 	.PSECT	YFILEREAD BYTE,EXE

                                     0000  1942 

                                     0000  1943 MANUAL_OPEN:

         F0 A6            51     7D  0000  1944 	MOVQ	R1,IOSB(R6)		;SAVE NAME DESCRIPTOR

                       44 A6     DF  0004  1945 	PUSHAL	FILELBN(R6)		;ADDRESS TO RETURN STATBLK

                     0114 C6     DF  0007  1946 	PUSHAL	OTHERHDR(R6)		;FILE HEADER BUFFER

                          64     DF  000B  1947 	PUSHAL	(R4)			;INDEX FILE HEADER BUFFFER

                          50     DD  000D  1948 	PUSHL	R0			;ADDRESS OF NAME DESCRIPTOR

                       20 A6     DF  000F  1949 	PUSHAL	CHAN(R6)		;ADDRESS OF RETURN CHANNEL

   00000000'EF            05     FB  0012  1950 	CALLS	#5,FIL$OPENFILE 	;"OPEN" THE FILE

         0C A5         20 A6     3C  0019  1951 	MOVZWL	CHAN(R6),FAB$L_STV(R5)	;PUT CHANNEL WHERE RMS WOULD

            21            50     E9  001E  1952 	BLBC	R0,40$			;EXIT IF ERROR

                       44 A6     D5  0021  1953 	TSTL	FILELBN(R6)		;IS FILE CONTIGUOUS

                          17     13  0024  1954 	BEQL	20$			;BRANCH IF NOT

                                     0026  1955 

                                     0026  1956 	ASSUME	FAB$V_CTG GE 16

                                     0026  1957 	ASSUME	FAB$V_CTG LT 24

         06 A5            10     88  0026  1958 	BISB	#FAB$M_CTG@-16,FAB$L_FOP+2(R5) ;NOTE FILE CONTIGUOUS

         64 A6         43'AF     DE  002A  1959 	MOVAL	B^INIT_WINDOW,KRNLROUT(R6) ;ALLOCATE AND INIT A WINDOW

                          0734'  30  002F  1960 	BSBW	CMKRNL			;IN KERNEL MODE

            0D            50     E9  0032  1961 	BLBC	R0,40$			;BRANCH IF ERROR

            53       FF14 C6     DE  0035  1962 	MOVAL	NAM(R6),R3		;ADDRESS OF NAME BLOCK

                          00AA'  31  003A  1963 	BRW	MANUAL_OPN_DONE		;REJOIN COMMON IMAGE ACTIVATION CODE

                                     003D  1964 ;

                                     003D  1965 ; ERROR EXITS

                                     003D  1966 ;

            50       0000'8F     3C  003D  1967 20$:	MOVZWL	#SS$_FILNOTCNTG,R0	;FILE NOT CONTIGUOUS

                                 04  0042  1968 40$:	RET				;RETURN WITH R0 INDICATING STATUS

                                     0043  1969 

                                     0043  1970 ;

                                     0043  1971 ; KERNEL MODE ROUTINE TO INTERFACE TO THE ALLOCATE AND INIT WINDOW ROUTINE

                                     0043  1972 ;

                                     0043  1973 ; CALLING SEQUENCE:

                                     0043  1974 ;

                                     0043  1975 ;	THIS ROUTINE IS INVOKED IN KERNEL MODE AT IPL 0 WITH A JSB INSTRUCTION

                                     0043  1976 ;

                                     0043  1977 ; INPUTS:

                                     0043  1978 ;

                                     0043  1979 ;	R4 = PCB ADDRESS FROM THE CHANGE MODE TO KERNEL DISPATCHER

                                     0043  1980 ;	R6 = IMAGE ACTIVATOR CONTEXT AREA ADDRESS

                                     0043  1981 ;	R7 = KNOWN FILE ENTRY ADDRESS IF NON-ZERO

                                     0043  1982 ;	IOSB(R6) = SIZE OF NAME STRING

                                     0043  1983 ;	IOSB+4(R6) = ADDRESS OF NAME STRING

                                     0043  1984 ;	R0-R4 MAY BE ALTERED

                                     0043  1985 ;	R5 MUST BE PRESERVED

                                     0043  1986 ;

                                     0043  1987 INIT_WINDOW:

            50         20 A6     3C  0043  1988 	MOVZWL	CHAN(R6),R0		;CHANNEL INDEX

                 00000000'EF     16  0047  1989 	JSB	IOC$VERIFYCHAN		;VERIFY CHANNEL, GET CCB ADDRESS IN R1

            62            50     E9  004D  1990 	BLBC	R0,80$			;BRANCH IF BAD CHANNEL

                          51     DD  0050  1991 	PUSHL	R1			;SAVE CCB ADDRESS

            53            61     D0  0052  1992 	MOVL	CCB$L_UCB(R1),R3	;UCB ADDRESS

            52         44 A6     D0  0055  1993 	MOVL	FILELBN(R6),R2		;STARTING LOGICAL BLOCK NUMBER

            51         48 A6     D0  0059  1994 	MOVL	FILESIZE(R6),R1		;SIZE IN BLOCKS OF THE FILE

                          66     10  005D  1995 	BSBB	MMG$INIWCB		;ALLOCATE AND INIT A WINDOW CONTROL BLOCK

                          02     BA  005F  1996 	POPR	#^M<R1>			;RECOVER CCB ADDRESS

            4E            50     E9  0061  1997 	BLBC	R0,80$			;BRANCH IF FAILED

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  40

0352            MANUAL FILE OPEN - NO RMS OR FCP AVAILABLE                                                                       (1)



         04 A1            52     D0  0064  1998 	MOVL	R2,CCB$L_WIND(R1)	;SET WINDOW ADDRESS IN CHANNEL

                       00'A4     B7  0068  1999 	DECW	B^PCB$W_FILCNT(R4)	;CHARGE A FILE AGAINST THE QUOTA

         09 A1            01'    90  006B  2000 	MOVB	S^#PSL$C_USER+1,CCB$B_AMOD(R1) ;USER MODE CHANNEL

                                     006F  2001 ;

                                     006F  2002 ; SEE IF THIS IMAGE IS THE FCP FOR THE SYSTEM VOLUME

                                     006F  2003 ;

            57   00000000'EF     D0  006F  2004 	MOVL	KFI$GL_F11AACP,R7	;GET ADDRESS OF KNOWN FILE ENTRY

                          37     13  0076  2005 	BEQL	60$			;BRANCH IF NONE EXISTS (WEAK GLOBAL)

         F0 A6            13'    D1  0078  2006 	CMPL	S^#FCPSTRSIZ,IOSB(R6)	;DO STRING SIZES MATCH?

                          31     12  007C  2007 	BNEQ	60$			;BRANCH IF NOT

         B3'AF            0B'    29  007E  2008 	CMPC3	S^#FCPSTRSIZ1,B^FCPSTR,@IOSB+4(R6) ;FIRST PARTS EQUAL?

                       F4 B6         0082       

                          29     12  0084  2009 	BNEQ	60$			;BRANCH IF NOT

            54            83     9A  0086  2010 	MOVZBL	(R3)+,R4		;SAVE STRUCTURE LEVEL CHAR (A, OR B)

            61            07'    29  0089  2011 	CMPC3	S^#FCPSTRSIZ2,(R1),(R3)	;LAST PARTS EQUAL?

                          63         008C       

                          20     12  008D  2012 	BNEQ	60$			;BRANCH IF NOT

            54         41 8F     91  008F  2013 	CMPB	#^A/A/,R4		;"A" FOR STRUCTURE LEVEL 1

                          06     13  0093  2014 	BEQL	40$			;BRANCH IF IT IS

            54         42 8F     91  0095  2015 	CMPB	#^A/B/,R4		;"B" FOR STRUCTURE LEVEL 2

                          14     12  0099  2016 	BNEQ	60$			;BRANCH IF NOT A MATCH

                                     009B  2017 ;

                                     009B  2018 ; PUT STRUCTURE LEVEL CHARACTER IN KNOWN FILE ENTRY

                                     009B  2019 ;

            50         0E A7     9A  009B  2020 40$:	MOVZBL	KFI$B_FILNAM(R7),R0	;OFFSET TO COUNTED FILE NAME IN KFI ENTRY

         04 A740          54     90  009F  2021 	MOVB	R4,4(R7)[R0]		;STORE IN 4TH CHARACTER OF COUNTED STRING

                                     00A4  2022 					;1ST IS COUNT, NEXT 3 ARE "F11"

                       13 A7     94  00A4  2023 	CLRB	KFI$B_KFISEQ(R7)	;ZERO SEQUENCE NUMBER

       FF64 C6            57     D0  00A7  2024 	MOVL	R7,FAB$L_CTX+FAB(R6)	;PUT KFI ADR WHERE RMS WOULD

                       18 A7     D6  00AC  2025 	INCL	KFI$L_USECNT(R7)	;COUNT THE USE OF THE KFI ENTRY

            50            00'    3C  00AF  2026 60$:	MOVZWL	S^#SS$_NORMAL,R0	;SUCCESSFUL COMPLETION

                                 05  00B2  2027 80$:	RSB

                                     00B3  2028 

                                     00B3  2029 ;

                                     00B3  2030 ; FCP NAME FOR STRUCTURE LEVEL 1 OR 2 VOLUME

                                     00B3  2031 ;

                                     00B3  2032 FCPSTR:

   31 31 46 5D 45 58 45 53 59 53 5B  00B3  2033 	.ASCII	/[SYSEXE]F11/		;FOLLOWED BY "A" OR "B"

                           0000000B  00BE  2034 	FCPSTRSIZ1=.-FCPSTR

               45 58 45 2E 50 43 41  00BE  2035 10$:	.ASCII	/ACP.EXE/

                           00000007  00C5  2036 	FCPSTRSIZ2=.-10$

                           00000013  00C5  2037 	FCPSTRSIZ=.+1-FCPSTR		;SIZE OF FULL FCP NAME STRING

                                     00C5  2038 	.SBTTL	INIWCB - INIT WINDOW CONTROL BLOCK

                                     00C5  2039 

                                     00C5  2040 ;++

                                     00C5  2041 ; FUNCTIONAL DESCRIPTION:

                                     00C5  2042 ;

                                     00C5  2043 ;	THIS ROUTINE ALLOCATES AND FILLS IN A WINDOW CONTROL BLOCK

                                     00C5  2044 ; IT RUNS IN KERNEL MODE AT IPL=0

                                     00C5  2045 ;

                                     00C5  2046 ; CALLING SEQUENCE:

                                     00C5  2047 ;

                                     00C5  2048 ;	BSBW	MMG$INIWCB

                                     00C5  2049 ;

                                     00C5  2050 ;

                                     00C5  2051 ; INPUT PARAMETERS:

                                     00C5  2052 ;

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  41

0352            INIWCB - INIT WINDOW CONTROL BLOCK                                                                               (1)



                                     00C5  2053 ;	R1 = SIZE OF FILE IN BLOCKS

                                     00C5  2054 ;	R2 = STARTING LBN OF FILE

                                     00C5  2055 ;	R3 = UCB ADDRESS

                                     00C5  2056 ;

                                     00C5  2057 ; IMPLICIT INPUTS:

                                     00C5  2058 ;

                                     00C5  2059 ;	NONE

                                     00C5  2060 ;

                                     00C5  2061 ; OUTPUT PARAMETERS:

                                     00C5  2062 ;

                                     00C5  2063 ;	R0 LOW BIT SET IF OK, LOW BIT CLEAR IF ERROR

                                     00C5  2064 ;	R2 = WINDOW CONTROL BLOCK ADDRESS IF SUCCESSFUL

                                     00C5  2065 ;	R3 PRESERVED IF SUCCESSFUL

                                     00C5  2066 ;

                                     00C5  2067 ; IMPLICIT OUTPUTS:

                                     00C5  2068 ;

                                     00C5  2069 ;	NONE

                                     00C5  2070 ;

                                     00C5  2071 ; COMPLETION CODES:

                                     00C5  2072 ;

                                     00C5  2073 ;	NONE

                                     00C5  2074 ;

                                     00C5  2075 ; SIDE EFFECTS:

                                     00C5  2076 ;

                                     00C5  2077 ;	NONE

                                     00C5  2078 ;

                                     00C5  2079 ;--

                                     00C5  2080 

                                     00C5  2081 

                                 000000C5  2082 	.PSECT	YFILEREAD BYTE,EXE

                                     00C5  2083 

                                     00C5  2084 MMG$INIWCB::

                          0E     BB  00C5  2085 	PUSHR	#^M<R1,R2,R3>		;SAVE INPUT PARAMETERS

            52       FFFE 8F     3C  00C7  2086 	MOVZWL	#-2,R2			;2**16 - 2, FOR ROUNDING SIZE UP

            51            8241   9E  00CC  2087 	MOVAB	(R2)+[R1],R1		;R1 = ROUNDED UP BLOCK COUNT

                                     00D0  2088 					;R2 = 2**16 - 1

            51            52     C6  00D0  2089 	DIVL	R2,R1			;R1 = RETRIEVAL POINTER COUNT

                          06     BB  00D3  2090 	PUSHR	#^M<R1,R2>		;SAVE RTRV PTR COUNT, ^X0000FFFF

            51            06     C4  00D5  2091 	MULL	#6,R1			;6 BYTES NEEDED FOR EACH RTRV PTR

            51            24     C0  00D8  2092 	ADDL	#WCB$K_LENGTH,R1	;DESIRED BLOCK SIZE TO ALLOCATE

                 00000000'EF     16  00DB  2093 	JSB	EXE$ALONONPAGED		;ALLOCATE NON PAGED DYNAMIC MEMORY

            4D            50     E9  00E1  2094 	BLBC	R0,100$			;BRANCH IF FAILED TO ALLOCATE

                                     00E4  2095 ;

                                     00E4  2096 ; R1 = ALLOCATED SIZE, R2 = ADDRESS OF ALLOCATED AREA

                                     00E4  2097 ;

            51            08     C7  00E4  2098 	DIVL3	#8,R1,R3		;TRUNCATED NO. OF QUAD WORDS TO ZERO

                          53         00E7       

            50            52     D0  00E8  2099 	MOVL	R2,R0			;MAKE A COPY OF THE WCB ADDRESS

                          80     7C  00EB  2100 20$:	CLRQ	(R0)+			;CLEAR THE WCB

            FB            53     F5  00ED  2101 	SOBGTR	R3,20$

         08 A2            51     B0  00F0  2102 	MOVW	R1,WCB$W_SIZE(R2)	;SAVE ALLOCATED WCB SIZE

         0A A2            00'    90  00F4  2103 	MOVB	S^#DYN$C_WCB,WCB$B_TYPE(R2) ;SET TYPE FIELD

         0B A2            05     90  00F8  2104 	MOVB	#<WCB$M_READ ! -	;FILE ACCESSED FOR READING

                                     00FC  2105 		WCB$M_NOTFCP>,WCB$B_ACCESS(R2) ;BUT NOT BY FCP

         16 A2            8E     F7  00FC  2106 	CVTLW	(SP)+,WCB$W_NMAP(R2)	;RETRIEVAL POINTER COUNT

                       20 A2     D6  0100  2107 	INCL	WCB$L_STVBN(R2)		;STARTING VBN IS 1

   00000000'EF            62     0E  0103  2108 	INSQUE	(R2),EXE$GL_SYSWCBFL	;MAINTAIN A LIST OF THESE WCB'S

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  42

0352            INIWCB - INIT WINDOW CONTROL BLOCK                                                                               (1)



                          0B     BA  010A  2109 	POPR	#^M<R0,R1,R3>		;R0=^X0000FFFF, R1=SIZE, R3=START LBN

                          52     DD  010C  2110 	PUSHL	R2			;SAVE WCB ADDRESS

            52            24     C0  010E  2111 	ADDL	#WCB$W_P1_COUNT,R2	;ADDRESS OF 1ST RETRIEVAL POINTER

            51            50     D1  0111  2112 40$:	CMPL	R0,R1			;IF MAX RTRV PTR SIZE IS

                          03     1B  0114  2113 	BLEQU	50$			;GREATER THAN WHAT IS LEFT

            50            51     D0  0116  2114 	MOVL	R1,R0			;USE WHAT IS LEFT

            82            50     B0  0119  2115 50$:	MOVW	R0,(R2)+		;STORE RTRV PTR COUNT

            82            53     D0  011C  2116 	MOVL	R3,(R2)+		;AND STARTING LBN

            53            50     C0  011F  2117 	ADDL	R0,R3			;START LBN OF NEXT RTRV PTR

            51            50     C2  0122  2118 	SUBL	R0,R1			;NUMBER OF BLOCKS LEFT

                          EA     12  0125  2119 	BNEQ	40$			;BRANCH IF ANY LEFT

                                     0127  2120 

                          0C     BA  0127  2121 	POPR	#^M<R2,R3>		;R2 = WCB ADR, R3 = UCB ADR

         10 A2            53     D0  0129  2122 	MOVL	R3,WCB$L_ORGUCB(R2)	;SET UCB ADDRESS IN WINDOW

            50            00'    3C  012D  2123 	MOVZWL	S^#SS$_NORMAL,R0	;INDICATE SUCCESSFUL COMPLETION

                                 05  0130  2124 	RSB				;AND RETURN

                                     0131  2125 ;

                                     0131  2126 ; ERROR EXIT WITH R0 = STATUS CODE

                                     0131  2127 ;

            5E            14     C0  0131  2128 100$:	ADDL	#5*4,SP

                                 05  0134  2129 	RSB

                                     0135  2130 

                                     0135  2131 

                                     0135  2132 

                                     0135  2133 	.END

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  43

SYMBOL TABLE                                                                                                                     (1)



$$.TMP1        = 00000001            EXE$GL_KFIMTX    ********   X   05   FAB$M_FTN      = 00000001            

$$.TMP2        = 00000065            EXE$GL_KNOWNFIL  ********   X   07   FAB$M_GET      = 00000002            

$$ARGS         = 00000005            EXE$GL_SYSWCBFL  ********   X   08   FAB$M_INP      = 00080000            

$$T1           = 00000000            EXE$IMGACT       00000000 RG    05   FAB$M_JNL      = 00400000            

ACMODE           0000000C            EXE$V_INIT       ********   X   05   FAB$M_KFO      = 40000000            

ARGCNT           00000000            FAB              FFFFFF4C            FAB$M_MSE      = 00000010            

BADIMGHDR        00000242 R     05   FAB$B_BID        00000000            FAB$M_MXV      = 00000002            

BADIMGHDR1       00000505 R     05   FAB$B_BKS        0000003E            FAB$M_NAM      = 01000000            

BIT...         = 00000009            FAB$B_BLN        00000001            FAB$M_NEF      = 00000400            

BUFEND           FFFFFFD0            FAB$B_DNS        00000035            FAB$M_NFS      = 00010000            

CCB$B_AMOD       00000009            FAB$B_FAC        00000016            FAB$M_NIL      = 00000020            

CCB$B_STS        00000008            FAB$B_FNS        00000034            FAB$M_OFP      = 20000000            

CCB$C_LENGTH     00000010            FAB$B_FSZ        0000003F            FAB$M_POS      = 00000100            

CCB$K_LENGTH     00000010            FAB$B_ORG        0000001D            FAB$M_PPF      = 00040000            

CCB$L_DIRP       0000000C            FAB$B_RAT        0000001E            FAB$M_PPF_IND  = 00004000            

CCB$L_UCB        00000000            FAB$B_RFM        0000001F            FAB$M_PPF_RAT  = 00003FC0            

CCB$L_WIND       00000004            FAB$B_RTV        0000001C            FAB$M_PRN      = 00000004            

CCB$W_IOC        0000000A            FAB$B_SHR        00000017            FAB$M_PUT      = 00000001            

CHAN             00000020            FAB$C_BID      = 00000003            FAB$M_RCK      = 00800000            

CHKISD           000004DD R     05   FAB$C_BLN        00000050            FAB$M_RWC      = 00000800            

CMKFIADR         00000050            FAB$C_FIX      = 00000001            FAB$M_RWO      = 00000080            

CMKRNL           00000766 R     05   FAB$C_HSH      = 00000030            FAB$M_SCF      = 00004000            

CRETVA$_ACMODE = 0000000C            FAB$C_IDX      = 00000020            FAB$M_SHRDEL   = 00000004            

CRETVA$_INADR  = 00000004            FAB$C_MAXRFM   = 00000003            FAB$M_SHRGET   = 00000002            

CRETVA$_NARGS  = 00000003            FAB$C_REL      = 00000010            FAB$M_SHRPUT   = 00000001            

CRETVA$_RETADR = 00000008            FAB$C_RFM_DFLT = 00000002            FAB$M_SHRUPD   = 00000008            

CRMPSC$_ACMODE = 0000000C            FAB$C_SEQ      = 00000000            FAB$M_SPL      = 00002000            

CRMPSC$_CHAN   = 00000020            FAB$C_UDF      = 00000000            FAB$M_SQO      = 00000040            

CRMPSC$_FLAGS  = 00000010            FAB$C_VAR      = 00000002            FAB$M_SUP      = 00000004            

CRMPSC$_GSDNAM = 00000014            FAB$C_VFC      = 00000003            FAB$M_TEF      = 10000000            

CRMPSC$_IDENT  = 00000018            FAB$K_BLN        00000050            FAB$M_TMD      = 00000010            

CRMPSC$_INADR  = 00000004            FAB$L_ALQ        00000010            FAB$M_TMP      = 00000008            

CRMPSC$_NARGS  = 0000000C            FAB$L_CTX        00000018            FAB$M_TRN      = 00000010            

CRMPSC$_PAGCNT = 00000024            FAB$L_DEV        00000040            FAB$M_UFM      = 04000000            

CRMPSC$_PFC    = 00000030            FAB$L_DNA        00000030            FAB$M_UFO      = 00020000            

CRMPSC$_PROT   = 0000002C            FAB$L_FNA        0000002C            FAB$M_UPD      = 00000008            

CRMPSC$_RELPAG = 0000001C            FAB$L_FOP        00000004            FAB$M_UPI      = 00000040            

CRMPSC$_RETADR = 00000008            FAB$L_JNL        00000020            FAB$M_WCK      = 00000200            

CRMPSC$_VBN    = 00000028            FAB$L_MRN        00000038            FAB$S_ORG      = 00000004            

CTL$AL_STACK     ********   X   05   FAB$L_NAM        00000028            FAB$S_PPF_RAT  = 00000008            

CTL$GL_PHD       ********   X   05   FAB$L_SDC        00000044            FAB$V_BIO      = 00000005            

CTL$GL_RUNDNFLG  ********   X   05   FAB$L_STS        00000008            FAB$V_BLK      = 00000003            

CTL$GQ_PROCPRIV  ********   X   05   FAB$L_STV        0000000C            FAB$V_BRO      = 00000006            

CTLBASADR        FFFFFFD8            FAB$L_XAB        00000024            FAB$V_CBT      = 00000015            

CTLBASCNT        FFFFFFD4            FAB$M_BIO      = 00000020            FAB$V_CIF      = 00000019            

DFLTNAME         00000008            FAB$M_BLK      = 00000008            FAB$V_CR       = 00000001            

DIR...         = 00000001            FAB$M_BRO      = 00000040            FAB$V_CTG      = 00000014            

DYN$C_KFH        ********   X   07   FAB$M_CBT      = 00200000            FAB$V_DEL      = 00000002            

DYN$C_WCB        ********   X   08   FAB$M_CIF      = 02000000            FAB$V_DFW      = 00000005            

DZRO_SEC         000004B2 R     05   FAB$M_CR       = 00000002            FAB$V_DLT      = 0000000F            

ENDVA            00000038            FAB$M_CTG      = 00100000            FAB$V_DMO      = 0000000C            

END_OF_ISDS      0000052F R     05   FAB$M_DEL      = 00000004            FAB$V_ESC      = 0000001B            

EXE$ALONONPAGED  ********   X   08   FAB$M_DFW      = 00000020            FAB$V_EXE      = 00000007            

EXE$ALOPAGED     ********   X   07   FAB$M_DLT      = 00008000            FAB$V_FTN      = 00000000            

EXE$CHKRDACCES   ********   X   05   FAB$M_DMO      = 00001000            FAB$V_GET      = 00000001            

EXE$DEAPAGED     ********   X   07   FAB$M_ESC      = 08000000            FAB$V_INP      = 00000013            

EXE$GL_FLAGS     ********   X   05   FAB$M_EXE      = 00000080            FAB$V_JNL      = 00000016            

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  44

SYMBOL TABLE                                                                                                                     (1)



FAB$V_KFO      = 0000001E            GLOBAL_SEC       000003D2 R     05   IHD$M_MATCHCTL = 07000000            

FAB$V_MSE      = 00000004            GSDNAM           00000014            IHD$M_NOP0BUFS = 00000004            

FAB$V_MXV      = 00000001            GSDNAMADR        00000078            IHD$M_PICIMG   = 00000008            

FAB$V_NAM      = 00000018            GSDNAMSIZ        00000074            IHD$Q_PRIVREQS   00000014            

FAB$V_NEF      = 0000000A            HDRBLKCNT        FFFFFFDC            IHD$S_MATCHCTL = 00000003            

FAB$V_NFS      = 00000010            HDRBUF           0000000C            IHD$V_LNKDEBUG = 00000000            

FAB$V_NIL      = 00000005            HDRVBN           FFFFFFE0            IHD$V_LNKNOTFR = 00000001            

FAB$V_OFP      = 0000001D            IAC$CLRIACLOCK   00000080 RG    06   IHD$V_MATCHCTL = 00000018            

FAB$V_ORG      = 00000004            IAC$TRNGBLSEC    0000065D RG    05   IHD$V_NOP0BUFS = 00000002            

FAB$V_POS      = 00000008            IACFLG           00000058            IHD$V_PICIMG   = 00000003            

FAB$V_PPF      = 00000012            IAC_KFI_LOCKW    00000000 R     06   IHD$W_ACTIVOFF   00000002            

FAB$V_PPF_IND  = 0000000E            IAC_M_IS_RESHDR= 00000010            IHD$W_IMGIDOFF   00000006            

FAB$V_PPF_RAT  = 00000006            IAC_M_KP_RESHDR= 00000008            IHD$W_IMGIOCNT   0000001E            

FAB$V_PRN      = 00000002            IAC_M_LIM      = 00000020            IHD$W_IOCHANCNT  0000001C            

FAB$V_PUT      = 00000000            IAC_M_NOACT    = 00000001            IHD$W_MAJORID    0000000C            

FAB$V_RCK      = 00000017            IAC_M_NOTSHARED= 00000040            IHD$W_MINORID    0000000E            

FAB$V_RWC      = 0000000B            IAC_M_RETRY    = 00000100            IHD$W_PATCHOFF   00000008            

FAB$V_RWO      = 00000007            IAC_M_WRITABLE = 00000002            IHD$W_SIZE       00000000            

FAB$V_SCF      = 0000000E            IAC_M_XLINKER  = 00000004            IHD$W_SYMDBGOFF  00000004            

FAB$V_SHRDEL   = 00000002            IAC_V_IS_RESHDR= 00000004            IHX$B_HDRBLKCNT  00000002            

FAB$V_SHRGET   = 00000001            IAC_V_KP_RESHDR= 00000003            IHX$C_LENGTH     00000038            

FAB$V_SHRPUT   = 00000000            IAC_V_LIM      = 00000005            IHX$K_LENGTH     00000038            

FAB$V_SHRUPD   = 00000003            IAC_V_NOACT    = 00000000            IHX$K_MAJORID  = 00003130            

FAB$V_SPL      = 0000000D            IAC_V_NOTSHARED= 00000006            IHX$K_MINORID  = 00003130            

FAB$V_SQO      = 00000006            IAC_V_RETRY    = 00000008            IHX$K_MINORID1 = 00003130            

FAB$V_SUP      = 00000002            IAC_V_WRITABLE = 00000001            IHX$L_DSTVBN     00000028            

FAB$V_TEF      = 0000001C            IAC_V_XLINKER  = 00000002            IHX$L_GSTVBN     0000002C            

FAB$V_TMD      = 00000004            IDENT            00000018            IHX$L_TFRADR3    00000034            

FAB$V_TMP      = 00000003            IDMATCHCTL       FFFFFFF8            IHX$Q_STARTADR   00000004            

FAB$V_TRN      = 00000004            IFD$C_LENGTH     00000014            IHX$T_IMGNAM     00000010            

FAB$V_UFM      = 0000001A            IFD$K_LENGTH     00000014            IHX$W_DSTBLKS    00000030            

FAB$V_UFO      = 00000011            IFD$L_CMKFIADR   0000000C            IHX$W_GSTRECS    00000032            

FAB$V_UPD      = 00000003            IFD$M_EXEONLY  = 00000001            IHX$W_MAJORID    0000000C            

FAB$V_UPI      = 00000006            IFD$V_EXEONLY  = 00000000            IHX$W_MINORID    0000000E            

FAB$V_WCK      = 00000009            IFD$W_CHAN       00000008            IHX$W_SIZE       00000000            

FAB$W_BLS        0000003C            IFD$W_CMCHAN     0000000A            IMGACTCTX        00000068            

FAB$W_DEQ        00000014            IFD$W_FILNAMOFF  00000002            IMGACT_ACCVIO    0000006B R     05   

FAB$W_IFI        00000002            IFD$W_FLAGS      00000010            IMGACT_ACCVIO1   000005E2 R     05   

FAB$W_MRS        00000036            IFD$W_SIZE       00000000            IMGACT_ERREXIT   000005E5 R     05   

FCB$L_FILEOWNER  ********   X   05   IFDFLAGS         00000054            IMGACT_ERREXIT1  000005EA R     05   

FCB$V_MARKDEL    ********   X   07   IHA$C_LENGTH     00000010            IMGACT_EXIT      000005D1 R     05   

FCB$W_FILEPROT   ********   X   05   IHA$K_LENGTH     00000010            IMGACT_RET       0000006E R     05   

FCB$W_STATUS     ********   X   07   IHA$L_TFRADR1    00000000            IMGACT_RET1      0000016E R     05   

FCPSTR           000000B3 R     08   IHA$L_TFRADR2    00000004            IMGACT_RET2      00000351 R     05   

FCPSTRSIZ      = 00000013            IHA$L_TFRADR3    00000008            IMGACT_RET3      000004AF R     05   

FCPSTRSIZ1     = 0000000B            IHD$B_HDRBLKCNT  00000010            IMGACT_RET4      00000247 R     05   

FCPSTRSIZ2     = 00000007            IHD$B_IMGTYPE    00000011            IMGCTL           00000010            

FIL$OPENFILE     ********   X   08   IHD$C_LENGTH     00000028            IMGIOCNT         0000004E            

FILELBN          00000044            IHD$K_EXE      = 00000001            IMP$B_PROT       00000002            

FILESIZE         00000048            IHD$K_LENGTH     00000028            IMP$C_ASYEFN   = 0000001E            

FIRSTHDR         00000314            IHD$K_LIM      = 00000002            IMP$C_ASYQIOEFN= 0000001F            

FIRSTHDRBLK      0000024A R     05   IHD$K_MAJORID  = 00003230            IMP$C_ENTPERSEG= 0000000F            

FIRSTHDRBLK1     00000255 R     05   IHD$K_MINORID  = 00003130            IMP$C_IOREFN   = 0000001E            

FLAGS            00000010            IHD$L_IDENT      00000024            IMP$C_MBXEFN   = 0000001A            

GBL...         = 00000000            IHD$L_LNKFLAGS   00000020            IMP$C_NPIOFILES= 0000000C            

GBLSECCNT        00000070            IHD$M_LNKDEBUG = 00000001            IMP$C_SYNCEFN  = 0000001B            

GBL_SEC_MATNEV   00000492 R     05   IHD$M_LNKNOTFR = 00000002            IMP$L_FREEPGLH   0000000C            

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  45

SYMBOL TABLE                                                                                                                     (1)



IMP$L_IFABTBL    00000018            ISD$V_P1       = 00000015            KFI$V_IS_RESHDR= 00000008            

IMP$L_IFBTBLINK  00000024            ISD$V_PFC      = 00000018            KFI$V_IS_SHARED= 00000009            

IMP$L_IOSEGADDR  00000004            ISD$V_SYSTEM   = 00000016            KFI$V_KFIHD    = 00000000            

IMP$L_IOSEGLEN   00000008            ISD$V_VPG      = 00000000            KFI$V_KFISEQ   = 00000000            

IMP$L_IRABTBL    0000001C            ISD$V_VPN      = 00000000            KFI$V_KP_OPEN  = 00000000            

IMP$L_IRBTBLINK  00000064            ISD$V_WRT      = 00000003            KFI$V_KP_RESHDR= 00000001            

IMP$L_SAVED_SP   00000014            ISD$W_PAGCNT     00000002            KFI$V_KP_SHARED= 00000002            

IMP$V_AST      = 00000001            ISD$W_SIZE       00000000            KFI$V_LIM      = 00000006            

IMP$V_IIOS     = 00000000            IS_OPEN_KFI      00000173 R     05   KFI$V_MARKDEL  = 00000007            

IMP$V_IORUNDOWN= 00000004            IS_OPEN_NOTKFI   000001AB R     05   KFI$V_NOREPLACE= 00000006            

IMP$V_NOP0BUFS = 00000005            IS_OPEN_NOTKFI1  00000171 R     05   KFI$V_PROCPRIV = 00000007            

IMP$V_TEMP1    = 00000002            KFH$B_TYPE       0000000A            KFI$W_FID        0000001C            

IMP$V_TEMP2    = 00000003            KFH$C_LENGTH     0000000C            KFI$W_FID_NUM    0000001C            

IMP$W_ENTPERSEG  00000020            KFH$K_LENGTH     0000000C            KFI$W_FID_RVN    00000020            

IMP$W_NUM_IFABS  00000022            KFH$L_BUFEND     00000000            KFI$W_FID_SEQ    0000001E            

IMP$W_RMSSTATUS  00000000            KFH$L_KFIADR     00000004            KFI$W_FLAGS      00000014            

INADR            00000004            KFH$W_SIZE       00000008            KFI$W_GBLSECCNT  00000016            

INIT_WINDOW      00000043 R     08   KFI$B_DEVNAM     0000000C            KFI$W_REFCNT     00000010            

IO$_READVBLK     ********   X   05   KFI$B_DEVUCB     0000000C            KFI$W_SIZE       00000008            

IOC$VERIFYCHAN   ********   X   05   KFI$B_DIRNAM     0000000D            KFIADR           0000006C            

IOCHANCNT        0000004C            KFI$B_FILNAM     0000000E            KFIFLG           0000005A            

IOSB             FFFFFFF0            KFI$B_KFICTL     0000000B            KFIMATCHCTL      FFFFFFC8            

IPL$_SYNCH       ********   X   06   KFI$B_KFIQNUM    00000012            KFINAMSTR        FFFFFFB8            

ISD$B_PFC        00000007            KFI$B_KFISEQ     00000013            KFI_COMPAT_MODE  0000016F R     07   

ISD$B_TYPE       0000000B            KFI$B_MATCHCTL   0000002C            KFI_DECREF       0000075C R     05   

ISD$C_LENDZRO    0000000C            KFI$B_TYPE       0000000A            KFI_GBLSECNMINI  0000061B R     05   

ISD$C_LENGLBL    00000024            KFI$B_TYPNAM     0000000F            KFI_GBLSECNMNXT  0000063D R     05   

ISD$C_LENPRIV    00000010            KFI$C_KFIHDLEN   00000014            KFI_GLOBAL_SEC   00000478 R     05   

ISD$K_LENDZRO    0000000C            KFI$C_LENGTH     00000034            KFI_INCREF       000006F3 R     05   

ISD$K_LENGLBL    00000024            KFI$GL_F11AACP   ********   X   08   KFI_LOCKR        000006C8 R     05   

ISD$K_LENPRIV    00000010            KFI$K_KFIHDLEN   00000014            KFI_LOCKW        00000094 R     07   

ISD$K_MATALL   = 00000000            KFI$K_LENGTH     00000034            KFI_LOCK_MTX     000006CF R     05   

ISD$K_MATEQU   = 00000001            KFI$L_IDENT      00000030            KFI_MAK_SHR_RES  000007B5 R     05   

ISD$K_MATLEQ   = 00000002            KFI$L_IMGHDR     00000020            KFI_RELEASE      00000000 R     07   

ISD$K_MATNEV   = 00000003            KFI$L_KFIQBL     00000004            KFI_SHARED       00000313 R     05   

ISD$K_NORMAL   = 00000000            KFI$L_KFIQFL     00000000            KRNLARG          00000060            

ISD$K_USRSTACK = 000000FD            KFI$L_USECNT     00000018            KRNLROUT         00000064            

ISD$L_FLAGS      00000008            KFI$L_WINDOW     0000001C            KRNL_DISPAT      00000774 R     05   

ISD$L_IDENT      00000010            KFI$M_COMPATMOD= 00008000            KRNL_KFI_DECREF  000007E9 R     05   

ISD$L_VBN        0000000C            KFI$M_DONOTOPEN= 00000004            KRNL_MAK_RESHDR  0000012B R     07   

ISD$L_VPNPFC     00000004            KFI$M_FILIDOPEN= 00000002            KRNL_RETRY_RSB   00000124 R     07   

ISD$M_CRF      = 00000002            KFI$M_IS_RESHDR= 00000100            KRNL_SET_FID     00000073 R     07   

ISD$M_DZRO     = 00000004            KFI$M_IS_SHARED= 00000200            KRNL_ZERO_FID    00000087 R     07   

ISD$M_GBL      = 00000001            KFI$M_KFIHD    = 00000001            L$BASG           00000200            

ISD$M_LASTCLU  = 00000080            KFI$M_KFISEQ   = 00000003            L$BBLK           000000F0            

ISD$M_MATCHCTL = 00000070            KFI$M_KP_OPEN  = 00000001            L$BDAT           0000001A            

ISD$M_WRT      = 00000008            KFI$M_KP_RESHDR= 00000002            L$BEXT           000000EA            

ISD$S_MATCHCTL = 00000003            KFI$M_KP_SHARED= 00000004            L$BFLG           00000018            

ISD$S_PFC      = 00000008            KFI$M_LIM      = 00000040            L$BHGV           0000000A            

ISD$S_VPG      = 00000017            KFI$M_MARKDEL  = 00000080            L$BHRB           000000EE            

ISD$S_VPN      = 00000015            KFI$M_NOREPLACE= 00000040            L$BLDZ           0000000E            

ISD$T_GBLNAM     00000014            KFI$M_PROCPRIV = 00000080            L$BLIB           00000020            

ISD$V_CRF      = 00000001            KFI$Q_PROCPRIV   00000024            L$BLUN           000000F2            

ISD$V_DZRO     = 00000002            KFI$S_KFISEQ   = 00000002            L$BMXV           0000000C            

ISD$V_GBL      = 00000000            KFI$V_COMPATMOD= 0000000F            L$BMXZ           00000010            

ISD$V_LASTCLU  = 00000007            KFI$V_DONOTOPEN= 00000002            L$BOFF           00000012            

ISD$V_MATCHCTL = 00000004            KFI$V_FILIDOPEN= 00000001            L$BPAR           00000004            

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  46

SYMBOL TABLE                                                                                                                     (1)



L$BPRI           000000E6            NAM$L_ESA        0000000C            NAM$V_WILD_SFD7= 0000001F            

L$BSA            00000008            NAM$L_FNB        00000034            NAM$V_WILD_TYPE= 00000004            

L$BSEG           00000016            NAM$L_RLF        00000010            NAM$V_WILD_UFD = 00000018            

L$BSGL           000000EC            NAM$L_RSA        00000004            NAM$V_WILD_VER = 00000003            

L$BTSK           00000000            NAM$L_WCC        00000030            NAM$W_DID        0000002A            

L$BWND           00000014            NAM$M_DIR_LVLS = 00E00000            NAM$W_DID_NUM    0000002A            

L$BXFR           000000E8            NAM$M_EXP_DEV  = 00000080            NAM$W_DID_RVN    0000002E            

LD$ACC         = FFFF8000            NAM$M_EXP_DIR  = 00000040            NAM$W_DID_SEQ    0000002C            

LD$REL         = 00000004            NAM$M_EXP_NAME = 00000004            NAM$W_FID        00000024            

LD$RSV         = 00004000            NAM$M_EXP_TYPE = 00000002            NAM$W_FID_NUM    00000024            

LIMNAMSIZ        FFFFFFB0            NAM$M_EXP_VER  = 00000001            NAM$W_FID_RVN    00000028            

LIMNAMSTR        FFFFFF9C            NAM$M_GRP_MBR  = 00080000            NAM$W_FID_SEQ    00000026            

LNKFLAGS         0000005C            NAM$M_HIGHVER  = 00008000            NAM$W_PRV_DID    0000003A            

MAKE_SHARED_WCB  000000A2 R     07   NAM$M_LOWVER   = 00004000            NAME             00000004            

MANUAL_OPEN      00000000 R     08   NAM$M_NODE     = 00020000            NOACT            00000521 R     05   

MANUAL_OPN_DONE  000000E7 R     05   NAM$M_PPF      = 00010000            NXTHDR           000001B2 R     05   

MARKED_FOR_DEL   0000009E R     07   NAM$M_QUOTED   = 00040000            NXTHDRADR        00000510 R     05   

MAXNEGOFF        FFFFFF14            NAM$M_WILDCARD = 00000100            NXTISD           00000354 R     05   

MAXPOSOFF        000000FD            NAM$M_WILD_DIR = 00100000            NXTISDADR        000004D7 R     05   

MAXTOTOFF      = 000001E9            NAM$M_WILD_GRP = 01000000            NXTISDADR1       000003CF R     05   

MGBLSC$_ACMODE = 0000000C            NAM$M_WILD_MBR = 02000000            OPEN_DONE_KRNL   00000714 R     05   

MGBLSC$_FLAGS  = 00000010            NAM$M_WILD_NAME= 00000020            OTHERHDR         00000114            

MGBLSC$_GSDNAM = 00000014            NAM$M_WILD_SFD1= 02000000            PAGCNT           00000024            

MGBLSC$_IDENT  = 00000018            NAM$M_WILD_SFD2= 04000000            PCB$L_PHD        ********   X   05   

MGBLSC$_INADR  = 00000004            NAM$M_WILD_SFD3= 08000000            PCB$W_FILCNT     ********   X   08   

MGBLSC$_NARGS  = 00000007            NAM$M_WILD_SFD4= 10000000            PFC              00000030            

MGBLSC$_RELPAG = 0000001C            NAM$M_WILD_SFD5= 20000000            PIO$GW_IIOIMPA   ********   X   05   

MGBLSC$_RETADR = 00000008            NAM$M_WILD_SFD6= 40000000            PR$_IPL          ********   X   05   

MMG$CRETVA       ********   X   05   NAM$M_WILD_SFD7= 80000000            PR$_USP          ********   X   05   

MMG$DGBLSC1      ********   X   07   NAM$M_WILD_TYPE= 00000010            PROCESS_SEC      0000039B R     05   

MMG$GL_CTLBASVA  ********   X   05   NAM$M_WILD_UFD = 01000000            PROCPRIV         FFFFFFE4            

MMG$GL_IACLOCK   00000000 RG    04   NAM$M_WILD_VER = 00000008            PROT             0000002C            

MMG$IMGACTBUF    ********   X   05   NAM$S_DIR_LVLS = 00000003            PRT$C_UREW       ********   X   05   

MMG$INIWCB       000000C5 RG    08   NAM$T_DVI        00000014            PRV$V_LOG_IO     ********   X   05   

MMG$RESRCWAIT    ********   X   06   NAM$V_DIR_LVLS = 00000015            PRV$V_PHY_IO     ********   X   05   

MMG$SVPCTX       ********   X   06   NAM$V_EXP_DEV  = 00000007            PSL$C_EXEC       ********   X   05   

NAM              FFFFFF14            NAM$V_EXP_DIR  = 00000006            PSL$C_USER       ********   X   05   

NAM$B_BID        00000000            NAM$V_EXP_NAME = 00000002            PSL$S_IPL        ********   X   06   

NAM$B_BLN        00000001            NAM$V_EXP_TYPE = 00000001            PSL$S_PRVMOD     ********   X   05   

NAM$B_CURLVL     00000038            NAM$V_EXP_VER  = 00000000            PSL$V_IPL        ********   X   06   

NAM$B_ESL        0000000B            NAM$V_GRP_MBR  = 00000013            PSL$V_PRVMOD     ********   X   05   

NAM$B_ESS        0000000A            NAM$V_HIGHVER  = 0000000F            R$LDAT           00000016            

NAM$B_RSL        00000003            NAM$V_LOWVER   = 0000000E            R$LFLG           00000014            

NAM$B_RSS        00000002            NAM$V_NODE     = 00000011            R$LHGV           00000006            

NAM$C_BID      = 00000002            NAM$V_PPF      = 00000010            R$LLDZ           0000000A            

NAM$C_BLN        00000038            NAM$V_QUOTED   = 00000012            R$LMXV           00000008            

NAM$C_BLN_DIRWC  00000050            NAM$V_WILDCARD = 00000008            R$LMXZ           0000000C            

NAM$C_DVI      = 00000010            NAM$V_WILD_DIR = 00000014            R$LNAM           00000000            

NAM$C_MAXRSS   = 00000080            NAM$V_WILD_GRP = 00000018            R$LOFF           0000000E            

NAM$C_MAXRSSLCL= 00000060            NAM$V_WILD_MBR = 00000019            R$LSA            00000004            

NAM$K_BLN        00000038            NAM$V_WILD_NAME= 00000005            R$LSEG           00000012            

NAM$K_BLN_DIRWC  00000050            NAM$V_WILD_SFD1= 00000019            R$LSIZ           0000001C            

NAM$L_DIRWCC1    00000040            NAM$V_WILD_SFD2= 0000001A            R$LWND           00000010            

NAM$L_DIRWCC2    00000044            NAM$V_WILD_SFD3= 0000001B            RELPAG           0000001C            

NAM$L_DIRWCC3    00000048            NAM$V_WILD_SFD4= 0000001C            RETADR           00000008            

NAM$L_DIRWCC4    0000004C            NAM$V_WILD_SFD5= 0000001D            RETENDVA         00000040            

NAM$L_DWC        00000038            NAM$V_WILD_SFD6= 0000001E            RETSTARTVA       0000003C            

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  47

SYMBOL TABLE                                                                                                                     (1)



RM$RESET         ********   X   05   SEC$V_WRT      = 00000003            WCB$L_RVT        0000001C            

RMS$_KFF         ********   X   05   SEC$W_FLAGS      00000014            WCB$L_STVBN      00000020            

RMS$_LNE         ********   X   05   SEC$W_SECXBL     00000006            WCB$L_WLBL       00000004            

RMSOPEN          00000071 R     05   SEC$W_SECXFL     00000004            WCB$L_WLFL       00000000            

RND$V_IACLOCK    ********   X   05   SETCTLREG        0000077E R     05   WCB$M_NOTFCP   = 00000004            

RSLTNAME         0000007C            SETPRT$_ACMODE = 0000000C            WCB$M_READ     = 00000001            

RSN$_IACLOCK     ********   X   06   SETPRT$_INADR  = 00000004            WCB$M_SHRWCB   = 00000008            

RSX_AME_DNAM     00000233 R     05   SETPRT$_NARGS  = 00000005            WCB$M_WRITE    = 00000002            

RSX_AME_DSIZ   = 0000000F            SETPRT$_PROT   = 00000010            WCB$V_DLOCK    = 00000001            

RSX_AME_NAM      00000230 R     05   SETPRT$_PRVPRT = 00000014            WCB$V_NOREAD   = 0000000A            

RSX_AME_OPEN     0000009B R     05   SETPRT$_RETADR = 00000008            WCB$V_NOTFCP   = 00000002            

RSX_AME_SIZ    = 00000003            SET_ACTIVE_LCK   00000059 R     06   WCB$V_NOTRUNC  = 0000000B            

RSX_IMAGE        000001F2 R     05   SGN$GL_EXUSRSTK  ********   X   05   WCB$V_NOWRITE  = 00000000            

RSX_KNOWN_FILE   000001FB R     05   SGN$GW_IMGIOCNT  ********   X   05   WCB$V_READ     = 00000000            

SAVABS...      = 00000014            SS$_ACCVIO       ********   X   05   WCB$V_READCK   = 00000009            

SCH$LOCKR        ********   X   05   SS$_BADIMGHDR    ********   X   05   WCB$V_SEQONLY  = 00000006            

SCH$LOCKW        ********   X   06   SS$_FILNOTCNTG   ********   X   08   WCB$V_SHRWCB   = 00000003            

SCH$RAVAIL       ********   X   06   SS$_NORMAL       ********   X   05   WCB$V_SPOOL    = 00000004            

SCH$UNLOCK       ********   X   05   SS$_NOSUCHSEC    ********   X   05   WCB$V_WRITE    = 00000001            

SEC$B_AMOD       00000015            SS$_NOTRAN       ********   X   05   WCB$V_WRITEAC  = 00000008            

SEC$B_PFC        0000000B            STARTVA          00000034            WCB$V_WRITECK  = 00000005            

SEC$C_LENGTH     00000020            SYS$CMKRNL       ********   X   05   WCB$W_ACON       00000014            

SEC$K_LENGTH     00000020            SYS$CRETVA       ********   X   05   WCB$W_COUNT      00000000            

SEC$K_MATALL   = 00000000            SYS$CRMPSC       ********   X   05   WCB$W_NMAP       00000016            

SEC$K_MATEQU   = 00000001            SYS$DASSGN       ********   X   05   WCB$W_P1_COUNT   00000024            

SEC$K_MATLEQ   = 00000002            SYS$MGBLSC       ********   X   05   WCB$W_P2_COUNT   0000002A            

SEC$L_CCB        00000000            SYS$OPEN         ********  GX   05   WCB$W_PREVCOUNT  FFFFFFFA            

SEC$L_GSD        00000000            SYS$QIOW         ********   X   05   WCB$W_REFCNT     0000000E            

SEC$L_PAGCNT     0000001C            SYS$TRNLOG       ********   X   05   WCB$W_SIZE       00000008            

SEC$L_REFCNT     00000018            TS$ACP         = 00002000            ZERO_FID         0000006B R     07   

SEC$L_VBN        00000010            TS$CHK         = 00000040            

SEC$L_VPXPFC     00000008            TS$CMP         = 00000080            

SEC$L_WINDOW     0000000C            TS$NET         = 00000200            

SEC$M_AMOD     = 00000300            TS$NHD         = 00004000            

SEC$M_CRF      = 00000002            TS$NSD         = 00000400            

SEC$M_DZRO     = 00000004            TS$PIC         = FFFF8000            

SEC$M_GBL      = 00000001            TS$PMD         = 00001000            

SEC$M_PERM     = 00004000            TS$PRV         = 00000100            

SEC$M_SYSGBL   = 00008000            TS$RES         = 00000020            

SEC$M_WRT      = 00000008            TS$SLV         = 00000800            

SEC$S_AMOD     = 00000002            USRSTACKADR      FFFFFFEC            

SEC$S_CRF      = 00000001            VA$V_P1          ********   X   05   

SEC$S_DZRO     = 00000001            VBN              00000028            

SEC$S_GBL      = 00000001            WAIT_ACTIVE_LCK  00000048 R     06   

SEC$S_PERM     = 00000001            WCB$B_ACCESS     0000000B            

SEC$S_PFC      = 00000008            WCB$B_TYPE       0000000A            

SEC$S_SYSGBL   = 00000001            WCB$C_LENGTH     00000024            

SEC$S_VPX      = 00000016            WCB$C_MAP        00000024            

SEC$S_WRT      = 00000001            WCB$K_LENGTH     00000024            

SEC$V_AMOD     = 00000008            WCB$K_MAP        00000024            

SEC$V_CRF      = 00000001            WCB$L_FCB        00000018            

SEC$V_DZRO     = 00000002            WCB$L_LBN        00000002            

SEC$V_GBL      = 00000000            WCB$L_ORGUCB     00000010            

SEC$V_PERM     = 0000000E            WCB$L_P1_LBN     00000026            

SEC$V_PFC      = 00000018            WCB$L_P2_LBN     0000002C            

SEC$V_SYSGBL   = 0000000F            WCB$L_PID        0000000C            

SEC$V_VPX      = 00000000            WCB$L_PREVLBN    FFFFFFFC            

SYSIMGACT       - IMAGE ACTIVATOR SYSTEM SERVICE                 21-AUG-1978 20:33:12   VAX-11 MACRO X0.3-11               Page  48

PROGRAM SECTION SYNOPSIS                                                                                                         (1)







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  

..ABS.           00000200      02     NOPIC   USR   CON   ABS   LCL NOSHR   EXE   RD    WRT BYTE  

$ABS$            FFFFFFFC      03     NOPIC   USR   CON   ABS   LCL NOSHR   EXE   RD    WRT BYTE  

$$$210           00000004      04     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT LONG  

Y$EXEPAGED       000007F5      05     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  

$MMGCOD          000000AB      06     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  

YF$LOWUSE        0000020C      07     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  

YFILEREAD        00000135      08     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  





THERE WERE NO ERRORS OR WARNINGS.

1594. BYTES LEFT IN FREE MEMORY POOL.

38. BYTES OF RECLAIMED MEMORY.

OBJ$:SYSIMGACT,LIS$:SYSIMGACT/-SP=EXECML$/ML,RSXML$/ML,SRC$:SYSIMGACT

128 MLB DIR RDS - 1111 GETS TO DEFINE 52 MACROS. 106 INTER. FILE WRITES. 

