SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (2)      38  DECLARATIONS

   (3)      84  CRMPSC - CREATE AND MAP SECTION

   (4)     402  MGBLSC - MAP GLOBAL SECTION

   (6)     605  SETSECPROTOWN - SET SECTION PROTECTION AND OWNE

   (7)     647  INITSECTBL - ALLOC & INIT SECTION TABLE ENTRY

   (8)     795  MAP PROCESS SECTION

   (9)     858  MAPSECPAG - MAP A SINGLE PROCESS/GLOBAL SECTION

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page   1

X0107                                                                                                                            (1)



                                     0000     1 	.TITLE	SYSCRMPSC - Create and Map Section System Service

                                     0000     2 	.IDENT	/X0107/

                                     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:

                                     0000    24 ;

                                     0000    25 ; ABSTRACT:

                                     0000    26 ;

                                     0000    27 ; ENVIRONMENT:

                                     0000    28 ;

                                     0000    29 ; AUTHOR: PETER H. LIPMAN	, CREATION DATE: 24-APR-78

                                     0000    30 ;

                                     0000    31 ; MODIFIED BY:

                                     0000    32 ;

                                     0000    33 ;	KATHLEEN D. MORSE	, 11-AUG-78 : VERSION X0107

                                     0000    34 ;		- FIX BUG IN GLOBAL PAGE TABLE FULL RECOVERY LOGIC.

                                     0000    35 ; 01	- 

                                     0000    36 ;--

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page   2

X0107           DECLARATIONS                                                                                                     (2)



                                     0000    38 	.SBTTL	DECLARATIONS

                                     0000    39 ;

                                     0000    40 ; INCLUDE FILES:

                                     0000    41 ;

                                     0000    42 	$CCBDEF				;CHANNEL CONTROL BLOCK DEFINITIONS

                                     0000    43 	$DYNDEF				;DYNAMIC DATA STRUCTURE DEFINTIONS

                                     0000    44 	$FCBDEF				;FILE CONTROL BLOCK DEFINITIONS

                                     0000    45 	$GSDDEF				;GLOBAL SECTION DESCRIPTOR DEFINTIONS

                                     0000    46 	$IPLDEF				;PROCESSOR PRIORITY LEVELS

                                     0000    47 	$PCBDEF				;PROCESS CONTROL BLOCK DEFINITIONS

                                     0000    48 	$PHDDEF				;PROCESS HEADER DEFINITIONS

                                     0000    49 	$PRDEF				;PROCESSOR REGISTER DEFINTIONS

                                     0000    50 	$PRTDEF				;PROTECTION CODE DEFINITIONS

                                     0000    51 	$PRVDEF				;PRIVILEGE BIT DEFINITIONS

                                     0000    52 	$PTEDEF				;PAGE TABLE ENTRY DEFINITIONS

                                     0000    53 	$SECDEF				;SECTION TABLE DEFINITIONS

                                     0000    54 	$SSDEF				;SYSTEM STATUS CODE DEFINTIONS

                                     0000    55 	$VADEF				;VIRTUAL ADDRESS VIELDS

                                     0000    56 	$WCBDEF				;WINDOW CONTROL BLOCK DEFINITIONS

                                     0000    57 ;

                                     0000    58 ; EXTERNAL SYMBOLS:

                                     0000    59 ;

                                     0000    60 ;

                                     0000    61 ; MACROS:

                                     0000    62 ;

                                     0000    63 ;

                                     0000    64 ; EQUATED SYMBOLS:

                                     0000    65 ;

                                     0000    66 ; OFFSET FROM AP

                                     0000    67 ;

                           00000004  0000    68 	INADR		= 4		;OFFSET TO INPUT RANGE

                           00000008  0000    69 	RETADR		= 8		;OFFSET TO RETURN RANGE

                           0000000C  0000    70 	ACMODE		= 12		;ACCESS MODE

                           00000010  0000    71 	FLAGS		= 16		;MAP SECTION FLAGS

                           00000014  0000    72 	GSDNAM		= 20		;GLOBAL SECTION NAME DESCRIPTOR ADDRESS

                           00000018  0000    73 	IDENT		= 24		;SECTION IDENTIFIER

                           0000001C  0000    74 	RELPAG		= 28		;RELATIVE PAGE TO START MAPPING AT

                           00000020  0000    75 	CHAN		= 32		;CHANNEL THAT FILE TO MAP IS OPEN ON

                           00000024  0000    76 	SECPAGCNT	= 36		;NUMBER OF PAGES IN SECTION

                           00000028  0000    77 	VBN		= 40		;FILE VBN AT WHICH SECTION BEGINS

                           0000002C  0000    78 	PROT		= 44		;SECTION PROTECTION CODE

                           00000030  0000    79 	PFC		= 48		;SECTION PAGE FAULT CLUSTER

                                     0000    80 ;

                                     0000    81 ; OWN STORAGE:

                                     0000    82 ;

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page   3

X0107           CRMPSC - CREATE AND MAP SECTION                                                                                  (3)



                                     0000    84 	.SBTTL	CRMPSC - CREATE AND MAP SECTION

                                     0000    85 ;++

                                     0000    86 ; FUNCTIONAL DESCRIPTION:

                                     0000    87 ;

                                     0000    88 ;	THE CREATE AND MAP SECTION SERVICE CREATES A NEW SECTION

                                     0000    89 ; OF THE SPECIFIED NAME UNLESS THAT NAME ALREADY EXISTS.  IN EITHER CASE

                                     0000    90 ; IT THEN MAPS THE SPECIFIED SECTION.

                                     0000    91 ;

                                     0000    92 ; CALLING SEQUENCE:

                                     0000    93 ;

                                     0000    94 ;	CALLG	ARGLIST,@#SYS$CRMPSC

                                     0000    95 ;

                                     0000    96 ; INPUT PARAMETERS:

                                     0000    97 ;

                                     0000    98 ;	INADR(AP) = ADDRESS OF 2 LONG WORDS THE 1ST OF WHICH SPECIFIES

                                     0000    99 ;		THE STARTING VIRTUAL ADDRESS TO CREATE, THE 2ND SPECIFIES

                                     0000   100 ;		THE ENDING VIRTUAL ADDRESS TO CREATE (INCLUSIVE).

                                     0000   101 ;	RETADR(AP) = ADDRESS OF A 2 LONGWORD ARRAY INTO WHICH IS RETURNED

                                     0000   102 ;		THE STARTING AND ENDING VIRTUAL ADDRESSES (INCLUSIVE)

                                     0000   103 ;		OF THE PAGES JUST CREATED

                                     0000   104 ;	ACMODE(AP) = THE ACCESS MODE (MAXIMIZED WITH CALLING MODE)

                                     0000   105 ;		USED AS THE OWNER OF THE NEW PAGE(S)

                                     0000   106 ;	FLAGS(AP)  = BIT  0  - GBL - GLOBAL IF SET, PROCESS IF CLEAR

                                     0000   107 ;		     BIT  1  - CRF - COPY ON REFERENCE

                                     0000   108 ;		     BIT  2  - DZRO - DEMAND ZERO

                                     0000   109 ;		     BIT  3  - WRT - WRITABLE IF SET, READ ONLY IF CLEAR

                                     0000   110 ;		     BITS 4  - 13 RESERVED, MUST BE ZERO

                                     0000   111 ;		     BIT  14 - PERM - PERMANENT IF SET, TEMPORARY IF CLEAR

                                     0000   112 ;		     BIT  15 - SYSGBL - SYSTEM GLOBAL IF SET, GROUP GLOBAL IF CLEAR

                                     0000   113 ;		     BITS 16 - 31 RESERVED, MUST BE ZERO

                                     0000   114 ;	GSDNAM(AP) = THE DESCRIPTOR OF THE GLOBAL SECTION NAME

                                     0000   115 ;	IDENT(AP)  = ADDRESS OF QUAD WORD CONTAINING SECTION IDENTIFICATION

                                     0000   116 ;		     FIRST LONG WORD CONTAINS THE MATCH CONTROL INFORMATION

                                     0000   117 ;			0 = ISD$K_MATALL, MATCH ALWAYS

                                     0000   118 ;			1 = ISD$K_MATEQU, MATCH IF IDENTS ARE EQUAL

                                     0000   119 ;			2 = ISD$K_MATLEQ, MATCH IF HIGH 8 BITS ARE EQUAL

                                     0000   120 ;			    AND LOW 24 BITS ARE LESS THAN OR EQUAL TO

                                     0000   121 ;			    THE ID STORED IN THE GLOBAL SECTION.

                                     0000   122 ;		     SECOND LONG WORD CONTAINS THE IDENT TO BE COMPARED

                                     0000   123 ;	RELPAG(AP) = RELATIVE PAGE IN SECTION TO START MAPPING

                                     0000   124 ;	CHAN(AP)   = CHANNEL ON WHICH FILE IS ACCESSED

                                     0000   125 ;	SECPAGCNT(AP) = NUMBER OF PAGES (STARTING AT THE ABOVE VBN) IN THE SECTION

                                     0000   126 ;	VBN(AP)    = STARTING VIRTUAL BLOCK IN FILE THAT BECOMES THE

                                     0000   127 ;			FIRST BLOCK OF THE GLOBAL SECTION

                                     0000   128 ;	PROT(AP) = PROTECTION APPLIED TO SECTION

                                     0000   129 ;	PFC(AP)    = PAGE FAULT CLUSTER

                                     0000   130 ;

                                     0000   131 ; IMPLICIT INPUTS:

                                     0000   132 ;

                                     0000   133 ;	NONE

                                     0000   134 ;

                                     0000   135 ; OUTPUT PARAMETERS:

                                     0000   136 ;

                                     0000   137 ;	NONE

                                     0000   138 ;

                                     0000   139 ; IMPLICIT OUTPUTS:

                                     0000   140 ;

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page   4

X0107           CRMPSC - CREATE AND MAP SECTION                                                                                  (3)



                                     0000   141 ;	NONE

                                     0000   142 ;

                                     0000   143 ; COMPLETION CODES:

                                     0000   144 ;

                                     0000   145 ;	NONE

                                     0000   146 ;

                                     0000   147 ; SIDE EFFECTS:

                                     0000   148 ;

                                     0000   149 ;	NONE

                                     0000   150 ;

                                     0000   151 ;--

                                     0000   152 ;

                                     0000   153 ; **********************************************************************

                                     0000   154 ;

                                     0000   155 ; **************** THE FOLLOWING CODE MAY BE PAGED *****************

                                     0000   156 ;

                                 00000000   157 	.PSECT	Y$EXEPAGED

                                     0000   158 ;

                                     0000   159 ; **********************************************************************

                                     0000   160 ;

                                     0000   161 	.ENABL	LSB

                                     0000   162 

                                     0000   163 ;

                                     0000   164 ; NO INPUT RANGE ADDRESS SPECIFIED

                                     0000   165 ;

                                     0000   166 CRMPSC_NOINADR:

                                     0000   167 	ASSUME	SEC$V_GBL EQ 0

            0B            59     E9  0000   168 	BLBC	R9,CRMPSC_ACCVIO	;ONLY LEGAL FOR GLOBAL SECTIONS

            59            0E     E1  0003   169 	BBC	#SEC$V_PERM,R9,CRMPSC_ACCVIO ;WHICH ARE PERMANENT

                          07         0006       

                          54     D7  0007   170 	DECL	R4			;-1 INDICATES NO RANGE TO MAP

                          2F     11  0009   171 	BRB	15$			;REJOIN CRMPSC CODE

                                     000B   172 

                                     000B   173 CRMPSC_PROCESS:

                          03F4   31  000B   174 	BRW	MAP_PROCESS_SEC

                                     000E   175 CRMPSC_ACCVIO:

            50            0C     3C  000E   176 	MOVZWL	#SS$_ACCVIO,R0		;CANNOT ACCESS THE RANGE TO MAP

                                     0011   177 CRMPSC_RET:

                                 04  0011   178 	RET

                                     0012   179 ;

                                     0012   180 ; THE SPECIFIED GLOBAL SECTION ALREADY EXISTS, JUST MAP IT

                                     0012   181 ;

                                     0012   182 CRMPSC_FOUND:

            5E            18     C0  0012   183 	ADDL	#6*4,SP			;CLEAN OFF THE STACK

         08 AE            01     3C  0015   184 	MOVZWL	#SS$_NORMAL,8(SP)	;INDICATE SECTION ALREADY EXISTS

                          01DE   31  0019   185 	BRW	MAPGBLSEC1		;GO MAP THE SECTION

                                     001C   186 ;

                                     001C   187 ; NO PRIVILEGE TO CREATE OR MAP THE GLOBAL SECTION

                                     001C   188 ;

                                     001C   189 CRMPSC_NOPRIV:

            50            24     3C  001C   190 	MOVZWL	#SS$_NOPRIV,R0		;NO PRIVILEGE FOR REQUESTED OPERATION

                                     001F   191 ULKGSDMTXRET1:

                          0186   31  001F   192 	BRW	ULKGSDMTXRET

                                     0022   193 

                               07FC' 0022   194 	.ENTRY	EXE$CRMPSC,^M<R2,R3,R4,R5,R6,R7,R8,R9,R10>

                                     0024   195 

            5E            00'    C2  0024   196 	SUBL	S^#CDL$C_LENGTH,SP	;RESERVE A SCRATCH AREA

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page   5

X0107           CRMPSC - CREATE AND MAP SECTION                                                                                  (3)



            59         10 AC     D0  0027   197 	MOVL	FLAGS(AP),R9		;GLOBAL SECTION FLAGS

            54         04 AC     D0  002B   198 	MOVL	INADR(AP),R4		;ADDRESS OF RANGE TO MAP

                          CF     13  002F   199 	BEQL	CRMPSC_NOINADR		;BRANCH IF NULL RANGE

                                     0031   200 	IFNORD	#8,(R4),CRMPSC_ACCVIO	;BRANCH IF RANGE NOT ACCESSABLE

            54            64     7D  0037   201 	MOVQ	(R4),R4			;PICK UP THE RANGE

            7E       0619 8F     3C  003A   202 15$:	MOVZWL	#SS$_CREATED,-(SP)	;ASSUME SECTION WILL BE CREATED

                          30     BB  003F   203 	PUSHR	#^M<R4,R5>		;SAVE RANGE FOR MAPPING LATER

                          FFBC'  30  0041   204 	BSBW	MMG$RETADRINI		;INIT RETURN RANGE, AND SCRATCH AREA

            50            59     D0  0044   205 	MOVL	R9,R0			;GLOBAL SECTION FLAGS

                          FFB6'  30  0047   206 	BSBW	MMG$VFYSECFLG		;VERIFY SECTION FLAGS

            50         20 AC     3C  004A   207 	MOVZWL	CHAN(AP),R0		;CHANNEL PARAMETER

                          FFAF'  30  004E   208 	BSBW	IOC$VERIFYCHAN		;VERIFY IT AND RETURN ADDRESS

            BD            50     E9  0051   209 	BLBC	R0,CRMPSC_RET		;BRANCH IF BAD CHANNEL PARAMETER

            58            51     D0  0054   210 	MOVL	R1,R8			;CHANNEL CONTROL BLOCK ADDRESS

            54   00000000'EF     D0  0057   211 	MOVL	L^SCH$GL_CURPCB,R4	;GET PCB ADDRESS

            59            01     E1  005E   212 	BBC	#SEC$V_CRF,R9,25$	;BRANCH IF NOT CRF SECTION

                          05         0061       

         00'AD            00'    E2  0062   213 	BBSS	S^#CDL$V_CHGPAGFIL,B^CDL$L_MAXACMODE(FP),25$ ;MUST CHARGE PAGE FILE

                          00         0066       

                                     0067   214 

                                     0067   215 	ASSUME	SEC$V_GBL EQ 0

            A1            59     E9  0067   216 25$:	BLBC	R9,CRMPSC_PROCESS	;BRANCH IF CREATING PROCESS SECTION

            50   00000000'EF     DE  006A   217 	MOVAL	L^EXE$GL_GSDMTX,R0	;ADR OF GLOBAL SECTION MUTEX

                 00000000'EF     16  0071   218 	JSB	SCH$LOCKW		;LOCK GSD MUTEX FOR WRITING

                                     0077   219 ;

                                     0077   220 ; RETURNS WITH IPL = ASTDEL

                                     0077   221 ; R8 = CHANNEL CONTROL BLOCK ADDRESS

                                     0077   222 ; R9 = SECTION FLAGS

                                     0077   223 ; 0(SP)  = STARTVA

                                     0077   224 ; 4(SP) = ENDVA

                                     0077   225 ; 8(SP) = SUCCESS CODE FOR MAP GLOBAL SECTION

                                     0077   226 ; NOTE THAT ALL EXITS FROM THIS POINT ON MUST UNLOCK THE GSD MUTEX

                                     0077   227 ;

            5E            18     C2  0077   228 	SUBL	#<6*4>,SP		;MAKE ROOM FOR GSD NAME

            57            5E     D0  007A   229 	MOVL	SP,R7			;R7 = ADDRESS OF GSD NAME STORAGE

                                     007D   230 

                                     007D   231 	ASSUME	IDENT EQ GSDNAM+4

            50         14 AC     7D  007D   232 	MOVQ	GSDNAM(AP),R0		;DESCRIPTOR ADDRESS FOR GLOBAL SECTION NAME

                                     0081   233 					;ADDRESS OF IDENTIFICATION QUAD WORD

            56            59     D0  0081   234 	MOVL	R9,R6			;SECTION FLAGS

                          FF79'  30  0084   235 	BSBW	MMG$GSDSCN		;SCAN FOR THE NAME

                                     0087   236 ;

                                     0087   237 ; R5 RETURNED WITH SYSTEM PROCESS HEADER ADDRESS WHETHER SUCCESSFUL OR NOT

                                     0087   238 ;

            88            50     E8  0087   239 	BLBS	R0,CRMPSC_FOUND		;BRANCH IF SECTION ALREADY EXISTS

            50       0978 8F     B1  008A   240 	CMPW	#SS$_NOSUCHSEC,R0	;CONTINUE WITH CREATION IF NOT FOUND

                          8E     12  008F   241 	BNEQ	ULKGSDMTXRET1		;BRANCH IF SOME OTHER ERROR

                                     0091   242 ;

                                     0091   243 ; GLOBAL SECTION NAME DOESN'T EXIST, CREATE A NEW ONE

                                     0091   244 ; ALLOCATE A GLOBAL SECTION DESCRIPTOR BLOCK

                                     0091   245 ; 0(SP) - 16(SP) = GSD NAME COUNTED STRING

                                     0091   246 ; 20(SP) - 24(SP) = IDENTIFICATION QUAD WORD

                                     0091   247 ;

                                     0091   248 

                                     0091   249 	ASSUME	PRV$V_SYSGBL EQ PRV$V_PRMGBL+1

                                     0091   250 	ASSUME	SEC$V_SYSGBL EQ SEC$V_PERM+1

            02            18     EF  0091   251 	EXTZV	#PRV$V_PRMGBL,#2,@CTL$GL_PHD,R0 ;GET PRIVILEGES FOR PERM AND SYS

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page   6

X0107           CRMPSC - CREATE AND MAP SECTION                                                                                  (3)



            50   00000000'FF         0094       

            02            0E     EF  009A   252 	EXTZV	#SEC$V_PERM,#2,R9,R1	;GET DESIRED PERMANENT AND SYSTEM WIDE FLAGS

            51            59         009D       

            51            50     CA  009F   253 	BICL	R0,R1			;IF ANY DESIRED BITS STILL LEFT ON

                          7C     12  00A2   254 	BNEQ	CRMPSC_NOPRIV1		;THEN NO PRIVILEGE FOR REQUESTED OPERATION

                          FF59'  30  00A4   255 	BSBW	MMG$DALCSTXSCN		;SCAN FOR SECTIONS TO DEALLOCATE

            56   00000000'FF     0F  00A7   256 	REMQUE	@L^EXE$GL_GSDFREFL,R6	;GET A FREE GSD IF ANY

                          17     1C  00AE   257 	BVC	35$			;BRANCH IF GOT ONE

            51            28     9A  00B0   258 	MOVZBL	#GSD$C_LENGTH,R1	;NUMBER OF BYTES NEEDED

                 00000000'EF     16  00B3   259 	JSB	EXE$ALOPAGED		;ALLOCATE FROM PAGED POOL

            67            50     E9  00B9   260 	BLBC	R0,GSDFULL		;BRANCH IF NONE AVAILABLE

            56            52     D0  00BC   261 	MOVL	R2,R6			;ADDRESS OF NEW GSD

         08 A6            28     9B  00BF   262 	MOVZBW	#GSD$C_LENGTH,GSD$W_SIZE(R6) ;FILL IN SIZE OF GSD

         0A A6            15     9B  00C3   263 	MOVZBW	#DYN$C_GSD,GSD$B_TYPE(R6) ;AND TYPE CODE

         18 A6            8E     7D  00C7   264 35$:	MOVQ	(SP)+,GSD$T_GSDNAM(R6)	;STORE SECTION NAME

         20 A6            8E     7D  00CB   265 	MOVQ	(SP)+,GSD$T_GSDNAM+8(R6)

            50            8E     7D  00CF   266 	MOVQ	(SP)+,R0		;R0=MATCH CONTROL, R1=IDENTIFICATION DATA

            02            50     D1  00D2   267 	CMPL	R0,#SEC$K_MATLEQ	;VALID MATCH CONTROL

                          53     14  00D5   268 	BGTR	BADMATCHCTL		;BRANCH IF NOT

         14 A6            51     D0  00D7   269 	MOVL	R1,GSD$L_IDENT(R6)	;SET GLOBAL SECTION IDENT

                                     00DB   270 ;

                                     00DB   271 ; ALLOCATE A GLOBAL SECTION TABLE ENTRY FOR THE NEW SECTION

                                     00DB   272 ; R8 = CHANNEL CONTROL BLOCK ADDRESS

                                     00DB   273 ; R9 = SECTION FLAGS

                                     00DB   274 ; 0(SP) = STARVA

                                     00DB   275 ; 4(SP) = ENDVA

                                     00DB   276 ; 8(SP) = SUCCESS CODE FOR MAP GLOBAL SECTION

                                     00DB   277 ;

                       00'AD     F0  00DB   278 	INSV	B^CDL$L_MAXACMODE(FP),#SEC$V_AMOD,- ;SET SECTION ACCESS MODE

            02            08         00DE   279 		#SEC$S_AMOD,R9

                          59         00E0       

                          0235   30  00E1   280 	BSBW	INITSECTBL		;ALLOCATE AND INIT SECTION TABLE

            48            50     E9  00E4   281 	BLBC	R0,GSTFULL1		;BRANCH IF NONE AVAILABLE

                                     00E7   282 ;

                                     00E7   283 ; R1  = SECTION TABLE INDEX

                                     00E7   284 ; R7  = SECTION PAGE COUNT

                                     00E7   285 ; R10 = SECTION TABLE BASE ADDRESS

                                     00E7   286 ;

         12 A6            51     B0  00E7   287 	MOVW	R1,GSD$W_GSTX(R6)	;SAVE SECTION INDEX

            50         0C AA     D0  00EB   288 	MOVL	SEC$L_WINDOW(R10),R0	;GET WINDOW ADDRESS

            50         18 A0     D0  00EF   289 	MOVL	WCB$L_FCB(R0),R0	;CHAIN TO FCB ADDRESS

                          0B     13  00F3   290 	BEQL	38$			;BRANCH IF NOT AN FCP WINDOW

                       2C AC     A9  00F5   291 	BISW3	PROT(AP),FCB$W_FILEPROT(R0),- ;SET POSSIBLY RESTRICTED

         10 A6         3C A0         00F8   292 		GSD$W_PROT(R6)		;FILE PROTECTION

            50         38 A0     D0  00FC   293 	MOVL	FCB$L_FILEOWNER(R0),R0	;AND FETCH THE FILE'S OWNER

         0C A6            50     D0  0100   294 38$:	MOVL	R0,GSD$L_UIC(R6)	;SET GLOBAL SECTION OWNER

                                     0104   295 					;0 INDICATES BYPASS FILE PROT CHECK

                                     0104   296 ;

                                     0104   297 ; GET GLOBAL PAGE TABLE ENTRIES

                                     0104   298 ;

            57            03     C1  0104   299 	ADDL3	#3,R7,R1		;PAGCNT + 2 FOR STOPPER ENTRIES

                          51         0107       

            51            01     CA  0108   300 	BICL	#1,R1			;ROUND UP TO EVEN NO. OF LONG WORDS

            51            04     C4  010B   301 	MULL	#4,R1			;DESIRED NO. OF BYTES OF GPTE

            53   00000000'EF     DE  010E   302 	MOVAL	L^EXE$GL_GPT,R3		;GPT ALLOCATION LIST HEAD

                 00000000'EF     16  0115   303 	JSB	EXE$ALLOCATE		;GET SOME GPT

            13            50     E8  011B   304 	BLBS	R0,40$			;BRANCH IF GOT SOME

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page   7

X0107           CRMPSC - CREATE AND MAP SECTION                                                                                  (3)



                          6A     11  011E   305 	BRB	GPTFULL			;GLOBAL PAGE TABLE FULL

                                     0120   306 ;

                                     0120   307 ; NO PRIVILEGE TO CREATE THE SECTION

                                     0120   308 ;

                                     0120   309 CRMPSC_NOPRIV1:

                          FEF9   31  0120   310 	BRW	CRMPSC_NOPRIV

                                     0123   311 ;

                                     0123   312 ; GLOBAL SECTION DESCRIPTORS NOT AVAILABLE

                                     0123   313 ;

                                     0123   314 GSDFULL:

            50       00CC 8F     3C  0123   315 	MOVZWL	#SS$_GSDFULL,R0		;GLOBAL SECTION DESCRIPTOR TABLE FULL

                          7E     11  0128   316 	BRB	ULKGSDMTXRET		;UNLOCK THE MUTEX AND RETURN ERROR

                                     012A   317 BADMATCHCTL:				;BAD MATCH CONTROL FIELD

            50       02E4 8F     3C  012A   318 	MOVZWL	#SS$_IVSECIDCTL,R0	;INVALID SECTION IDENT CONTROL

                                     012F   319 GSTFULL1:

                          70     11  012F   320 	BRB	GSTFULL			;GLOBAL SECTION TABLE FULL

                                     0131   321 ;

                                     0131   322 ; R2 = ADDRESS OF FIRST GPTE ALLOCATED, FRONT STOPPER GPTE

                                     0131   323 ; R7 = DESIRED SECTION PAGE COUNT

                                     0131   324 ;

                          82     D4  0131   325 40$:	CLRL	(R2)+			;SET FRONT STOPPER FOR GLOBAL SECTION

            53            52     D0  0133   326 	MOVL	R2,R3			;FIRST GPTE ADDRESS

            52   00000000'EF     C2  0136   327 	SUBL	MMG$GL_GPTBASE,R2	;BYTE OFFSET FROM BEGINNING OF GPT

            52            04     C6  013D   328 	DIVL	#4,R2			;LONG WORD OFFSET = GPTX

         08 AA            52     C8  0140   329 	BISL	R2,SEC$L_VPXPFC(R10)	;PUT GPTX IN (PFC ALREADY PRESENT)

                                     0144   330 ;

                                     0144   331 ; R3 = ADDRESS OF FIRST GLOBAL PTE TO FILL IN

                                     0144   332 ; R5 = PROCESS HEADER ADDRESS FOR SYSTEM

                                     0144   333 ; R7 = SECTION PAGE COUNT

                                     0144   334 ;

                                     0144   335 	ASSUME	SEC$V_DZRO EQ SEC$V_CRF+1 ;REQUIRE BITS TO BE ADJACENT

                                     0144   336 	ASSUME	SEC$V_WRT EQ SEC$V_DZRO+1

            03            01     EF  0144   337 	EXTZV	#SEC$V_CRF,#3,SEC$W_FLAGS(R10),R2 ;CRF, DZRO, AND WRT BITS

            52         14 AA         0147       

            52       0540 8F     A8  014A   338 	BISW	#<PTE$M_TYP1 ! PTE$M_TYP0 !- ;SECTION TYPE PTE

                                     014F   339 		<2@PTE$V_OWN>>@-16,R2	;OWNER FIELD USED FOR GLOBAL BITS

                                     014F   340 	ASSUME	GSD$W_GSTX GE 2

            51         10 A6     D0  014F   341 	MOVL	GSD$W_GSTX-2(R6),R1	;HIGH 16 BITS OF R1 = SEC TBL INDEX

            51            10     79  0153   342 	ASHQ	#16,R1,R1		;R2 = PAGE TABLE ENTRY

                          51         0156       

         14 AA            03     E1  0157   343 	BBC	#SEC$V_WRT,SEC$W_FLAGS(R10),50$ ;BRANCH IF NOT WRITABLE

                          04         015B       

            52            17     E2  015C   344 	BBSS	#PTE$V_OWN,R2,50$	;SET GBLWRT BIT IN OWNER FIELD

                          00         015F       

                                     0160   345 50$:

                                     0160   346 ;

                                     0160   347 ; R7 = COUNT OF GLOBAL PAGE TABLE ENTRIES TO LOCK AND FILL IN

                                     0160   348 ; R2 = PAGE TABLE ENTRY TO STORE IN NEW GPTE'S

                                     0160   349 ; R3 = ADDRESS OF FIRST GLOBAL PAGE TABLE ENTRY

                                     0160   350 ;

            63            07     90  0160   351 60$:	MOVB	#IPL$_SYNCH,(R3)	;SET UP TO REFERENCE PAGE AND

                                     0163   352 	SETIPL	(R3)			;AND RAISE TO SYNCH IN ONE INSTRUCTION

                 00000000'EF     16  0166   353 	JSB	MMG$INCPTREF		;LOCK THE GLOBAL PAGE TABLE

                                     016C   354 	SETIPL	#IPL$_ASTDEL		;BACK TO PAGE FAULTABLE STATE

            83            52     D0  016F   355 	MOVL	R2,(R3)+		;STORE NEW GPT ENTRY

            EB            57     F5  0172   356 	SOBGTR	R7,60$			;LOOP THROUGH SPECIFIED NO. OF PTE'S

                          63     D4  0175   357 	CLRL	(R3)			;ZERO STOPPER AT END OF GLOBAL SECTION

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page   8

X0107           CRMPSC - CREATE AND MAP SECTION                                                                                  (3)



            01            0F     EF  0177   358 	EXTZV	#SEC$V_SYSGBL,#1,R9,R0	;SYSTEM OR GROUP GLOBAL BIT

            50            59         017A       

            50   00000000'EF40   7E  017C   359 	MOVAQ	L^EXE$GL_GSDGRPFL[R0],R0 ;ADDRESS OF APPROPRIATE LIST

                                     0184   360 ;

                                     0184   361 ; QUEUE THE NEW GSD ON THE FRONT OF THE APPROPRIATE LIST.  PLACING IT ON THE

                                     0184   362 ; FRONT ALLOWS FOR THE INSTALLATION OF A NEW COPY OF SAY A FORTRAN OTS WITH

                                     0184   363 ; AN IDENT THAT IS GREATER THAN THE OLD BUT UPWARD COMPATIBLE.  THE NEW ONE

                                     0184   364 ; IS FOUND FIRST IF THE MATCH IS MATLEQ.  THE OLD ONE IS STILL AVAILABLE FOR

                                     0184   365 ; MATCH EQUAL.

                                     0184   366 ;

            60            66     0E  0184   367 	INSQUE	(R6),(R0)		;PLACE GSD ON THE SYSTEM OR GROUP GLOBAL LIST

                          0097   31  0187   368 	BRW	MAPGBLSEC2		;GO MAP THE SECTION

                                     018A   369 ;

                                     018A   370 ; GLOBAL PAGE TABLE FULL

                                     018A   371 ; R0 = SYSTEM STATUS CODE

                                     018A   372 ; R5 = SYSTEM PROCESS HEADER ADDRESS

                                     018A   373 ; R10 = SECTION TABLE ENTRY ADDRESS

                                     018A   374 ;

                                     018A   375 GPTFULL:

                          6A     D4  018A   376 	CLRL	SEC$L_GSD(R10)		;++X0107 GSD WILL BE DELETED BELOW

                                     018C   377 	ASSUME SEC$L_PAGCNT EQ SEC$L_REFCNT+4 ;++X0107 FIELDS MUST BE ADJACENT

                       18 AA     7C  018C   378 	CLRQ	SEC$L_REFCNT(R10)	;++X0107 SET INDICATORS FOR DELGBLSEC

         14 AA            0E     E5  018F   379 	BBCC	#SEC$V_PERM,SEC$W_FLAGS(R10),80$ ;++X0107 LET SECTION BE DELETED

                          00         0193       

         3A A5            01     E6  0194   380 80$:	BBSSI	#PHD$V_DALCSTX,PHD$W_FLAGS(R5),90$ ;++X0107 SET DELETION FLAG

                          00         0198       

                          FE64'  30  0199   381 90$:	BSBW	MMG$DALCSTXSCN		;SCAN FOR SECTIONS TO DEALLOCATE

            50       00C4 8F     3C  019C   382 	MOVZWL	#SS$_GPTFULL,R0		;GLOBAL PAGE TABLE FULL

                                     01A1   383 ;

                                     01A1   384 ; GLOBAL SECTION TABLE FULL

                                     01A1   385 ; R0 = SYSTEM STATUS CODE

                                     01A1   386 ;

                                     01A1   387 GSTFULL:

   00000000'EF            66     0E  01A1   388 	INSQUE	(R6),L^EXE$GL_GSDFREFL	;PUT GSD BACK ON FREE LIST

                                     01A8   389 ;

                                     01A8   390 ; UNLOCK THE GLOBAL SECTION MUTEX AND RETURN WITH STATUS CODE IN R0

                                     01A8   391 ;

                                     01A8   392 ULKGSDMTXRET:

                          50     DD  01A8   393 	PUSHL	R0			;SAVE STATUS CODE

                          FE53'  30  01AA   394 	BSBW	MMG$GSDMTXULK		;UNLOCK THE GSD MUTEX

                          FE50'  30  01AD   395 	BSBW	MMG$DELGBLWCB		;DELETE ANY GLOBAL WINDOW CONTROL BLOCKS

                          01     BA  01B0   396 	POPR	#^M<R0>			;RESTORE STATUS CODE

                                     01B2   397 	SETIPL	B^CDL$L_CALLEDIPL(FP)	;RESTORE CALLER'S IPL

                                 04  01B6   398 	RET

                                     01B7   399 

                                     01B7   400 	.DSABL	LSB

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page   9

X0107           MGBLSC - MAP GLOBAL SECTION                                                                                      (4)



                                     01B7   402 	.SBTTL	MGBLSC - MAP GLOBAL SECTION

                                     01B7   403 ;++

                                     01B7   404 ; FUNCTIONAL DESCRIPTION:

                                     01B7   405 ;

                                     01B7   406 ;	THE MAP GLOBAL SECTION SYSTEM SERVICE MAPS A SPECIFIED GLOBAL

                                     01B7   407 ; SECTION INTO A SPECIFIED RANGE OF VIRTUAL ADDRESS SPACE.

                                     01B7   408 ;

                                     01B7   409 ; CALLING SEQUENCE:

                                     01B7   410 ;

                                     01B7   411 ;	CALLG	ARGLIST,@#SYS$MGBLSC

                                     01B7   412 ;

                                     01B7   413 ; INPUT PARAMETERS:

                                     01B7   414 ;

                                     01B7   415 ;	INADR(AP) = ADDRESS OF 2 LONG WORDS THE 1ST OF WHICH SPECIFIES

                                     01B7   416 ;		THE STARTING VIRTUAL ADDRESS TO CREATE, THE 2ND SPECIFIES

                                     01B7   417 ;		THE ENDING VIRTUAL ADDRESS TO CREATE (INCLUSIVE).

                                     01B7   418 ;	RETADR(AP) = ADDRESS OF A 2 LONGWORD ARRAY INTO WHICH IS RETURNED

                                     01B7   419 ;		THE STARTING AND ENDING VIRTUAL ADDRESSES (INCLUSIVE)

                                     01B7   420 ;		OF THE PAGES JUST CREATED

                                     01B7   421 ;	ACMODE(AP) = THE ACCESS MODE (MAXIMIZED WITH CALLING MODE)

                                     01B7   422 ;		USED AS THE OWNER OF THE NEW PAGE(S)

                                     01B7   423 ;	FLAGS(AP)  = BIT  0  - GBL - GLOBAL IF SET, PROCESS IF CLEAR

                                     01B7   424 ;		     BIT  1  - CRF - COPY ON REFERENCE

                                     01B7   425 ;		     BIT  2  - DZRO - DEMAND ZERO

                                     01B7   426 ;		     BIT  3  - WRT - WRITABLE IF SET, READ ONLY IF CLEAR

                                     01B7   427 ;		     BITS 4  - 13 RESERVED, MUST BE ZERO

                                     01B7   428 ;		     BIT  14 - PERM - PERMANENT IF SET, TEMPORARY IF CLEAR

                                     01B7   429 ;		     BIT  15 - SYSGBL - SYSTEM GLOBAL IF SET, GROUP GLOBAL IF CLEAR

                                     01B7   430 ;		     BITS 16 - 31 RESERVED, MUST BE ZERO

                                     01B7   431 ;	GSDNAM(AP) = THE DESCRIPTOR OF THE GLOBAL SECTION NAME

                                     01B7   432 ;	IDENT(AP)  = ADDRESS OF QUAD WORD CONTAINING SECTION IDENTIFICATION

                                     01B7   433 ;		     FIRST LONG WORD CONTAINS THE MATCH CONTROL INFORMATION

                                     01B7   434 ;			0 = ISD$K_MATALL, MATCH ALWAYS

                                     01B7   435 ;			1 = ISD$K_MATEQU, MATCH IF IDENTS ARE EQUAL

                                     01B7   436 ;			2 = ISD$K_MATLEQ, MATCH IF HIGH 8 BITS ARE EQUAL

                                     01B7   437 ;			    AND LOW 24 BITS ARE LESS THAN OR EQUAL TO

                                     01B7   438 ;			    THE ID STORED IN THE GLOBAL SECTION.

                                     01B7   439 ;		     SECOND LONG WORD CONTAINS THE IDENT TO BE COMPARED

                                     01B7   440 ;	RELPAG(AP) = RELATIVE PAGE IN SECTION TO START MAPPING

                                     01B7   441 ;

                                     01B7   442 ; IMPLICIT INPUTS:

                                     01B7   443 ;

                                     01B7   444 ;	NONE

                                     01B7   445 ;

                                     01B7   446 ; OUTPUT PARAMETERS:

                                     01B7   447 ;

                                     01B7   448 ;	NONE

                                     01B7   449 ;

                                     01B7   450 ; IMPLICIT OUTPUTS:

                                     01B7   451 ;

                                     01B7   452 ;	NONE

                                     01B7   453 ;

                                     01B7   454 ; COMPLETION CODES:

                                     01B7   455 ;

                                     01B7   456 ;	NONE

                                     01B7   457 ;

                                     01B7   458 ; SIDE EFFECTS:

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page  10

X0107           MGBLSC - MAP GLOBAL SECTION                                                                                      (4)



                                     01B7   459 ;

                                     01B7   460 ;	NONE

                                     01B7   461 ;

                                     01B7   462 ;--

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page  11

X0107           MGBLSC - MAP GLOBAL SECTION                                                                                      (5)



                                     01B7   464 ;

                                     01B7   465 ; **********************************************************************

                                     01B7   466 ;

                                     01B7   467 ; **************** THE FOLLOWING CODE MAY BE PAGED *****************

                                     01B7   468 ;

                                 000001B7   469 	.PSECT	Y$EXEPAGED

                                     01B7   470 ;

                                     01B7   471 ; **********************************************************************

                                     01B7   472 ;

                                     01B7   473 ;

                                     01B7   474 ; NO PRIVILEGE TO MAP GLOBAL SECTION

                                     01B7   475 ;

                                     01B7   476 MGBLSC_NOPRIV:

                          FE62   31  01B7   477 	BRW	CRMPSC_NOPRIV

                                     01BA   478 

                               07FC' 01BA   479 	.ENTRY	EXE$MGBLSC,^M<R2,R3,R4,R5,R6,R7,R8,R9,R10>

                                     01BC   480 

            5E            00'    C2  01BC   481 	SUBL	S^#CDL$C_LENGTH,SP	;RESERVE A SCRATCH STORAGE AREA

                          FE3E'  30  01BF   482 	BSBW	MMG$INADRINI		;GET INPUT RANGE TO R4, R5

                                     01C2   483 					;INIT RETURN RANGE AND SCRATCH AREA

                          01     DD  01C2   484 	PUSHL	#SS$_NORMAL		;SAVE SUCCESS RETURN CODE

                          30     BB  01C4   485 	PUSHR	#^M<R4,R5>		;PUSH ENDVA, STARTVA

            59         10 AC     D0  01C6   486 	MOVL	FLAGS(AP),R9		;SECTION FLAGS

            50            59     D0  01CA   487 	MOVL	R9,R0			;VERIFY FLAGS IN R0

                          FE30'  30  01CD   488 	BSBW	MMG$VFYSECFLG		;VERIFY SECTION FLAGS

            54   00000000'EF     D0  01D0   489 	MOVL	L^SCH$GL_CURPCB,R4	;PROCESS CONTROL BLOCK ADDRESS

            50   00000000'EF     DE  01D7   490 	MOVAL	L^EXE$GL_GSDMTX,R0	;GLOBAL SECTION MUTEX

                 00000000'EF     16  01DE   491 	JSB	SCH$LOCKR		;LOCK GSD FOR READING

                                     01E4   492 ;

                                     01E4   493 ; RETURNS AT ASTDEL

                                     01E4   494 ;

            5E            18     C2  01E4   495 	SUBL	#<6*4>,SP		;RESERVE SPACE FOR GSD NAME

            57            5E     D0  01E7   496 	MOVL	SP,R7			;ADDRESS OF SCRATCH SPACE

                                     01EA   497 

                                     01EA   498 	ASSUME	IDENT EQ GSDNAM+4

            50         14 AC     7D  01EA   499 	MOVQ	GSDNAM(AP),R0		;DESCRIPTOR ADDRESS FOR GLOBAL SECTION NAME

                                     01EE   500 					;ADDRESS OF IDENTIFICATION QUAD WORD

            56            59     D0  01EE   501 	MOVL	R9,R6			;SECTION FLAGS

                          FE0C'  30  01F1   502 	BSBW	MMG$GSDSCN		;SCAN GSD'S FOR THIS NAME

            5E            18     C0  01F4   503 	ADDL	#<6*4>,SP		;RECLAIM THE SCRATCH AREA

            AE            50     E9  01F7   504 	BLBC	R0,ULKGSDMTXRET		;BRANCH IF SECTION NOT FOUND

                                     01FA   505 ;

                                     01FA   506 ; 0(SP) = STARTVA, 4(SP) = ENDVA

                                     01FA   507 ; 8(SP) = SUCCESS CODE (SS$_NORMAL OR SS$_EXISTED) TO BE RETURNED IF

                                     01FA   508 ;	MAPPING IS SUCCESSFUL.

                                     01FA   509 ; R6 = GLOBAL SECTION DESCRIPTOR BLOCK ADDRESS

                                     01FA   510 ; R9 = SECTION FLAGS

                                     01FA   511 ;

                                     01FA   512 MAPGBLSEC1:

            5A         12 A6     32  01FA   513 	CVTWL	GSD$W_GSTX(R6),R10	;SECTION INDEX

            55         20 A5     C1  01FE   514 	ADDL3	PHD$L_PSTBASOFF(R5),R5,R0 ;BASE ADDRESS OF SECTION TABLE

                          50         0202       

            5A            604A   DE  0203   515 	MOVAL	(R0)[R10],R10		;ADDRESS OF SECTION TABLE ENTRY

         14 AA            1E     9C  0207   516 	ROTL	#31-SEC$V_CRF,SEC$W_FLAGS(R10),R0 ;FETCH SECTION FLAGS

                          50         020B       

                          05     18  020C   517 	BGEQ	10$			;BRANCH IF NOT COPY ON REFERENCE

         00'AD            00'    E2  020E   518 	BBSS	S^#CDL$V_CHGPAGFIL,B^CDL$L_MAXACMODE(FP),10$

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page  12

X0107           MGBLSC - MAP GLOBAL SECTION                                                                                      (5)



                          00         0212       

                                     0213   519 					;MUST CHARGE PAGES AGAINST PAGE FILE QUOTA

                                 EF  0213   520 10$:	EXTZV	#<SEC$V_AMOD-<SEC$V_CRF+1>>,- ;GET ACCESS MODE OF SECTION

            02            06         0214   521 		#SEC$S_AMOD,R0,R0

            50            50         0216       

            50         00'AD     91  0218   522 	CMPB	B^CDL$L_MAXACMODE(FP),R0 ;SEE IF THIS CALLER CAN MAP THE SECTION

                          99     14  021C   523 	BGTR	MGBLSC_NOPRIV		;BRANCH IF CANNOT MAP THE SECTION

                       18 AA     D6  021E   524 	INCL	SEC$L_REFCNT(R10)	;BIAS THE SECTION REFERENCE COUNT

                                     0221   525 					;SO THAT IT CAN'T BE DELETED

                                     0221   526 ;

                                     0221   527 ; R5  = SYSTEM PROCESS HEADER ADDRESS

                                     0221   528 ; R9  = SECTION FLAGS

                                     0221   529 ; R10 = SECTION TABLE ENTRY ADDRESS

                                     0221   530 ;

                                     0221   531 MAPGBLSEC2:

                          FDDC'  30  0221   532 	BSBW	MMG$GSDMTXULK		;UNLOCK THE GLOBAL SECTION MUTEX

                                     0224   533 ;

                                     0224   534 ; BUILD A PAGE TABLE ENTRY TO PUT IN THE PROCESS PAGE TABLE

                                     0224   535 ;

            16            00     EF  0224   536 	EXTZV	#PTE$V_GPTX,#PTE$S_GPTX,SEC$L_VPXPFC(R10),R8 ;1ST GBL PAG TBL INDEX

            58         08 AA         0227       

                          0094   30  022A   537 	BSBW	SETSECPROTOWN		;SET SECTION PROTECTION AND OWNER

            6D            50     E9  022D   538 	BLBC	R0,70$			;BRANCH IF PROTECTION VIOLATION

                                     0230   539 ;

                                     0230   540 ; R4 = CURRENT PCB ADDRESS FROM GSDMTXULK

                                     0230   541 ; VALIDATE THIS PROCESS' ACCESS TO THIS FILE

                                     0230   542 ;

            52         0C A6     D0  0230   543 	MOVL	GSD$L_UIC(R6),R2	;GET FILE OWNER

                          31     13  0234   544 	BEQL	15$			;BRANCH IF SKIPPING FILE PROTECTION CHECK

            51         10 A6     3C  0236   545 	MOVZWL	GSD$W_PROT(R6),R1	;AND PROTECTION

                          51     DD  023A   546 	PUSHL	R1			;SAVE PROTECTION FOR SYSTEM CHECK

                                     023C   547 ;

                                     023C   548 ; CHECK THAT THE CALLER HAS READ OR WRITE ACCESS TO THE SECTION

                                     023C   549 ; ACCORDING TO HOW IT IS TO BE MAPPED.

                                     023C   550 ;

            50   00000000'EF     DE  023C   551 	MOVAL	EXE$CHKRDACCES,R0	;ADDRESS OF READ ACCESS CHECK

            59            03     E1  0243   552 	BBC	#SEC$V_WRT,R9,10$	;BRANCH IF NOT WRITING THE SECTION

                          0C         0246       

            59            01     E0  0247   553 	BBS	#SEC$V_CRF,R9,10$	;CRF DOES NOT REQUIRE WRITE ACCESS

                          08         024A       

            50         00'A0     9E  024B   554 	MOVAB	B^<EXE$CHKWRTACCES-EXE$CHKRDACCES>(R0),R0 ;ADR OF WRITE ACCESS CHECK

            6E            1F     9C  024F   555 	ROTL	#<32-1>,(SP),(SP)	;CHECK WRITE PERMISSION FOR SYSTEM

                          6E         0252       

                          60     16  0253   556 10$:	JSB	(R0)			;CALL THE ACCESS CHECK ROUTINE

                          02     BA  0255   557 	POPR	#^M<R1>			;RECOVER SYSTEM PROTECTION

            0D            50     E8  0257   558 	BLBS	R0,15$			;BRANCH IF CALLER HAS DESIRED ACCESS

                                     025A   559 	IFPRIV	LOG_IO,12$		;IF CALLER HAS LOGICAL I/O

                                     025F   560 	IFNPRIV	PHY_IO,70$		;OR PHYSICAL I/O PRIVILEGE

            36            51     E8  0264   561 12$:	BLBS	R1,70$			;THEN CHECK SYSTEM ACCESS

                                     0267   562 					;BRANCH IF ACCESS DENIED

            59         1C AA     D0  0267   563 15$:	MOVL	SEC$L_PAGCNT(R10),R9	;NUMBER OF PAGES IN THE SECTION

            50         1C AC     D0  026B   564 	MOVL	RELPAG(AP),R0		;STARTING RELATIVE PAGE TO MAP

            59            50     C2  026F   565 	SUBL	R0,R9			;FEWER PAGES TO MAP

                          46     15  0272   566 	BLEQ	100$			;BRANCH IF NOTHING TO MAP

            58            50     C0  0274   567 	ADDL	R0,R8			;BIAS STARTING GPTX

            58            16     E2  0277   568 	BBSS	#PTE$V_TYP0,R8,20$	;GLOBAL PAGE TYPE

                          00         027A       

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page  13

X0107           MGBLSC - MAP GLOBAL SECTION                                                                                      (5)



                                     027B   569 20$:

                                     027B   570 ;

                                     027B   571 ; 0(SP) = STARVA, 4(SP) = ENDVA

                                     027B   572 ; R8 = STARTING PTE CONTENTS, R9 = MAXIMUM PAGE COUNT TO MAP

                                     027B   573 ; R10 = GLOBAL SECTION TABLE ADDRESS

                                     027B   574 ;

                          0C     BA  027B   575 	POPR	#^M<R2,R3>		;R2 = STARTVA, R3 = ENDVA

            50            52     D2  027D   576 	MCOML	R2,R0			;STARTVA = -1?

                          1E     13  0280   577 	BEQL	80$			;BRANCH IF YES, NO RANGE TO MAP

                          59     D7  0282   578 	DECL	R9			;PAGE COUNT BASE 0

            53            52     D1  0284   579 	CMPL	R2,R3			;CHECK DIRECTION OF MAPPING

                          09     1F  0287   580 	BLSSU	60$			;BRANCH IF FORWARDS

                          04     1A  0289   581 	BGTRU	50$			;BRANCH IF BACKWARDS

            52            1E     E1  028B   582 	BBC	#VA$V_P1,R2,60$		;WHEN EQUAL, FORWARD IF P0, BACKWARDS IF P1

                          03         028E       

            58            59     C0  028F   583 50$:	ADDL	R9,R8			;START AT LAST GPTX WHEN MAPPING BACKWARDS

            56       0477'CF     DE  0292   584 60$:	MOVAL	W^MMG$MAPSECPAG,R6	;MAP SECTION PAGE ROUTINE

                          FD66'  30  0297   585 	BSBW	MMG$CRECOM2		;TO THE COMMON CREATE PAGE CODE

            03            50     E8  029A   586 	BLBS	R0,80$			;IF SUCCESSFUL USE SUCCESS STATUS

                                     029D   587 					;ALREADY ON TOP OF STACK

            6E            50     D0  029D   588 70$:	MOVL	R0,(SP)			;OTHERWISE SAVE ERROR STATUS

                                     02A0   589 ;

                                     02A0   590 ; 0(SP) = SYSTEM STATUS CODE

                                     02A0   591 ;

            51            6A     D0  02A0   592 80$:	MOVL	SEC$L_GSD(R10),R1	;GLOBAL SECTION DESCRIPTOR BLOCK

            51         12 A1     32  02A3   593 	CVTWL	GSD$W_GSTX(R1),R1	;SECTION INDEX

            55   00000000'FF     DE  02A7   594 	MOVAL	@L^MMG$GL_SYSPHD,R5	;SYSTEM PROCESS HEADER

                 00000000'EF     16  02AE   595 	JSB	MMG$DECSECREF		;REMOVE SECTION REFERENCE BIAS

                          FD49'  30  02B4   596 	BSBW	MMG$DELGBLWCB		;DELETE ANY GLOBAL WINDOWS

                          01     BA  02B7   597 	POPR	#^M<R0>			;SYSTEM STATUS CODE

                                 04  02B9   598 	RET				;RETURN STATUS TO CALLER

                                     02BA   599 ;

                                     02BA   600 ; RELATIVE PAGE PARAMETER IS BEYOND END OF FILE

                                     02BA   601 ;

            6E       0870 8F     3C  02BA   602 100$:	MOVZWL	#SS$_ENDOFFILE,(SP)	;RETURN END OF FILE CONDITION

                          DF     11  02BF   603 	BRB	80$

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page  14

X0107           SETSECPROTOWN - SET SECTION PROTECTION AND OWNE                                                                  (6)



                                     02C1   605 	.SBTTL	SETSECPROTOWN - SET SECTION PROTECTION AND OWNER

                                     02C1   606 ;

                                     02C1   607 ; INPUTS:

                                     02C1   608 ;

                                     02C1   609 ;	R8  = PAGE TABLE ENTRY WITH SECTION INDEX, FLAGS, PAGE TYPE BITS

                                     02C1   610 ;	R9  = SECTION FLAGS

                                     02C1   611 ;	R10 = SECTION TABLE ENTRY ADDRESS

                                     02C1   612 ;	CDL$L_MAXACMODE(FP) = MAXIMIZED ACCESS MODE

                                     02C1   613 ;

                                     02C1   614 ; OUTPUTS:

                                     02C1   615 ;

                                     02C1   616 ;	R0 = SYSTEM STATUS CODE

                                     02C1   617 ;	R8 OWNER AND PROTECTION FIELDS FILLED IN

                                     02C1   618 ;

                                     02C1   619 SETSECPROTOWN:

            17         00'AD     F0  02C1   620 	INSV	B^CDL$L_MAXACMODE(FP),#PTE$V_OWN,#PTE$S_OWN,R8 ;PAGE OWNER

            58            02         02C5       

                                     02C7   621 ;

                                     02C7   622 ; CALCULATE PROTECTION FIELD

                                     02C7   623 ;

         00'AD         F8 8F     85  02C7   624 	MULB3	#-8,B^CDL$L_MAXACMODE(FP),R0 ;8 * ACCESS MODE

                          50         02CC       

            59            03     E1  02CD   625 	BBC	#SEC$V_WRT,R9,40$ 	;BRANCH IF MAPPING READ ONLY

                          08         02D0       

         14 AA            03     E1  02D1   626 	BBC	#SEC$V_WRT,SEC$W_FLAGS(R10),100$ ;BRANCH IF ILLEGAL TO WRITE

                          14         02D5       

            50            04     82  02D6   627 	SUBB	#4,R0			;4 * (2 * ACC MODE + WRT)

                          50     9C  02D9   628 40$:	ROTL	R0,#<	       -

                                     02DB   629 		<<PRT$C_KR>>    !-	;KERNEL READ

                                     02DB   630 		<<PRT$C_KW>@4>  !-	;KERNEL WRITE

                                     02DB   631 		<<PRT$C_ER>@8>  !-	;EXEC READ

                                     02DB   632 		<<PRT$C_EW>@12> !-	;EXEC WRITE

                                     02DB   633 		<<PRT$C_SR>@16> !-	;SUPER READ

                                     02DB   634 		<<PRT$C_SW>@20> !-	;SUPER WRITE

                                     02DB   635 		<<PRT$C_UR>@24> !-	;USER READ

                                     02DB   636 		<<PRT$C_UW>@28>  -	;USER WRITE

            50   4F8B5723 8F         02DB   637 		>,R0			;ROTATE DESIRED PROTECTION TO R0<0:3>

            1B            50     F0  02E1   638 	INSV	R0,#PTE$V_PROT,#PTE$S_PROT,R8 ;PUT PROTECTION IN PTE

            58            04         02E4       

            50            01     3C  02E6   639 	MOVZWL	#SS$_NORMAL,R0		;SUCCESSFUL COMPLETION

                                 05  02E9   640 	RSB

                                     02EA   641 ;

                                     02EA   642 ; TRIED TO MAP READ ONLY SECTION WRITABLE

                                     02EA   643 ;

            50            24     3C  02EA   644 100$:	MOVZWL	#SS$_NOPRIV,R0		;PRIVILEGE VIOLATION

                                 05  02ED   645 	RSB

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page  15

X0107           INITSECTBL - ALLOC & INIT SECTION TABLE ENTRY                                                                    (7)



                                     02EE   647 	.SBTTL	INITSECTBL - ALLOC & INIT SECTION TABLE ENTRY

                                     02EE   648 ;

                                     02EE   649 ; INPUTS:

                                     02EE   650 ;

                                     02EE   651 ;	R5 = PROCESS HEADER ADDRESS

                                     02EE   652 ;	R6 = GLOBAL SECTION DESCRIPTOR ADDRESS IF GLOBAL SECTION

                                     02EE   653 ;	   = CHANNEL CONTROL BLOCK ADDRESS IF PROCESS SECTION

                                     02EE   654 ;	R8 = CHANNEL CONTROL BLOCK ADDRESS

                                     02EE   655 ;	R9 = SECTION FLAGS

                                     02EE   656 ;

                                     02EE   657 ; OUTPUTS:

                                     02EE   658 ;

                                     02EE   659 ;	R0  = SYSTEM STATUS CODE

                                     02EE   660 ;	R1  = SECTION TABLE INDEX

                                     02EE   661 ;	R2,R3 ALTERED

                                     02EE   662 ;	R7  = SECTION PAGE COUNT

                                     02EE   663 ;	R10 = SECTION TABLE ADDRESS

                                     02EE   664 ;

                                     02EE   665 ;

                                     02EE   666 ; ***** NOTE THAT SECTION SIZE MUST BE SUCH THAT SECTION INDICES HAVE THE

                                     02EE   667 ; ***** LOW BIT ZERO.

                                     02EE   668 ;

                                     02EE   669 	ASSUME	SEC$C_LENGTH@-2&1 EQ 0

                                     02EE   670 

                                     02EE   671 	.ENABL	LSB

                                     02EE   672 ;

                                     02EE   673 ; GLOBAL SECTION BEING CREATED ON CHANNEL WITH PROCESS SECTION INDEX

                                     02EE   674 ; GET WINDOW ADDRESS

                                     02EE   675 ;

            50   00000000'9F     D0  02EE   676 10$:	MOVL	@#CTL$GL_PHD,R0		;PROCESS HEADER ADDRESS

            50         20 A0     C0  02F5   677 	ADDL	PHD$L_PSTBASOFF(R0),R0	;FORM BASE OF PROCESS SECTION TABLE

            52         0C A042   D0  02F9   678 	MOVL	SEC$L_WINDOW(R0)[R2],R2	;GET WINDOW ADDRESS FROM PROCESS SECTION

                          4A     11  02FE   679 	BRB	100$			;AND REJOIN THE NORMAL FLOW

                                     0300   680 ;

                                     0300   681 ; ATTEMPTED TO CREATE WRITABLE SECTION ON READ ONLY FILE

                                     0300   682 ;

            7E            24     3C  0300   683 20$:	MOVZWL	#SS$_NOPRIV,-(SP)	;PRIVILEGE VIOLATION

                          0B     11  0303   684 	BRB	70$

                                     0305   685 ;

                                     0305   686 ; SPECIAL CASE CODE FOR NON-FCP WINDOW - DOES NOT POINT TO AN FCB

                                     0305   687 ;

            50         24 A2     3C  0305   688 40$:	MOVZWL	WCB$W_P1_COUNT(R2),R0	;USE THIS AS FILE SIZE

                          69     11  0309   689 	BRB	120$			;AND REJOIN THE MAIN PATH CODE

                                     030B   690 ;

                                     030B   691 ; CHANNEL IS ACTIVE OR OTHERWISE INAPPROPRIATE FOR CREATING A SECTION

                                     030B   692 ;

            7E       026C 8F     3C  030B   693 60$:	MOVZWL	#SS$_IVCHNLSEC,-(SP)	;INVALID CHANNEL FOR SECTION

                 00000000'EF     16  0310   694 70$:	JSB	MMG$DALCSTX		;DEALLOCATE SECTION TABLE ENTRY

                          01     BA  0316   695 	POPR	#^M<R0>			;GET ERROR STATUS

                                 05  0318   696 80$:	RSB

                                     0319   697 

                                     0319   698 

                                     0319   699 INITSECTBL:

                          FCE4'  30  0319   700 	BSBW	MMG$ALCSTX		;ALLOCATE SECTION TABLE INDEX

            F9            50     E9  031C   701 	BLBC	R0,80$			;BRANCH IF NONE AVAILABLE

            55         20 A5     C1  031F   702 	ADDL3	PHD$L_PSTBASOFF(R5),R5,R3 ;BASE ADDRESS OF SECTION TABLE

                          53         0323       

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page  16

X0107           INITSECTBL - ALLOC & INIT SECTION TABLE ENTRY                                                                    (7)



            5A            6341   DE  0324   703 	MOVAL	(R3)[R1],R10		;ADDRESS OF SECTION TABLE ENTRY

            6A            56     D0  0328   704 	MOVL	R6,(R10)		;CCB ADDRESS OR GSD ADDRESS

         14 AA            59     B0  032B   705 	MOVW	R9,SEC$W_FLAGS(R10)	;SET FLAGS

                       0A A8     B5  032F   706 	TSTW	CCB$W_IOC(R8)		;IF ANY OUTSTANDING I/O ON CHANNEL

                          D7     12  0332   707 	BNEQ	60$			;THEN IT CANNOT BE USED

            52         04 A8     D0  0334   708 	MOVL	CCB$L_WIND(R8),R2	;WINDOW ADDRESS FROM CHANNEL

                          D1     13  0338   709 	BEQL	60$			;BRANCH IF NO FILE IS OPEN

            CE            52     E8  033A   710 	BLBS	R2,60$			;CAN'T USE CHAN IF ACCESS/DEACCESS PENDING

                          0B     19  033D   711 	BLSS	100$			;BRANCH IF WINDOW ADDRESS

            52            52     32  033F   712 	CVTWL	R2,R2			;FORM PROCESS SECTION INDEX

            A9            59     E8  0342   713 	BLBS	R9,10$			;BRANCH IF CREATING A GLOBAL SECTION

            52         0C A342   D0  0345   714 	MOVL	SEC$L_WINDOW(R3)[R2],R2	;FETCH WINDOW FROM PROCESS SECTION

         0C AA            52     D0  034A   715 100$:	MOVL	R2,SEC$L_WINDOW(R10)	;SET WINDOW ADDRESS IN SECTION TABLE

         0B A2            01     E0  034E   716 	BBS	#WCB$V_WRITE,WCB$B_ACCESS(R2),105$ ;BRANCH IF FILE ACCESSED FOR WRITE

                          0B         0352       

            59            03     E1  0353   717 	BBC	#SEC$V_WRT,R9,110$	;BRANCH IF NOT MAPPING FOR WRITE

                          0B         0356       

            59            01     E0  0357   718 	BBS	#SEC$V_CRF,R9,110$	;WRITE AND CRF IS OK FOR READ ONLY FILE

                          07         035A       

                          FFA2   31  035B   719 	BRW	20$			;CANNOT HAVE WRITE ACCESS

                                     035E   720 

                                     035E   721 	ASSUME	SEC$V_WRT LE 7

         14 AA            08     88  035E   722 105$:	BISB	#SEC$M_WRT,SEC$W_FLAGS(R10) ;NOTE SECTION WRITABLE

            50         18 A2     D0  0362   723 110$:	MOVL	WCB$L_FCB(R2),R0	;FCB ADDRESS FROM WINDOW

                          9D     13  0366   724 	BEQL	40$			;BRANCH IF NONE THERE

         14 A2            0B     E2  0368   725 	BBSS	#WCB$V_NOTRUNC,WCB$W_ACON(R2),115$ ;DISALLOW TRUNCATE ON THE FILE

                          03         036C       

                       46 A0     B6  036D   726 	INCW	FCB$W_TCNT(R0)		;COUNT TRUNCATE LOCKS

            50         40 A0     D0  0370   727 115$:	MOVL	FCB$L_EFBLK(R0),R0	;LAST VIRTUAL BLOCK THAT MAY BE MAPPED

         28 AC            01     C3  0374   728 120$:	SUBL3	#1,VBN(AP),R2		;DESIRED STARTING VBN - 1

                          52         0378       

                          02     18  0379   729 	BGEQ	130$			;IF WAS SPECIFIED AS 0

                          52     D4  037B   730 	CLRL	R2			;THEN MAKE IT VBN 1

            52            01     C1  037D   731 130$:	ADDL3	#1,R2,SEC$L_VBN(R10)	;SET STARTING VBN IN SECTION TABLE

                       10 AA         0380       

            57         24 AC     D0  0382   732 	MOVL	SECPAGCNT(AP),R7	;NO. OF PAGES IN SECTION

                                     0386   733 					;STARTING AT SPECIFIED VBN

                          03     14  0386   734 	BGTR	140$			;BRANCH IF NOT DEFAULTED TO "ENTIRE FILE"

            57            50     D0  0388   735 	MOVL	R0,R7			;USE ENTIRE FILE

            52            57     C1  038B   736 140$:	ADDL3	R7,R2,-(SP)		;FORM HIGHEST VBN TO BE MAPPED

                          7E         038E       

            8E            50     D1  038F   737 	CMPL	R0,(SP)+		;TRYING TO MAP BEYOND EOF?

                          06     14  0392   738 	BGTR	150$			;BRANCH IF NOT

            50            52     C3  0394   739 	SUBL3	R2,R0,R7		;FORM NEW PAGCNT = MAXVBN - (STARTVBN - 1)

                          57         0397       

                          60     15  0398   740 	BLEQ	290$			;BRANCH IF NOTHING TO MAP, EOF

         1C AA            57     D0  039A   741 150$:	MOVL	R7,SEC$L_PAGCNT(R10)	;SET SECTION SIZE

            13            59     E9  039E   742 	BLBC	R9,170$			;BRANCH IF PROCESS SECTION

                                     03A1   743 ;

                                     03A1   744 ; GLOBAL SECTION

                                     03A1   745 ;

            50         0C AA     D0  03A1   746 	MOVL	SEC$L_WINDOW(R10),R0	;WINDOW ADDRESS

         0B A0            03     E2  03A5   747 	BBSS	#WCB$V_SHRWCB,WCB$B_ACCESS(R0),160$ ;MAKE INTO SHARED WINDOW

                          05         03A9       

                                     03AA   748 					;BRANCH IF ALREADY A SHARED WINDOW

                                     03AA   749 

                           00000000  03AA   750 	.IF	EQ <WCB$L_PID+2-WCB$W_REFCNT> ;REFCNT=PID+2

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page  17

X0107           INITSECTBL - ALLOC & INIT SECTION TABLE ENTRY                                                                    (7)



            01            10     9C  03AA   751 	ROTL	#16,#1,WCB$L_PID(R0)	;REFCNT = 1, PID = 0

                       0C A0         03AD       

                                     03AF   752 	.IFF

                                     03AF   753 	MOVW	#1,WCB$W_REFCNT(R0)	;REFCNT = 1 FOR CHANNEL REFERENCE

                                     03AF   754 	.ENDC

                                     03AF   755 

                       0E A0     B6  03AF   756 160$:	INCW	WCB$W_REFCNT(R0)	;ANOTHER REFERENCE FOR SECTION ENTRY

                          0A     11  03B2   757 	BRB	180$

                                     03B4   758 ;

                                     03B4   759 ; PROCESS SECTION

                                     03B4   760 ;

            50         04 A8     D0  03B4   761 170$:	MOVL	CCB$L_WIND(R8),R0	;GET WINDOW OR SECTION FROM CHANNEL

                          09     14  03B8   762 	BGTR	190$			;BRANCH IF SECTION INDEX

         04 A8            51     3C  03BA   763 	MOVZWL	R1,CCB$L_WIND(R8)	;1ST PROCESS SECTION ON CHANNEL

                                     03BE   764 					;STORE SECTION INDEX IN CCB

            50            5A     D0  03BE   765 180$:	MOVL	R10,R0			;SECTION TABLE ENTRY ADDRESS

                          10     11  03C1   766 	BRB	200$			;INIT FORWARD AND BACKWARD SECTION INDICES

                                     03C3   767 ;

                                     03C3   768 ; SUBSEQUENT SECTION (NOT THE FIRST) ON THIS CHANNEL

                                     03C3   769 ;

            50            50     32  03C3   770 190$:	CVTWL	R0,R0			;INSERT AFTER THIS SECTION

         06 AA            50     B0  03C6   771 	MOVW	R0,SEC$W_SECXBL(R10)	;CURSEC(BL) = BAKSECX

            50            6340   DE  03CA   772 	MOVAL	(R3)[R0],R0		;ADR OF BAKWARD SECTION TABLE ENTRY

         04 AA         04 A0     B0  03CE   773 	MOVW	SEC$W_SECXFL(R0),SEC$W_SECXFL(R10) ;CURSEC(FL) = BAKSEC(FL)

         04 A0            51     B0  03D3   774 200$:	MOVW	R1,SEC$W_SECXFL(R0)	;BAKSEC(FL) = CURSECX

            50         04 AA     32  03D7   775 	CVTWL	SEC$W_SECXFL(R10),R0	;FORWARD SECTION INDEX (FORSECX)

            50            6340   DE  03DB   776 	MOVAL	(R3)[R0],R0		;FORWARD SECTION TABLE ENTRY ADDRESS

         06 A0            51     B0  03DF   777 	MOVW	R1,SEC$W_SECXBL(R0)	;FORSEC(BL) = CURSECX

         18 AA            01     D0  03E3   778 	MOVL	#1,SEC$L_REFCNT(R10)	;NO REFERENCES YET

            50         30 AC     98  03E7   779 	CVTBL	PFC(AP),R0		;GET PAGE FAULT CLUSTER

                          04     18  03EB   780 	BGEQ	210$			;BRANCH IF NOT TOO BIG

            50         7F 8F     9A  03ED   781 	MOVZBL	#127,R0			;IT WAS TOO BIG, SET TO MAX

                                     03F1   782 

                                     03F1   783 	ASSUME	SEC$B_PFC EQ SEC$L_VPXPFC+3

            50            18     78  03F1   784 210$:	ASHL	#24,R0,SEC$L_VPXPFC(R10) ;SET PFC, ZERO VIRTUAL PAGE INDEX

                       08 AA         03F4       

            50            01     3C  03F6   785 	MOVZWL	#SS$_NORMAL,R0		;SUCCESSFUL COMPLETION

                                 05  03F9   786 	RSB

                                     03FA   787 ;

                                     03FA   788 ; ATTEMPT TO CREATE A SECTION BEYOND END OF FILE

                                     03FA   789 ;

            7E       0870 8F     3C  03FA   790 290$:	MOVZWL	#SS$_ENDOFFILE,-(SP)	;SET RETURN STATUS

                          FF0E   31  03FF   791 	BRW	70$			;CLEAN UP AND EXIT

                                     0402   792 

                                     0402   793 	.DSABL	LSB

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page  18

X0107           MAP PROCESS SECTION                                                                                              (8)



                                     0402   795 	.SBTTL	MAP PROCESS SECTION

                                     0402   796 ;

                                     0402   797 ; CALLING SEQUENCE:

                                     0402   798 ;

                                     0402   799 ;	BRW	MAP_PROCESS_SECTION

                                     0402   800 ;

                                     0402   801 ; INPUTS:

                                     0402   802 ;

                                     0402   803 ;	R4 = PCB ADDRESS

                                     0402   804 ;	R8 = CHANNEL CONTROL BLOCK ADDRESS

                                     0402   805 ;	R9 = SECTION FLAGS

                                     0402   806 ;	0(SP) = STARTVA

                                     0402   807 ;	4(SP) = ENDVA

                                     0402   808 ;	8(SP) = SUCCESS CODE FOR MAP SECTION

                                     0402   809 ;

                                     0402   810 MAP_PROCESS_SEC:

                                     0402   811 	SETIPL	#IPL$_ASTDEL		;NO AST'S WHILE MANIPULATING HEADER

            55   00000000'9F     D0  0405   812 	MOVL	@#CTL$GL_PHD,R5		;PROCESS HEADER ADDRESS

                          FBF1'  30  040C   813 	BSBW	MMG$DALCSTXSCN		;SCAN FOR SECTIONS TO DEALLOCATE

            56            58     D0  040F   814 	MOVL	R8,R6			;CCB ADDRESS

                                     0412   815 

                                     0412   816 	ASSUME	<<SEC$M_DZRO ! SEC$M_CRF ! SEC$M_WRT>&^XFF00> EQ 0

            59            59     9A  0412   817 	MOVZBL	R9,R9			;ELIMINATE GLOBAL FLAGS BITS

                          FF01   30  0415   818 	BSBW	INITSECTBL		;ALLOCATE AND INIT A SECTION TABLE ENTRY

            5B            50     E9  0418   819 	BLBC	R0,90$			;BRANCH IF NONE AVAILABLE

                                     041B   820 ;

                                     041B   821 ; R1  = SECTION TABLE INDEX

                                     041B   822 ; R7  = SECTION PAGE COUNT

                                     041B   823 ; R10 = SECTION TABLE ENTRY ADDRESS

                                     041B   824 ;

                                     041B   825 

                                     041B   826 	ASSUME	SEC$V_WRT EQ SEC$V_DZRO+1

                                     041B   827 	ASSUME	SEC$V_DZRO EQ SEC$V_CRF+1

            03            01     EF  041B   828 	EXTZV	#SEC$V_CRF,#3,SEC$W_FLAGS(R10),R8 ;GET CRF, DZRO, WRT BITS

            58         14 AA         041E       

            58       0440 8F     A8  0421   829 	BISW	#<PTE$M_TYP1 ! PTE$M_TYP0>@-16,R8 ;OR IN TYPE BITS

            58            10     9C  0426   830 	ROTL	#16,R8,R8		;PUT IN HIGH 16 BITS

                          58         0429       

            58            51     B0  042A   831 	MOVW	R1,R8			;SET SECTION INDEX

                          FE91   30  042D   832 	BSBW	SETSECPROTOWN		;SET SECTION PROTECTION AND OWNER

            11            50     E9  0430   833 	BLBC	R0,20$			;BRANCH IF BAD PROTECTION CODE

            57            01     C3  0433   834 	SUBL3	#1,R7,R9		;SECTION PAGE COUNT BASE 0

                          59         0436       

                          0C     BA  0437   835 	POPR	#^M<R2,R3>		;R2=STARTVA, R3=ENDVA

            56       0477'CF     DE  0439   836 	MOVAL	W^MMG$MAPSECPAG,R6	;MAP SECTION PAGE ROUTINE

                          FBBF'  30  043E   837 	BSBW	MMG$CRECOM2		;CREATE THE PAGES

            03            50     E8  0441   838 	BLBS	R0,30$			;IF SUCCESSFUL, USE SUCCESS CODE AT 0(SP)

            6E            50     D0  0444   839 20$:	MOVL	R0,(SP)			;OTHERWISE SAVE ERROR CODE

         18 AA            01     C3  0447   840 30$:	SUBL3	#1,SEC$L_REFCNT(R10),SEC$L_PAGCNT(R10) ;SET ACTUAL PAGE COUNT

                       1C AA         044B       

                          1C     13  044D   841 	BEQL	80$			;BRANCH IF NO PAGES MAPPED

                                     044F   842 ;

                                     044F   843 ; AT LEAST ONE PAGE WAS MAPPED.

                                     044F   844 ; R1, R2 CONTAIN THE RETURN RANGE VALUES

                                     044F   845 ;

            03            51     E9  044F   846 	BLBC	R1,40$			;BRANCH IF R1 IS THE LOWEST ADDRESS

            51            52     D0  0452   847 	MOVL	R2,R1			;R2 WAS THE LOWEST

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page  19

X0107           MAP PROCESS SECTION                                                                                              (8)



            16            09     EE  0455   848 40$:	EXTV	#VA$V_VPN,#VA$S_VPN+1,R1,R0 ;GET VIRTUAL PAGE INDEX

            50            51         0458       

                          0B     18  045A   849 	BGEQ	50$			;BRANCH IF NOT P1 SPACE

   00000000'EF            07     9C  045C   850 	ROTL	#7,SGN$GL_PTPAGCNT,R1	;OFFSET IN LONG WORD FROM BEGIN OF PAGE TABLE

                          51         0463       

            50            51     C0  0464   851 	ADDL	R1,R0			;CORRECT P1 SPACE INDEX

         08 AA            50     C8  0467   852 50$:	BISL	R0,SEC$L_VPXPFC(R10)	;SET VIRTUAL PAGE INDEX, PRESERVE PFC

            51            58     32  046B   853 80$:	CVTWL	R8,R1			;SECTION TABLE INDEX

                 00000000'EF     16  046E   854 	JSB	MMG$DECSECREF		;COUNT ONE LESS SECTION REFERENCE

                          01     BA  0474   855 	POPR	#^M<R0>			;GET THE RETURN STATUS CODE

                                 04  0476   856 90$:	RET				;AND RETURN TO CALLER

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page  20

X0107           MAPSECPAG - MAP A SINGLE PROCESS/GLOBAL SECTION                                                                  (9)



                                     0477   858 	.SBTTL	MAPSECPAG - MAP A SINGLE PROCESS/GLOBAL SECTION PAGE

                                     0477   859 

                                     0477   860 ;++

                                     0477   861 ; FUNCTIONAL DESCRIPTION:

                                     0477   862 ;	MAPSECPAG MAPS A SINGLE PAGE OF A GLOBAL SECTION AT THE

                                     0477   863 ; SPECIFIED VITUAL ADDRESS.  AS IN CREPAG, THE PAGE TABLE IS EXTENDED

                                     0477   864 ; IF NECESSARY (WHICH COULD FAIL IF THE VIRTUAL ADDRESS SPACE IS FULL),

                                     0477   865 ; AND THE PAGE TABLE ENTRY IS DELETED IF NECESSARY AND THEN SET TO

                                     0477   866 ; SPECIFIED VALUE.

                                     0477   867 ;

                                     0477   868 ; CALLING SEQUENCE:

                                     0477   869 ;

                                     0477   870 ;	BSBW	MMG$MAPSECPAG

                                     0477   871 ;

                                     0477   872 ; INPUT PARAMETERS:

                                     0477   873 ;

                                     0477   874 ;	R0 = MODE FOR CREATING NEW PAGE

                                     0477   875 ;	R2 = VIRTUAL ADDRESS OF PAGE TO CREATE

                                     0477   876 ;	R4 = PCB ADDRESS

                                     0477   877 ;	R5 = PROCESS HEADER ADDRESS - P1 OR SYSTEM SPACE

                                     0477   878 ;	R6 = COUNT-1 OF PAGES TO BE MAPPED ACCORDING TO THE INPUT RANGE

                                     0477   879 ;	R7 = +^X200 IF MAPPING FORWARDS IN THE VIRTUAL ADDRESS SPACE

                                     0477   880 ;	   = -^X200 IF MAPPING BACKWARDS IN THE VIRTUAL ADDRESS SPACE

                                     0477   881 ;	R8 = NEW CONTENTS OF PAGE TABLE ENTRY

                                     0477   882 ;	R9 = COUNT-1 OF PAGES LEFT IN THE SECTION THAT COULD BE MAPPED

                                     0477   883 ;	R10 = GLOBAL SECTION TABLE ENTRY ADDRESS

                                     0477   884 ;

                                     0477   885 ;	THE CURRENT IPL MUST BE AT ASTDEL

                                     0477   886 ;

                                     0477   887 ; IMPLICIT INPUTS:

                                     0477   888 ;

                                     0477   889 ;	NONE

                                     0477   890 ;

                                     0477   891 ; OUTPUT PARAMETERS:

                                     0477   892 ;

                                     0477   893 ;	R0 = ERROR STATUS CODE

                                     0477   894 ;	R2 PRESERVED

                                     0477   895 ;

                                     0477   896 ; IMPLICIT OUTPUTS:

                                     0477   897 ;

                                     0477   898 ;	PTE CORRESPONDING TO SPECIFIED VIRTUAL ADDRESS IS DELETED AND

                                     0477   899 ;	THE DESIRED PTE IS STORED

                                     0477   900 ;

                                     0477   901 ;	IF PAGE TABLE EXPANSION IS NECESSARY THEN THE FOLLOWING 

                                     0477   902 ;	ARE AFFECTED:

                                     0477   903 ;

                                     0477   904 ;	PHD$L_FREP0VA OR PHD$L_FREP1VA	;1ST FREE PAGE AT END OF P0/P1 PAGE TABLE

                                     0477   905 ;	PHD$L_P0LRASTL OR PHD$L_P1LR	;LENGTH OF PT IN HARDWARE PCB

                                     0477   906 ;	PR$_P0LR OR PR$_P1LR		;LENGTH OF PT IN PROCESSOR REG

                                     0477   907 ;	PHD$L_FREPTECNT			;FREE PTE COUNTER

                                     0477   908 ;

                                     0477   909 ; COMPLETION CODES:

                                     0477   910 ;

                                     0477   911 ;	SS$_NORMAL			;SUCCESSFUL COMPLETION

                                     0477   912 ;	SS$_NOPRIV			;NO PRIVILEGE TO CREATE/DELETE PAGE

                                     0477   913 ;	SS$_VASFULL			;VIRTUAL ADDRESS SPACE FULL

                                     0477   914 ;

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page  21

X0107           MAPSECPAG - MAP A SINGLE PROCESS/GLOBAL SECTION                                                                  (9)



                                     0477   915 ; SIDE EFFECTS:

                                     0477   916 ;	NONE

                                     0477   917 ;

                                     0477   918 ;--

                                     0477   919 

                                     0477   920 ;

                                     0477   921 ; **********************************************************************

                                     0477   922 ;

                                     0477   923 ; **************** THE FOLLOWING CODE MAY BE PAGED *****************

                                     0477   924 ;

                                 00000477   925 	.PSECT	Y$EXEPAGED

                                     0477   926 ;

                                     0477   927 ; **********************************************************************

                                     0477   928 ;

                                     0477   929 MMG$MAPSECPAG:

            59            56     D1  0477   930 	CMPL	R6,R9			;MORE PAGES THAN IN THE SECTION?

                          03     15  047A   931 	BLEQ	10$			;BRANCH IF NOT

            56            59     D0  047C   932 	MOVL	R9,R6			;YES, USE SECTION SIZE

         00'AD         8F'AF     DE  047F   933 10$:	MOVAL	B^20$,B^CDL$L_PAGESUBR(FP) ;SKIP INIT CODE FOR SUBSEQUENT PAGES

                          59     D4  0484   934 	CLRL	R9			;ASSUME PROCESS SECTION

                                     0486   935 

                                     0486   936 	ASSUME	SEC$V_GBL EQ 0

            05         14 AA     E9  0486   937 	BLBC	SEC$W_FLAGS(R10),20$	;BRANCH IF PROCESS SECTION

            57         F7 8F     78  048A   938 	ASHL	#-9,R7,R9		;+1 OR -1 DEPENDING ON DIRECTION

                          59         048E       

                          FB6E'  30  048F   939 20$:	BSBW	MMG$CREPAG		;CREATE AND STORE THE PAGE TABLE ENTRY

            06            50     E9  0492   940 	BLBC	R0,30$			;BRANCH IF ERROR

                       18 AA     D6  0495   941 	INCL	SEC$L_REFCNT(R10)	;COUNT USES OF THIS GLOBAL SECTION

            58            59     C0  0498   942 	ADDL	R9,R8			;NEXT PTE

                                 05  049B   943 30$:	RSB

                                     049C   944 

                                     049C   945 

                                     049C   946 	.END

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page  22

SYMBOL TABLE                                                                                                                     (9)



ACMODE         = 0000000C            DYN$C_SSB      = 0000001D            GSD$B_TYPE       0000000A            

BADMATCHCTL      0000012A R     03   DYN$C_TQE      = 0000000F            GSD$C_LENGTH     00000028            

BIT...         = 0000000C            DYN$C_TYPAHD   = 00000014            GSD$K_LENGTH     00000028            

CCB$B_AMOD       00000009            DYN$C_UCB      = 00000010            GSD$L_GSDBL      00000004            

CCB$B_STS        00000008            DYN$C_VCB      = 00000011            GSD$L_GSDFL      00000000            

CCB$C_LENGTH     00000010            DYN$C_WCB      = 00000012            GSD$L_IDENT      00000014            

CCB$K_LENGTH     00000010            EXE$ALLOCATE     ********   X   03   GSD$L_UIC        0000000C            

CCB$L_DIRP       0000000C            EXE$ALOPAGED     ********   X   03   GSD$T_GSDNAM     00000018            

CCB$L_UCB        00000000            EXE$CHKRDACCES   ********   X   03   GSD$W_GRP        0000000E            

CCB$L_WIND       00000004            EXE$CHKWRTACCES  ********   X   03   GSD$W_GSTX       00000012            

CCB$W_IOC        0000000A            EXE$CRMPSC       00000022 RG    03   GSD$W_PROT       00000010            

CDL$C_LENGTH     ********   X   03   EXE$GL_GPT       ********   X   03   GSD$W_SIZE       00000008            

CDL$L_CALLEDIPL  ********   X   03   EXE$GL_GSDFREFL  ********   X   03   GSDFULL          00000123 R     03   

CDL$L_MAXACMODE  ********   X   03   EXE$GL_GSDGRPFL  ********   X   03   GSDNAM         = 00000014            

CDL$L_PAGESUBR   ********   X   03   EXE$GL_GSDMTX    ********   X   03   GSTFULL          000001A1 R     03   

CDL$V_CHGPAGFIL  ********   X   03   EXE$MGBLSC       000001BA RG    03   GSTFULL1         0000012F R     03   

CHAN           = 00000020            FCB$B_DIRIDX     00000048            IDENT          = 00000018            

CRMPSC_ACCVIO    0000000E R     03   FCB$B_FID_NMX    00000025            INADR          = 00000004            

CRMPSC_FOUND     00000012 R     03   FCB$B_FID_RVN    00000024            INITSECTBL       00000319 R     03   

CRMPSC_NOINADR   00000000 R     03   FCB$B_TYPE       0000000A            IOC$VERIFYCHAN   ********   X   03   

CRMPSC_NOPRIV    0000001C R     03   FCB$C_LENGTH     00000048            IPL$_ASTDEL    = 00000002            

CRMPSC_NOPRIV1   00000120 R     03   FCB$K_LENGTH     00000048            IPL$_HWCLK     = 00000018            

CRMPSC_PROCESS   0000000B R     03   FCB$L_EFBLK      00000040            IPL$_IOPOST    = 00000004            

CRMPSC_RET       00000011 R     03   FCB$L_EXFCB      0000000C            IPL$_MAILBOX   = 0000000B            

CTL$GL_PHD       ********   X   03   FCB$L_FCBBL      00000004            IPL$_POWER     = 0000001F            

DYN$C_ACB      = 00000002            FCB$L_FCBFL      00000000            IPL$_QUEUEAST  = 00000006            

DYN$C_ADP      = 00000001            FCB$L_FILEOWNER  00000038            IPL$_SCHED     = 00000003            

DYN$C_AQB      = 00000003            FCB$L_FILESIZE   00000034            IPL$_SYNCH     = 00000007            

DYN$C_BRDCST   = 0000001A            FCB$L_HDLBN      00000030            IPL$_TIMER     = 00000007            

DYN$C_BUFIO    = 00000013            FCB$L_STLBN      0000002C            MAPGBLSEC1       000001FA R     03   

DYN$C_CEB      = 00000004            FCB$L_STVBN      00000028            MAPGBLSEC2       00000221 R     03   

DYN$C_CRB      = 00000005            FCB$L_WLBL       00000014            MAP_PROCESS_SEC  00000402 R     03   

DYN$C_CXB      = 0000001B            FCB$L_WLFL       00000010            MGBLSC_NOPRIV    000001B7 R     03   

DYN$C_DDB      = 00000006            FCB$V_BADBLK   = 00000002            MMG$ALCSTX       ********   X   03   

DYN$C_DPT      = 0000001E            FCB$V_DIR      = 00000000            MMG$CRECOM2      ********   X   03   

DYN$C_FCB      = 00000007            FCB$V_EXCL     = 00000003            MMG$CREPAG       ********   X   03   

DYN$C_FRK      = 00000008            FCB$V_MARKDEL  = 00000001            MMG$DALCSTX      ********   X   03   

DYN$C_GSD      = 00000015            FCB$V_SPOOL    = 00000004            MMG$DALCSTXSCN   ********   X   03   

DYN$C_IDB      = 00000009            FCB$W_ACNT       00000018            MMG$DECSECREF    ********   X   03   

DYN$C_IRP      = 0000000A            FCB$W_AMOD       0000003E            MMG$DELGBLWCB    ********   X   03   

DYN$C_JPB      = 0000001F            FCB$W_DIRSEQ     00000044            MMG$GL_GPTBASE   ********   X   03   

DYN$C_KFH      = 00000026            FCB$W_FID        00000020            MMG$GL_SYSPHD    ********   X   03   

DYN$C_KFI      = 00000018            FCB$W_FID_NUM    00000020            MMG$GSDMTXULK    ********   X   03   

DYN$C_LOG      = 0000000B            FCB$W_FID_RVN    00000024            MMG$GSDSCN       ********   X   03   

DYN$C_MTL      = 00000019            FCB$W_FID_SEQ    00000022            MMG$INADRINI     ********   X   03   

DYN$C_MVL      = 00000016            FCB$W_FILEPROT   0000003C            MMG$INCPTREF     ********   X   03   

DYN$C_NDB      = 0000001C            FCB$W_LCNT       0000001A            MMG$MAPSECPAG    00000477 R     03   

DYN$C_NET      = 00000017            FCB$W_SEGN       00000026            MMG$RETADRINI    ********   X   03   

DYN$C_PBH      = 00000020            FCB$W_SIZE       00000008            MMG$VFYSECFLG    ********   X   03   

DYN$C_PCB      = 0000000C            FCB$W_STATUS     0000001E            PCB$B_ASTACT     0000000C            

DYN$C_PDB      = 00000021            FCB$W_TCNT       00000046            PCB$B_ASTEN      0000000D            

DYN$C_PFL      = 00000023            FCB$W_UICGROUP   0000003A            PCB$B_PRI        0000000B            

DYN$C_PIB      = 00000022            FCB$W_UICMEMBER  00000038            PCB$B_PRIB       00000033            

DYN$C_PQB      = 0000000D            FCB$W_WCNT       0000001C            PCB$B_TYPE       0000000A            

DYN$C_PTR      = 00000025            FLAGS          = 00000010            PCB$B_WEFC       00000032            

DYN$C_RVT      = 0000000E            GBL...         = 00000000            PCB$C_LENGTH     0000007C            

DYN$C_SFT      = 00000024            GPTFULL          0000018A R     03   PCB$K_LENGTH     0000007C            

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page  23

SYMBOL TABLE                                                                                                                     (9)



PCB$L_ASTQBL     00000014            PCB$W_PRCCNT     0000006A            PHD$Q_PRIVMSK    00000000            

PCB$L_ASTQFL     00000010            PCB$W_SIZE       00000008            PHD$S_ASTLVL   = 00000008            

PCB$L_EFC2P      00000058            PCB$W_STATE      00000030            PHD$S_P0LR     = 00000018            

PCB$L_EFC3P      0000005C            PCB$W_TMBU       00000036            PHD$V_ASTLVL   = 00000018            

PCB$L_EFCS       00000050            PCB$W_TQCNT      0000004A            PHD$V_DALCSTX  = 00000001            

PCB$L_EFCU       00000054            PFC            = 00000030            PHD$V_P0LR     = 00000000            

PCB$L_EFWM       0000004C            PHD$B_ASTLVL     000000CF            PHD$V_PFMFLG   = 00000000            

PCB$L_OWNER      0000001C            PHD$B_DFPFC      00000038            PHD$V_WSPEAKCHK= 00000002            

PCB$L_PHD        00000064            PHD$B_PAGFIL     0000001F            PHD$W_ASTLM      00000044            

PCB$L_PHYPCB     00000018            PHD$B_PGTBPFC    00000039            PHD$W_BAK        00000048            

PCB$L_PID        00000060            PHD$C_LENGTH     00000118            PHD$W_DFWSCNT    0000001A            

PCB$L_PQB        0000004C            PHD$C_PHDPAGCTX= 00000008            PHD$W_EMPTPG     000000D8            

PCB$L_SQBL       00000004            PHD$K_LENGTH     00000118            PHD$W_EXTDYNWS   00000076            

PCB$L_SQFL       00000000            PHD$L_BIOCNT     00000054            PHD$W_FILLM      00000060            

PCB$L_STS        00000028            PHD$L_CPULIM     00000058            PHD$W_FLAGS      0000003A            

PCB$L_UIC        00000020            PHD$L_CPUTIM     0000003C            PHD$W_PHVINDEX   00000046            

PCB$L_WSSWP      00000024            PHD$L_DIOCNT     00000050            PHD$W_PRCLM      00000042            

PCB$L_WTIME      0000002C            PHD$L_ESP        0000007C            PHD$W_PST        00000020            

PCB$T_LNAME      0000006C            PHD$L_FREP0VA    00000028            PHD$W_PSTBASMAX  0000004A            

PCB$V_ASTPEN   = 00000011            PHD$L_FREP1VA    00000030            PHD$W_PSTFREE    00000026            

PCB$V_BATCH    = 0000000E            PHD$L_FREPTECNT  0000002C            PHD$W_PSTLAST    00000024            

PCB$V_DELPEN   = 00000001            PHD$L_KSP        00000078            PHD$W_PTCNTACT   00000070            

PCB$V_FORCPEN  = 00000002            PHD$L_P0BR       000000C8            PHD$W_PTCNTLCK   0000006C            

PCB$V_HIBER    = 00000013            PHD$L_P0LRASTL   000000CC            PHD$W_PTCNTMAX   00000072            

PCB$V_INQUAN   = 00000003            PHD$L_P1BR       000000D0            PHD$W_PTCNTVAL   0000006E            

PCB$V_LOGIN    = 00000014            PHD$L_P1LR       000000D4            PHD$W_QUANT      00000040            

PCB$V_NETWRK   = 00000015            PHD$L_PAGEFLTS   0000004C            PHD$W_TQLM       00000062            

PCB$V_NOACNT   = 0000000F            PHD$L_PAGFIL     0000001C            PHD$W_WSAUTH     0000000A            

PCB$V_NODELET  = 00000017            PHD$L_PC         000000C0            PHD$W_WSDYN      0000000E            

PCB$V_PHDRES   = 00000012            PHD$L_PCB        00000078            PHD$W_WSFLUID    00000074            

PCB$V_PSWAPM   = 00000004            PHD$L_PGFLCNT    00000034            PHD$W_WSLAST     00000012            

PCB$V_PWRAST   = 00000016            PHD$L_PGFLQUOTA  0000005C            PHD$W_WSLIST     00000008            

PCB$V_RES      = 00000000            PHD$L_PSL        000000C4            PHD$W_WSLOCK     0000000C            

PCB$V_RESPEN   = 00000005            PHD$L_PSTBASOFF  00000020            PHD$W_WSLX       0000004A            

PCB$V_SSFEXC   = 00000006            PHD$L_PTWSLELCK  00000064            PHD$W_WSNEXT     00000010            

PCB$V_SSFEXCE  = 00000007            PHD$L_PTWSLEVAL  00000068            PHD$W_WSQUOTA    00000018            

PCB$V_SSFEXCS  = 00000008            PHD$L_R0         00000088            PR$_ACCR       = 00000029            

PCB$V_SSFEXCU  = 00000009            PHD$L_R1         0000008C            PR$_ACCS       = 00000028            

PCB$V_SSRWAIT  = 0000000A            PHD$L_R10        000000B0            PR$_ASTLVL     = 00000013            

PCB$V_SUSPEN   = 0000000B            PHD$L_R11        000000B4            PR$_ESP        = 00000001            

PCB$V_SWPVBN   = 00000010            PHD$L_R12        000000B8            PR$_ICCS       = 00000018            

PCB$V_WAKEPEN  = 0000000C            PHD$L_R13        000000BC            PR$_ICR        = 0000001A            

PCB$V_WALL     = 0000000D            PHD$L_R2         00000090            PR$_IPL        = 00000012            

PCB$W_APTCNT     00000034            PHD$L_R3         00000094            PR$_ISP        = 00000004            

PCB$W_ASTCNT     0000003C            PHD$L_R4         00000098            PR$_KSP        = 00000000            

PCB$W_BIOCNT     0000003E            PHD$L_R5         0000009C            PR$_MAPEN      = 00000038            

PCB$W_BIOLM      00000040            PHD$L_R6         000000A0            PR$_NICR       = 00000019            

PCB$W_BYTCNT     00000042            PHD$L_R7         000000A4            PR$_P0BR       = 00000008            

PCB$W_BYTLM      00000068            PHD$L_R8         000000A8            PR$_P0LR       = 00000009            

PCB$W_DIOCNT     00000044            PHD$L_R9         000000AC            PR$_P1BR       = 0000000A            

PCB$W_DIOLM      00000046            PHD$L_REFERFLT   00000014            PR$_P1LR       = 0000000B            

PCB$W_FILCNT     00000048            PHD$L_SSP        00000080            PR$_PCBB       = 00000010            

PCB$W_GPGCNT     00000038            PHD$L_USP        00000084            PR$_PME        = 0000003D            

PCB$W_GRP        00000022            PHD$L_WSL        00000118            PR$_RXCS       = 00000020            

PCB$W_MEM        00000020            PHD$M_DALCSTX  = 00000002            PR$_RXDB       = 00000021            

PCB$W_MTXCNT     0000000E            PHD$M_PFMFLG   = 00000001            PR$_SBIER      = 00000034            

PCB$W_PPGCNT     0000003A            PHD$M_WSPEAKCHK= 00000004            PR$_SBIFS      = 00000030            

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page  24

SYMBOL TABLE                                                                                                                     (9)



PR$_SBIMT      = 00000033            PRV$V_SETPRV   = 0000000E            RETADR         = 00000008            

PR$_SBIQC      = 00000036            PRV$V_SYSGBL   = 00000019            SCH$GL_CURPCB    ********   X   03   

PR$_SBIS       = 00000031            PRV$V_SYSNAM   = 00000002            SCH$LOCKR        ********   X   03   

PR$_SBISC      = 00000032            PRV$V_TMPMBX   = 0000000F            SCH$LOCKW        ********   X   03   

PR$_SBITA      = 00000035            PRV$V_VOLPRO   = 00000015            SEC$B_AMOD       00000015            

PR$_SBR        = 0000000C            PRV$V_WORLD    = 00000010            SEC$B_PFC        0000000B            

PR$_SCBB       = 00000011            PTE$C_EOWN     = 00800000            SEC$C_LENGTH     00000020            

PR$_SID        = 0000003E            PTE$C_ER       = 38000000            SEC$K_LENGTH     00000020            

PR$_SIRR       = 00000014            PTE$C_ERKW     = 30000000            SEC$K_MATALL   = 00000000            

PR$_SISR       = 00000015            PTE$C_EW       = 28000000            SEC$K_MATEQU   = 00000001            

PR$_SLR        = 0000000D            PTE$C_KOWN     = 00000000            SEC$K_MATLEQ   = 00000002            

PR$_SSP        = 00000002            PTE$C_KR       = 18000000            SEC$L_CCB        00000000            

PR$_TBIA       = 00000039            PTE$C_KW       = 10000000            SEC$L_GSD        00000000            

PR$_TBIS       = 0000003A            PTE$C_NA       = 00000000            SEC$L_PAGCNT     0000001C            

PR$_TODR       = 0000001B            PTE$C_SOWN     = 01000000            SEC$L_REFCNT     00000018            

PR$_TXCS       = 00000022            PTE$C_SR       = 58000000            SEC$L_VBN        00000010            

PR$_TXDB       = 00000023            PTE$C_SREW     = 48000000            SEC$L_VPXPFC     00000008            

PR$_USP        = 00000003            PTE$C_SRKW     = 50000000            SEC$L_WINDOW     0000000C            

PR$_WCSA       = 0000002C            PTE$C_SW       = 40000000            SEC$M_AMOD     = 00000300            

PR$_WCSD       = 0000002D            PTE$C_UOWN     = 01800000            SEC$M_CRF      = 00000002            

PROT           = 0000002C            PTE$C_UR       = 78000000            SEC$M_DZRO     = 00000004            

PRT$C_ER       = 00000007            PTE$C_UREW     = 68000000            SEC$M_GBL      = 00000001            

PRT$C_ERKW     = 00000006            PTE$C_URKW     = 70000000            SEC$M_PERM     = 00004000            

PRT$C_EW       = 00000005            PTE$C_URSW     = 60000000            SEC$M_SYSGBL   = 00008000            

PRT$C_KR       = 00000003            PTE$C_UW       = 20000000            SEC$M_WRT      = 00000008            

PRT$C_KW       = 00000002            PTE$M_CRF      = 00010000            SEC$S_AMOD     = 00000002            

PRT$C_NA       = 00000000            PTE$M_DZRO     = 00020000            SEC$S_CRF      = 00000001            

PRT$C_RESERVED = 00000001            PTE$M_GPTX     = 003FFFFF            SEC$S_DZRO     = 00000001            

PRT$C_SR       = 0000000B            PTE$M_MODIFY   = 04000000            SEC$S_GBL      = 00000001            

PRT$C_SREW     = 00000009            PTE$M_OWN      = 01800000            SEC$S_PERM     = 00000001            

PRT$C_SRKW     = 0000000A            PTE$M_PFN      = 001FFFFF            SEC$S_PFC      = 00000008            

PRT$C_SW       = 00000008            PTE$M_PGFLVB   = 003FFFFF            SEC$S_SYSGBL   = 00000001            

PRT$C_UR       = 0000000F            PTE$M_PROT     = 78000000            SEC$S_VPX      = 00000016            

PRT$C_UREW     = 0000000D            PTE$M_TYP0     = 00400000            SEC$S_WRT      = 00000001            

PRT$C_URKW     = 0000000E            PTE$M_TYP1     = 04000000            SEC$V_AMOD     = 00000008            

PRT$C_URSW     = 0000000C            PTE$M_VALID    = 80000000            SEC$V_CRF      = 00000001            

PRT$C_UW       = 00000004            PTE$M_WRT      = 00040000            SEC$V_DZRO     = 00000002            

PRV$V_ALLSPOOL = 00000004            PTE$S_GPTX     = 00000016            SEC$V_GBL      = 00000000            

PRV$V_BUGCHK   = 00000017            PTE$S_OWN      = 00000002            SEC$V_PERM     = 0000000E            

PRV$V_CMEXEC   = 00000001            PTE$S_PFN      = 00000015            SEC$V_PFC      = 00000018            

PRV$V_CMKRNL   = 00000000            PTE$S_PGFLVB   = 00000016            SEC$V_SYSGBL   = 0000000F            

PRV$V_DETACH   = 00000005            PTE$S_PROT     = 00000004            SEC$V_VPX      = 00000000            

PRV$V_DIAGNOSE = 00000006            PTE$S_STX      = 00000010            SEC$V_WRT      = 00000003            

PRV$V_EXQUOTA  = 00000013            PTE$V_CRF      = 00000010            SEC$W_FLAGS      00000014            

PRV$V_GROUP    = 00000008            PTE$V_DZRO     = 00000011            SEC$W_SECXBL     00000006            

PRV$V_GRPNAM   = 00000003            PTE$V_GPTX     = 00000000            SEC$W_SECXFL     00000004            

PRV$V_LOG_IO   = 00000007            PTE$V_MODIFY   = 0000001A            SECPAGCNT      = 00000024            

PRV$V_MOUNT    = 00000011            PTE$V_OWN      = 00000017            SETSECPROTOWN    000002C1 R     03   

PRV$V_NETMBX   = 00000014            PTE$V_PFN      = 00000000            SGN$GL_PTPAGCNT  ********   X   03   

PRV$V_NOACNT   = 00000009            PTE$V_PGFLVB   = 00000000            SS$_ABORT      = 0000002C            

PRV$V_OPER     = 00000012            PTE$V_PROT     = 0000001B            SS$_ACCONFLICT = 00000800            

PRV$V_PHY_IO   = 00000016            PTE$V_STX      = 00000000            SS$_ACCVIO     = 0000000C            

PRV$V_PRMCEB   = 0000000A            PTE$V_TYP0     = 00000016            SS$_ACPVAFUL   = 000002FC            

PRV$V_PRMGBL   = 00000018            PTE$V_TYP1     = 0000001A            SS$_ARTRES     = 00000474            

PRV$V_PRMMBX   = 0000000B            PTE$V_VALID    = 0000001F            SS$_ASTFLT     = 0000040C            

PRV$V_PSWAPM   = 0000000C            PTE$V_WRT      = 00000012            SS$_BADATTRIB  = 00000034            

PRV$V_SETPRI   = 0000000D            RELPAG         = 0000001C            SS$_BADCHKSUM  = 00000808            

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page  25

SYMBOL TABLE                                                                                                                     (9)



SS$_BADESCAPE  = 0000003C            SS$_FILELOCKED = 000008A8            SS$_NOAQB      = 00000314            

SS$_BADFILEHDR = 00000810            SS$_FILENUMCHK = 000008B0            SS$_NODATA     = 000001AC            

SS$_BADFILENAME= 00000818            SS$_FILESEQCHK = 000008B8            SS$_NOHANDLER  = 000008F8            

SS$_BADFILEVER = 00000820            SS$_FILESTRUCT = 000008C0            SS$_NOHOMEBLK  = 000008E0            

SS$_BADIMGHDR  = 00000044            SS$_FILNOTACC  = 000000AC            SS$_NOIOCHAN   = 000001B4            

SS$_BADIRECTORY= 00000828            SS$_FILNOTCNTG = 000002AC            SS$_NOLINKS    = 0000027C            

SS$_BADPARAM   = 00000014            SS$_FILNOTEXP  = 000000B4            SS$_NOLOGNAM   = 000001BC            

SS$_BADSTACK   = 000002B4            SS$_FLTDIV     = 00000494            SS$_NOMBX      = 00000274            

SS$_BEGOFFILE  = 00000938            SS$_FLTOVF     = 0000048C            SS$_NOMOREFILES= 00000930            

SS$_BLOCKCNTERR= 00000940            SS$_FLTUND     = 0000049C            SS$_NONEXDRV   = 000001C4            

SS$_BREAK      = 00000414            SS$_FORMAT     = 000000BC            SS$_NONEXPR    = 000008E8            

SS$_BUFBYTALI  = 0000030C            SS$_GPTFULL    = 000000C4            SS$_NONLOCAL   = 000008F0            

SS$_BUFFEROVF  = 00000601            SS$_GSDFULL    = 000000CC            SS$_NOPRIV     = 00000024            

SS$_BUGCHECK   = 000002A4            SS$_HANGUP     = 000002CC            SS$_NORMAL     = 00000001            

SS$_CANCEL     = 00000830            SS$_HEADERFULL = 000008C8            SS$_NOSIGNAL   = 00000900            

SS$_CHANINTLK  = 0000004C            SS$_IDXFILEFULL= 000008D0            SS$_NOSOLICIT  = 00000284            

SS$_CLIFRCEXT  = 00000980            SS$_ILLBLKNUM  = 000000DC            SS$_NOSUCHDEV  = 00000908            

SS$_CMODSUPR   = 0000041C            SS$_ILLCNTRFUNC= 000000E4            SS$_NOSUCHFILE = 00000910            

SS$_CMODUSER   = 00000424            SS$_ILLEFC     = 000000EC            SS$_NOSUCHNODE = 0000028C            

SS$_COMPAT     = 0000042C            SS$_ILLIOFUNC  = 000000F4            SS$_NOSUCHSEC  = 00000978            

SS$_CONTINUE   = 00000001            SS$_ILLLBLAST  = 00000968            SS$_NOTAPEOP   = 00000264            

SS$_CONTROLC   = 00000651            SS$_ILLPAGCNT  = 000000FC            SS$_NOTFILEDEV = 000001CC            

SS$_CONTROLO   = 00000609            SS$_ILLSEQOP   = 000002DC            SS$_NOTINTBLSZ = 000001D4            

SS$_CONTROLY   = 00000611            SS$_ILLSER     = 00000104            SS$_NOTLABELMT = 000001DC            

SS$_CREATED    = 00000619            SS$_ILLUSRLBLRD= 00000958            SS$_NOTMODIFIED= 00000659            

SS$_CTRLERR    = 00000054            SS$_ILLUSRLBLWT= 00000960            SS$_NOTNETDEV  = 000002EC            

SS$_DATACHECK  = 0000005C            SS$_INCVOLLABEL= 0000010C            SS$_NOTRAN     = 00000629            

SS$_DATAOVERUN = 00000838            SS$_INSFARG    = 00000114            SS$_NOTSQDEV   = 000001E4            

SS$_DEBUG      = 0000046C            SS$_INSFMEM    = 00000124            SS$_OPCCUS     = 00000434            

SS$_DECOVF     = 000004A4            SS$_INSFRAME   = 0000012C            SS$_OPCDEC     = 0000043C            

SS$_DEVACTIVE  = 000002C4            SS$_INSFWSL    = 0000011C            SS$_OPINCOMPL  = 000002D4            

SS$_DEVALLOC   = 00000840            SS$_INTDIV     = 00000484            SS$_PAGOWNVIO  = 000001EC            

SS$_DEVALRALLOC= 00000641            SS$_INTOVF     = 0000047C            SS$_PAGRDERR   = 00000444            

SS$_DEVASSIGN  = 00000848            SS$_IVADDR     = 00000134            SS$_PARITY     = 000001F4            

SS$_DEVFOREIGN = 00000064            SS$_IVCHAN     = 0000013C            SS$_PARTESCAPE = 000001FC            

SS$_DEVICEFULL = 00000850            SS$_IVCHNLSEC  = 0000026C            SS$_PFMBSY     = 00000204            

SS$_DEVMOUNT   = 0000006C            SS$_IVDEVNAM   = 00000144            SS$_PLHLDR     = 00000404            

SS$_DEVNOTALLOC= 00000858            SS$_IVGSDNAM   = 0000014C            SS$_PSTFULL    = 0000020C            

SS$_DEVNOTMBX  = 00000074            SS$_IVLOGNAM   = 00000154            SS$_RADRMOD    = 0000044C            

SS$_DEVNOTMOUNT= 0000007C            SS$_IVLOGTAB   = 0000015C            SS$_REJECT     = 00000294            

SS$_DEVOFFLINE = 00000084            SS$_IVPROTECT  = 000002F4            SS$_REMOTE     = 00000649            

SS$_DIRFULL    = 00000860            SS$_IVQUOTAL   = 00000164            SS$_RESIGNAL   = 00000918            

SS$_DRVERR     = 0000008C            SS$_IVSECFLG   = 0000016C            SS$_RESULTOVF  = 00000214            

SS$_DUPFILENAME= 00000868            SS$_IVSECIDCTL = 000002E4            SS$_ROPRAND    = 00000454            

SS$_DUPLNAM    = 00000094            SS$_IVSSRQ     = 00000174            SS$_SECTBLFUL  = 0000021C            

SS$_ENDOFFILE  = 00000870            SS$_IVSTSFLG   = 0000017C            SS$_SSFAIL     = 0000045C            

SS$_ENDOFTAPE  = 00000878            SS$_IVTIME     = 00000184            SS$_SUBRNG     = 000004AC            

SS$_ENDOFUSRLBL= 00000970            SS$_LCKPAGFUL  = 000000D4            SS$_SUPERSEDE  = 00000631            

SS$_EXQUOTA    = 0000001C            SS$_LENVIO     = 0000018C            SS$_TAPEPOSLOST= 00000224            

SS$_EXTIDXFILE = 00000880            SS$_LKWSETFUL  = 00000194            SS$_TBIT       = 00000464            

SS$_FCPREADERR = 00000888            SS$_MBFULL     = 000008D8            SS$_TIMEOUT    = 0000022C            

SS$_FCPREPSTN  = 00000988            SS$_MBTOOSML   = 0000019C            SS$_TOOMANYVER = 00000990            

SS$_FCPREWNDERR= 00000890            SS$_MCHECK     = 000002BC            SS$_TOOMUCHDATA= 0000029C            

SS$_FCPSPACERR = 00000898            SS$_MEDOFL     = 000001A4            SS$_UNASEFC    = 00000234            

SS$_FCPWRITERR = 000008A0            SS$_MSGNOTFND  = 00000621            SS$_UNSAFE     = 0000023C            

SS$_FILACCERR  = 0000009C            SS$_MTLBLLONG  = 00000304            SS$_UNWIND     = 00000920            

SS$_FILALRACC  = 000000A4            SS$_MUSTCLOSEFL= 00000948            SS$_UNWINDING  = 00000928            

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page  26

SYMBOL TABLE                                                                                                                     (9)



SS$_VASFULL    = 00000244            WCB$V_WRITEAC  = 00000008            

SS$_VECINUSE   = 0000024C            WCB$V_WRITECK  = 00000005            

SS$_VOLINV     = 00000254            WCB$W_ACON       00000014            

SS$_WAITUSRLBL = 00000950            WCB$W_COUNT      00000000            

SS$_WASCLR     = 00000001            WCB$W_NMAP       00000016            

SS$_WASECC     = 00000639            WCB$W_P1_COUNT   00000024            

SS$_WASSET     = 00000009            WCB$W_P2_COUNT   0000002A            

SS$_WRITLCK    = 0000025C            WCB$W_PREVCOUNT  FFFFFFFA            

SS$_WRONGACP   = 0000031C            WCB$W_REFCNT     0000000E            

ULKGSDMTXRET     000001A8 R     03   WCB$W_SIZE       00000008            

ULKGSDMTXRET1    0000001F R     03   

VA$M_BYTE      = 000001FF            

VA$M_P1        = 40000000            

VA$M_SYSTEM    = 80000000            

VA$M_VPG       = FFFFFE00            

VA$M_VPN       = 3FFFFE00            

VA$S_BYTE      = 00000009            

VA$S_VPG       = 00000017            

VA$S_VPN       = 00000015            

VA$V_BYTE      = 00000000            

VA$V_P1        = 0000001E            

VA$V_SYSTEM    = 0000001F            

VA$V_VPG       = 00000009            

VA$V_VPN       = 00000009            

VBN            = 00000028            

WCB$B_ACCESS     0000000B            

WCB$B_TYPE       0000000A            

WCB$C_LENGTH     00000024            

WCB$C_MAP        00000024            

WCB$K_LENGTH     00000024            

WCB$K_MAP        00000024            

WCB$L_FCB        00000018            

WCB$L_LBN        00000002            

WCB$L_ORGUCB     00000010            

WCB$L_P1_LBN     00000026            

WCB$L_P2_LBN     0000002C            

WCB$L_PID        0000000C            

WCB$L_PREVLBN    FFFFFFFC            

WCB$L_RVT        0000001C            

WCB$L_STVBN      00000020            

WCB$L_WLBL       00000004            

WCB$L_WLFL       00000000            

WCB$M_NOTFCP   = 00000004            

WCB$M_READ     = 00000001            

WCB$M_SHRWCB   = 00000008            

WCB$M_WRITE    = 00000002            

WCB$V_DLOCK    = 00000001            

WCB$V_NOREAD   = 0000000A            

WCB$V_NOTFCP   = 00000002            

WCB$V_NOTRUNC  = 0000000B            

WCB$V_NOWRITE  = 00000000            

WCB$V_READ     = 00000000            

WCB$V_READCK   = 00000009            

WCB$V_SEQONLY  = 00000006            

WCB$V_SHRWCB   = 00000003            

WCB$V_SPOOL    = 00000004            

WCB$V_WRITE    = 00000001            

SYSCRMPSC       - Create and Map Section System Service          21-AUG-1978 20:24:26   VAX-11 MACRO X0.3-11               Page  27

PROGRAM SECTION SYNOPSIS                                                                                                         (9)







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$            FFFFFFFC      02     NOPIC   USR   CON   ABS   LCL NOSHR   EXE   RD    WRT BYTE  

Y$EXEPAGED       0000049C      03     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  





THERE WERE NO ERRORS OR WARNINGS.

6708. BYTES LEFT IN FREE MEMORY POOL.

2016. BYTES OF RECLAIMED MEMORY.

OBJ$:SYSCRMPSC,LIS$:SYSCRMPSC/-SP=EXECML$/ML,SRC$:SYSCRMPSC

15 MLB DIR RDS - 1160 GETS TO DEFINE 29 MACROS. 91 INTER. FILE WRITES. 

