PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (1)    3200  HISTORY			; DETAILED

   (2)     100  DECLARATIONS

   (3)     100  IMGRESET - IMAGE RESET, DELETE IMAGE PAGES

   (4)     100  CHK_DBG_SYMTAB - ANY DEBUG SYMBOL TABLE TO DELE

   (5)     100  DECSECREF - DECREMENT SECTION TABLE REFERENCE C

   (6)     100  DALCSTXSCN - DEALLOCATE SECTION INDEX SCANNER

   (7)     100  DALCSTX - DEALLOCATE SECTION TABLE INDEX

   (8)     100  ALCSTX - ALOCATE SECTION TABLE INDEX

   (9)     100  ALCPHD - ALLOCATE PROCESS HEADER

   (11)    100  EXPANDPHD - EXPAND THE PROCESS HEADER

PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page   1

X0315                                                                                                                            (1)



                                     0000   100 	.TITLE	PHDUTL - PROCESS HEADER UTILITIES

                                     0000   200 	.IDENT	/X0315/

                                     0000   300 ;

                                     0000   400 ; COPYRIGHT (C) 1978

                                     0000   500 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754

                                     0000   600 ;

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

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

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

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

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

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

                                     0000  1300 ; REMAIN IN DEC.

                                     0000  1400 ;

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

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

                                     0000  1700 ; CORPORATION.

                                     0000  1800 ;

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

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

                                     0000  2100 

                                     0000  2200 ;++

                                     0000  2300 ; FACILITY:	EXECUTIVE, MEMORY MANAGEMENT UTILITIY ROUTINES

                                     0000  2400 ;

                                     0000  2500 ; ABSTRACT:

                                     0000  2600 ;

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

                                     0000  2800 ;	PROCESS HEADER LOCKED

                                     0000  2900 ;

                                     0000  3000 ;--

                                     0000  3100 ;

                                     0000  3200 	.SBTTL	HISTORY			; DETAILED

                                     0000  3300 ;

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

                                     0000  3500 ;

                                     0000  3600 ; MODIFIED BY:

                                     0000  3700 ;	, : VERSION

                                     0000  3800 ; 01	 -

PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page   2

X0315           DECLARATIONS                                                                                                     (2)



                                     0000   100 	.SBTTL	DECLARATIONS

                                     0000   200 

                                     0000   300 ;

                                     0000   400 ; INCLUDE FILES:

                                     0000   500 ;

                                     0000   600 	$CCBDEF				;CHANNEL CONTROL BLOCK DEFINITIONS

                                     0000  1000 	$IPLDEF				;PROCESSOR PRIORITY LEVELS

                                     0000  1200 	$PCBDEF				;PROCESS CONTROL BLOCK DEFINITIONS

                                     0000  1300 	$PHDDEF				;PROCESS HEADER DEFINITIONS

                                     0000  1400 	$PRDEF				;PROCESSOR REGISTER DEFINITIONS

                                     0000  1500 	$PRTDEF				;PROTECTION CODE DEFINITIONS

                                     0000  1600 	$PSLDEF				;PROCESSOR STATUS LONGWORD DEFINITIONS

                                     0000  1700 	$PTEDEF				;PAGE TABLE ENTRY DEFINITIONS

                                     0000  1800 	$SECDEF				;SECTION TABLE ENTRY DEFINITIONS

                                     0000  1900 	$SSDEF				;SYSTEM STATUS DEFINITIONS

                                     0000  2000 	$VADEF				;VIRTUAL ADDRESS VIELD DEFINITIONS

                                     0000  2050 	$WCBDEF				;WINDOW CONTROL BLOCK DEFINITIONS

                                     0000  2100 	$WSLDEF				;WORKING SET LIST DEFINITIONS

                                     0000  2700 ;

                                     0000  2800 ; EXTERNAL SYMBOLS:

                                     0000  2900 ;

                                     0000  3000 

                                     0000  3100 ;

                                     0000  3200 ; MACROS:

                                     0000  3300 ;

                                     0000  6100 ;

                                     0000  6200 ; EQUATED SYMBOLS:

                                     0000  6300 ;

                                     0000 11200 ;

                                     0000 11300 ; OWN STORAGE:

                                     0000 11400 ;

PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page   3

X0315           IMGRESET - IMAGE RESET, DELETE IMAGE PAGES                                                                       (3)



                                     0000   100 	.SBTTL	IMGRESET - IMAGE RESET, DELETE IMAGE PAGES

                                     0000   200 

                                     0000   300 ;++

                                     0000   400 ; FUNCTIONAL DESCRIPTION:

                                     0000   500 ;

                                     0000   600 ;

                                     0000   700 ; CALLING SEQUENCE:

                                     0000   800 ;

                                     0000   900 ;	BSBW	MMG$IMGRESET

                                     0000  1000 ;		MUST BE CALLED FROM KERNEL MODE AT IPL = 0

                                     0000  1100 ;

                                     0000  1200 ;

                                     0000  1300 ; INPUT PARAMETERS:

                                     0000  1400 ;

                                     0000  1410 ;	R4 = PROCESS CONTROL BLOCK ADDRESS

                                     0000  1500 ;

                                     0000  1600 ; IMPLICIT INPUTS:

                                     0000  1700 ;	NONE

                                     0000  1800 ;

                                     0000  1900 ; OUTPUT PARAMETERS:

                                     0000  2000 ;

                                     0000  2100 ;	DELETES ALL PAGES IN P0 SPACE

                                     0000  2200 ;	DELETES ALL PAGES IN P1 SPACE EXCEPT THE FIXED PORTION

                                     0000  2300 ;	RESETS THE PROCESS SECTION TABLE

                                     0000  2400 ;	RESETS THE WORKING SET SIZE TO THE DEFAULT

                                     0000  2500 ;

                                     0000  2600 ;	R0 = ERROR STATUS CODE

                                     0000  2700 ;

                                     0000  2800 ; IMPLICIT OUTPUTS:

                                     0000  2900 ;	NONE

                                     0000  3000 ;

                                     0000  3100 ; COMPLETION CODES:

                                     0000  3200 ;	NONE

                                     0000  3300 ;

                                     0000  3400 ; SIDE EFFECTS:

                                     0000  3500 ;	NONE

                                     0000  3600 ;

                                     0000  3700 ;--

                                     0000  3800 

                                     0000  3801 ;

                                     0000  3802 ; **********************************************************************

                                     0000  3803 ;

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

                                     0000  3805 ;

                                 00000000  3806 	.PSECT	Y$EXEPAGED

                                     0000  3807 ;

                                     0000  3808 ; **********************************************************************

                                     0000  3809 ;

                                     0000  3900 MMG$IMGRESET::

                          55     DD  0000  4000 	PUSHL	R5			;PRESERVE R5

            55   00000000'GF     D0  0002  4100 	MOVL	G^CTL$GL_PHD,R5		;R5=PHD ADDRESS

                          FFF4'  30  0009  4150 	BSBW	IAC$CLRIACLOCK		;CLEAR IMAGE ACTIVATOR INTERLOCK

                          FFF1'  30  000C  4200 	BSBW	RM$RESET		;RESET RMS CONTEXT

                          FFEE'  30  000F  4300 	BSBW	MMG$WSPEAKCHK		;ENABLE OR DISABLE WORKING SET PEAK CHECK

                                     0012  4800 ;

                                     0012  4900 ; DELETE P0 SPACE

                                     0012  5000 ;

PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page   4

X0315           IMGRESET - IMAGE RESET, DELETE IMAGE PAGES                                                                       (3)



                          7E     7C  0012  5100 10$:	CLRQ	-(SP)			;2 LONG WORDS FOR RANGE TO DELETE

            52            5E     D0  0014  5200 	MOVL	SP,R2			;ADDRESSED BY R2

            62   3FFFFFFF 8F     D0  0017  5300 	MOVL	#<<1@30>-1>,(R2)	;STARTVA = TOP OF P0 SPACE

                                     001E  5400 					;ENDVA = 0

                       28 A5     D5  001E  5500 	TSTL	PHD$L_FREP0VA(R5)	;IF NOTHING TO DELETE

                          10     13  0021  5600 	BEQL	25$			;DON'T CALL THE SERVICE

                                     0023  5700 	$DELTVA_S INADR=(R2),ACMODE=#PSL$C_KERNEL ;DELETE P0 SPACE

            66            50     E9  0030  5800 	BLBC	R0,40$			;BRANCH IF ERROR

                                     0033  5900 ;

                                     0033  6000 ; DELETE P1 SPACE

                                     0033  6100 ;

                                     0033  6200 25$:

                          62     D6  0033  6300 	INCL	(R2)			;STARTVA = LOWEST P1 SPACE ADR

   00000000'EF   00000200 8F     C3  0035  6400 	SUBL3	#512,MMG$GL_CTLBASVA,4(R2)

                       04 A2         0040       

                                     0042  6500 					;ENDVA = HIGHEST P1 SPACE ADR

                                     0042  6600 					;BELOW THE FIXED REGION

         04 A2         30 A5     D1  0042  6700 	CMPL	PHD$L_FREP1VA(R5),4(R2)	;IF P1 SPACE IS EMPTY

                          37     18  0047  6800 	BGEQ	30$			;SKIP THE DELETE SERVICE

                                     0049  6900 	$DELTVA_S INADR=(R2),ACMODE=#PSL$C_KERNEL ;DELETE P1 SPACE

            40            50     E9  0056  7000 	BLBC	R0,40$			;BRANCH IF ERROR

                 00000000'EF     16  0059  7010 	JSB	CHK_DBG_SYMTAB		;SEE IF ANY SYMBOL TABLE TO DELETE

                          50     D5  005F  7020 	TSTL	R0			;IF ZERO, NONE TO DELETE

                          1D     13  0061  7030 	BEQL	30$			;BRANCH IF NONE

         04 A2   7FFFFFFF 8F     D0  0063  7050 	MOVL	#^X7FFFFFFF,4(R2)	;DELETE DEBUGGER SYMBOL TABLE

         02 A2         06 A2     B0  006B  7060 	MOVW	6(R2),2(R2)		;TOP 65K BYTES OF P1 SPACE

                                     0070  7070 	$DELTVA_S INADR=(R2),ACMODE=#PSL$C_KERNEL ;DELETE DEBUG SYMBOL TABLE

            19            50     E9  007D  7080 	BLBC	R0,40$			;BRANCH IF ERROR

            50            01     3C  0080  7100 30$:	MOVZWL	#SS$_NORMAL,R0		;SUCCESSFUL EXIT

         1A A5         12 A5     A3  0083  7200 	SUBW3	PHD$W_WSLAST(R5),PHD$W_DFWSCNT(R5),R1 ;NO. OF PAGES

                          51         0088       

            51            51     32  0089  7250 	CVTWL	R1,R1			;TO CHANGE WORKING SET SIZE BY

                          0B     13  008C  7300 	BEQL	40$			;BRANCH IF NO

                                     008E  7400 35$:	$ADJWSL_S R1			;ADJUST THE WORKING SET LIMIT

            51         76 A5     32  0099  7420 40$:	CVTWL	PHD$W_EXTDYNWS(R5),R1	;ENOUGH EXTRA DYNAMIC WORKING SET

                                     009D  7440 					;TO RUN A REASONABLE IMAGE?

            02            51     C3  009D  7460 	SUBL3	R1,#2,R1		;MAKE SURE WE CAN HAVE AT LEAST 2

                          51         00A0       

                                     00A1  7470 					;MORE PAGE TABLES THEN CURRENTLY HAVE

                          0D     15  00A1  7475 	BLEQ	50$			;BRANCH IF GOT ENOUGH

                                     00A3  7480 ;

                                     00A3  7485 ; R1 IS THE NUMBER OF ADDITIONAL WORKING SET ENTRIES NEEDED

                                     00A3  7490 ;

         18 A5         12 A5     B1  00A3  7495 	CMPW	PHD$W_WSLAST(R5),PHD$W_WSQUOTA(R5) ;IF WE ARE AT QUOTA

                          E4     1F  00A8  7500 	BLSSU	35$

         18 A5            51     A0  00AA  7505 	ADDW	R1,PHD$W_WSQUOTA(R5)	;THEN QUOTA IS ARTIFICIALLY LOW, RAISE IT

                          DE     11  00AE  7510 	BRB	35$			;AND ADD MORE PAGES TO WORKING SET

                                     00B0  7540 

                                     00B0  7550 	ASSUME	PHD$W_PSTFREE EQ PHD$W_PSTLAST+2

                       24 A5     D4  00B0  7560 50$:	CLRL	PHD$W_PSTLAST(R5)	;NO PST ALLOCATED

                                     00B3  7570 					;EMPTY PST FREE LIST

            65   00000000'GF     7D  00B3  7590 	MOVQ	G^CTL$GQ_PROCPRIV,(R5)	;SET DEFAULT PRIVILEGES

                                     00BA  7600 ;

                                     00BA  7620 ; SEE IF ANY GLOBAL SECTIONS TO BE DELETED AS A RESULT OF RELEASING THE

                                     00BA  7640 ; PROCESS' ADDRESS SPACE

                                     00BA  7660 ;

            55   00000000'FF     DE  00BA  7700 	MOVAL	@MMG$GL_SYSPHD,R5	;SYSTEM PROCESS HEADER ADDRESS

PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page   5

X0315           IMGRESET - IMAGE RESET, DELETE IMAGE PAGES                                                                       (3)



         3A A5            01     E1  00C1  7750 	BBC	#PHD$V_DALCSTX,PHD$W_FLAGS(R5),60$ ;BRANCH IF NO GBL SECS TO DELETE?

                          15         00C5       

            50   00000000'EF     DE  00C6  7800 	MOVAL	EXE$GL_GSDMTX,R0	;ADDRESS OF GLOBAL SECTION MUTEX

                          FF30'  30  00CD  7850 	BSBW	SCH$LOCKW		;LOCK THE MUTEX FOR WRITING

                                     00D0  7900 ;

                                     00D0  7950 ; RETURNS AT IPL = ASTDEL MITH MUTEX LOCKED FOR WRITING

                                     00D0  8000 ;

                          0C     10  00D0  8050 	BSBB	MMG$DALCSTXSCN		;SCAN AND DELETE GLOBAL SECTIONS

                          FF2B'  30  00D2  8100 	BSBW	MMG$GSDMTXULK		;RELEASE THE GLOBAL SECTION MUTEX

                                     00D5  8150 					;STAYS AT IPL = ASTDEL

                          FF28'  30  00D5  8200 	BSBW	MMG$DELGBLWCB		;DELETE ANY WINDOWS RELEASED

                                     00D8  8300 	SETIPL	#0			;DROP BACK TO CALLED IPL

                          2C     BA  00DB  8400 60$:	POPR	#^M<R2,R3,R5>		;CLEAN OFF 8 BYTES INTO R2, R3

                                     00DD  8500 					;AND RESTORE R5

                                 05  00DD  8600 	RSB

PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page   6

X0315           CHK_DBG_SYMTAB - ANY DEBUG SYMBOL TABLE TO DELE                                                                  (4)



                                     00DE   100 	.SBTTL	CHK_DBG_SYMTAB - ANY DEBUG SYMBOL TABLE TO DELETE?

                                     00DE   200 ;

                                     00DE   300 ; INPUTS:

                                     00DE   400 ;

                                     00DE   500 ;	R5 = PROCESS HEADER ADDRESS (P1 SPACE IS OK)

                                     00DE   600 ;

                                     00DE   700 ; OUTPUTS:

                                     00DE   800 ;

                                     00DE   900 ;	R0 = 0 IF DEBUG SYMBOL TABLE PAGE TABLE IS ALREADY EMPTY

                                     00DE  1000 ;	   = NON ZERO IF DEBUG SYMBOL TABLE PAGE TABLE NEEDS TO BE DELETED

                                     00DE  1100 ;	R1,R2,R3 PRESERVED

                                     00DE  1200 ;

                                     00DE  1300 ; **********************************************************************

                                     00DE  1400 ;

                                     00DE  1500 ; **************** THE FOLLOWING CODE MUST BE RESIDENT *****************

                                     00DE  1600 ;

                                 00000000  1700 	.PSECT	$MMGCOD

                                     0000  1800 ;

                                     0000  1900 ; **********************************************************************

                                     0000  2000 ;

                                     0000  2100 CHK_DBG_SYMTAB:

                                     0000  2200 	DSBINT	#IPL$_SYNCH		;NO SWAPPING WHILE LOOKING AT SPT

                          09     EF  0006  2300 	EXTZV	#VA$V_VPN,#VA$S_VPN,-	;SPT INDEX FOR FIRST

       00C8 C5            15         0008  2400 		PHD$L_P0BR(R5),R0	;PAGE TABLE PAGE

                          50         000C       

            50       0000'CF     C0  000D  2500 	ADDL	W^SGN$GL_PTPAGCNT,R0	; 

                          50     D7  0012  2550 	DECL	R0			;INDEX TO LAST PAGE TABLE

                                 CB  0014  2600 	BICL3	#^C<PTE$M_VALID !-	;GET VALID BIT

                                     0015  2700 		PTE$M_TYP1 ! PTE$M_TYP0 !- ;PAGE TYPE BITS

                                     0015  2800 		PTE$M_PGFLVB>,-		;AND BACKING STORE ADR OR PFN

       0000'DF40 7B800000 8F         0015  2900 		@W^MMG$GL_SPTBASE[R0],R0

                          50         001E       

                                     001F  2950 					;FROM SPT ENTRY OF LAST PAGE TABLE

                                     001F  3000 ;

                                     001F  3100 ; WILL BE ZERO IF THE PAGE TABLE IS DEMAND ZERO

                                     001F  3200 ;

                                     001F  3300 	ENBINT				;RESTORE SAVED IPL

                                 05  0022  3400 	RSB				;AND RETURN

PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page   7

X0315           DECSECREF - DECREMENT SECTION TABLE REFERENCE C                                                                  (5)



                                     0023   100 	.SBTTL	DECSECREF - DECREMENT SECTION TABLE REFERENCE COUNT

                                     0023   200 ;++

                                     0023   300 ; FUNCTIONAL DESCRIPTION:

                                     0023   400 ;

                                     0023   410 ;	THIS ROUTINE DECREMENTS THE REFERENCE COUNT ON THE SECTION TABLE

                                     0023   420 ; SPECIFIED.  IF THE REFERENCE COUNT GOES TO ZERO AND THE SECTION IS NOT

                                     0023   430 ; PERMANENT, THEN THE SECTION DELETION LOGIC IS TRIGGERED.

                                     0023   500 ;

                                     0023   600 ; CALLING SEQUENCE:

                                     0023   700 ;

                                     0023   800 ;	BSBW	MMG$DECSECREF

                                     0023   850 ;	BSBW	MMG$SUBSECREF		;SUBTRACT R0 FROM SECTION REFERENCE COUNT

                                     0023   900 ;

                                     0023  1000 ; INPUT PARAMETERS:

                                     0023  1100 ;

                                     0023  1150 ;	R0 = NUMBER OF REFERENCES TO SUBTRACT IF ENTERED AT SUBSECREF

                                     0023  1200 ;	R1 = SECTION TABLE INDEX

                                     0023  1250 ;	R5 = PROCESS HEADER ADDRESS

                                     0023  1300 ;

                                     0023  1400 ; IMPLICIT INPUTS:

                                     0023  1500 ;

                                     0023  1600 ;	NONE

                                     0023  1700 ;

                                     0023  1800 ; OUTPUT PARAMETERS:

                                     0023  1900 ;

                                     0023  2000 ;	R0,R3 PRESERVED

                                     0023  2100 ;

                                     0023  2200 ; IMPLICIT OUTPUTS:

                                     0023  2300 ;

                                     0023  2400 ;	NONE

                                     0023  2500 ;

                                     0023  2600 ; COMPLETION CODES:

                                     0023  2700 ;

                                     0023  2800 ;	NONE

                                     0023  2900 ;

                                     0023  3000 ; SIDE EFFECTS:

                                     0023  3100 ;

                                     0023  3200 ;	NONE

                                     0023  3300 ;

                                     0023  3400 ;--

                                     0023  3401 ;

                                     0023  3402 ; **********************************************************************

                                     0023  3403 ;

                                     0023  3404 ; **************** THE FOLLOWING CODE MUST BE RESIDENT *****************

                                     0023  3405 ;

                                 00000023  3406 	.PSECT	$MMGCOD

                                     0023  3407 ;

                                     0023  3408 ; **********************************************************************

                                     0023  3409 ;

                                     0023  3420 	.ENABL	LSB

                                     0023  3425 MMG$SUBSECREF::

            55         20 A5     C1  0023  3430 	ADDL3	PHD$L_PSTBASOFF(R5),R5,R2 ;BASE ADDRESS OF SECTION TABLE

                          52         0027       

         18 A241          50     C2  0028  3435 	SUBL	R0,SEC$L_REFCNT(R2)[R1]	;REDUCE THE REFERENCE COUNT

                          0C     15  002D  3440 	BLEQ	10$			;BRANCH IF NO MORE REFERENCES

                                 05  002F  3445 	RSB

                                     0030  3450 

PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page   8

X0315           DECSECREF - DECREMENT SECTION TABLE REFERENCE C                                                                  (5)



                                     0030  3500 MMG$DECSECREF::

            55         20 A5     C1  0030  3510 	ADDL3	PHD$L_PSTBASOFF(R5),R5,R2 ;BASE ADDRESS OF SECTION TABLE

                          52         0034       

                       18 A241   D7  0035  3600 	DECL	SEC$L_REFCNT(R2)[R1]	;COUNT ONE LESS SECTION REFERENCE

                          0F     14  0039  3700 	BGTR	20$			;BRANCH IF SECTION IS STILL IN USE

                          0E     19  003B  3900 10$:	BLSS	40$			;BRANCH IF COUNT WENT NEGATIVE

         14 A241          11     9C  003D  4000 	ROTL	#<31-SEC$V_PERM>,SEC$W_FLAGS(R2)[R1],R2 ;PERMANENT BIT TO SIGN BIT

                          52         0042       

                          05     19  0043  4050 	BLSS	20$			;BRANCH IF SECTION PERMANENT

         3A A5            01     E6  0045  4100 	BBSSI	#PHD$V_DALCSTX,PHD$W_FLAGS(R5),20$ ;NOTE SECTION TO BE DEALLOCATED

                          00         0049       

                                 05  004A  4150 20$:	RSB

                                     004B  4300 40$:	BUG_CHECK SECREFNEG,FATAL	;SECTION REFERENCE COUNT WENT NEGATIVE

                                     004F  4400 

                                     004F  4500 	.DSABL	LSB

PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page   9

X0315           DALCSTXSCN - DEALLOCATE SECTION INDEX SCANNER                                                                    (6)



                                     004F   100 	.SBTTL	DALCSTXSCN - DEALLOCATE SECTION INDEX SCANNER

                                     004F   200 ;++

                                     004F   300 ; FUNCTIONAL DESCRIPTION:

                                     004F   400 ;

                                     004F   500 ;	THIS ROUTINE SCANS THE SECTION TABLE LOOKING FOR SECTIONS WITH

                                     004F   600 ; ZERO REFERENCE COUNTS TO BE DEALLOCATED.  EACH SECTION FOUND IS UNCHAINED

                                     004F   700 ; FROM ITS SECTION CHAIN, THE WINDOW IS RESTORED TO ITS CHANNEL IF THIS

                                     004F   800 ; IS THE LAST SECTION IN THE CHAIN, AND FINALLY THE SECTION IS DEALLOCATED.

                                     004F   900 ;

                                     004F  1000 ; CALLING SEQUENCE:

                                     004F  1100 ;

                                     004F  1200 ;	BSBW	MMG$DALCSTXSCN

                                     004F  1300 ;

                                     004F  1400 ; INPUT PARAMETERS:

                                     004F  1500 ;

                                     004F  1600 ;	R5 = PROCESS HEADER ADDRESS (P1 SPACE)

                                     004F  1700 ;	IPL = ASTDEL

                                     004F  1710 ;	GSD MUTEX LOCKED IF THIS IS THE SYSTEM PROCESS HEADER.  ONLY SECTIONS

                                     004F  1720 ;		THAT EXIST IN SYSTEM PROCESS HEADER ARE GLOBAL SECTIONS.

                                     004F  1730 ;		ALLOWABLE EXCEPTIONS MUST NEVER HAVE REFCNT=0.

                                     004F  1800 ;

                                     004F  1900 ; IMPLICIT INPUTS:

                                     004F  2000 ;

                                     004F  2100 ;	NONE

                                     004F  2200 ;

                                     004F  2300 ; OUTPUT PARAMETERS:

                                     004F  2400 ;

                                     004F  2500 ;	NONE

                                     004F  2600 ;

                                     004F  2700 ; IMPLICIT OUTPUTS:

                                     004F  2800 ;

                                     004F  2900 ;	NONE

                                     004F  3000 ;

                                     004F  3100 ; COMPLETION CODES:

                                     004F  3200 ;

                                     004F  3300 ;	NONE

                                     004F  3400 ;

                                     004F  3500 ; SIDE EFFECTS:

                                     004F  3600 ;

                                     004F  3700 ;	NONE

                                     004F  3800 ;

                                     004F  3900 ;--

                                     004F  4000 

                                     004F  4100 ;

                                     004F  4200 ; **********************************************************************

                                     004F  4300 ;

                                     004F  4400 ; **************** THE FOLLOWING CODE MAY BE PAGED *****************

                                     004F  4500 ;

                                 000000DE  4600 	.PSECT	Y$EXEPAGED

                                     00DE  4700 ;

                                     00DE  4800 ; **********************************************************************

                                     00DE  4900 ;

                                     00DE  5400 MMG$DALCSTXSCN::

         3A A5            01     E7  00DE  5500 	BBCCI	#PHD$V_DALCSTX,PHD$W_FLAGS(R5),40$ ;BRANCH IF NOTHING TO SCAN FOR

                          14         00E2       

            55         20 A5     C1  00E3  5600 	ADDL3	PHD$L_PSTBASOFF(R5),R5,R3 ;BASE OF SECTION TABLE

                          53         00E7       

PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page  10

X0315           DALCSTXSCN - DEALLOCATE SECTION INDEX SCANNER                                                                    (6)



            51         24 A5     32  00E8  5700 	CVTWL	PHD$W_PSTLAST(R5),R1	;INDEX TO LAST SECTION ALLOCATED

                       18 A341   D5  00EC  5800 20$:	TSTL	SEC$L_REFCNT(R3)[R1]	;DEALLOCATE THIS SECTION?

                          06     13  00F0  5900 	BEQL	50$			;BRANCH IF NEED TO DEALLOCATE

            51            08     C0  00F2  7400 30$:	ADDL	#SEC$C_LENGTH@-2,R1	;NEXT SECTION INDEX

                          F5     19  00F5  7500 	BLSS	20$			;BRANCH IF NOT AT END OF TABLE

                                 05  00F7  7700 40$:	RSB

                                     00F8  8000 ;

                                     00F8  8020 ; IF THIS IS NOT A PERMANENT SECTION, THEN NEED TO DEALLOCATE IT

                                     00F8  8040 ;

         14 A341          11     9C  00F8  8060 50$:	ROTL	#<32-<SEC$V_PERM+1>>,SEC$W_FLAGS(R3)[R1],R2 ;PERMANENT BIT TO SIGN BIT

                          52         00FD       

                          F2     19  00FE  8080 	BLSS	30$			;BRANCH IF PERMANENT SECTION

                          02     10  0100  8100 	BSBB	60$			;DO THE DEALLOCATE

                          EE     11  0102  8120 	BRB	30$			;AND CONTINUE THE SCAN

                                     0104  8140 ;

                                     0104  8160 ; NEED TO DEALLOCATE PROCESS OR GLOBAL SECTION, RSB FROM HERE WHEN DONE

                                     0104  8180 ; MUST PRESERVE R1 AND R3

                                     0104  8200 ;

            52            11     E0  0104  8220 60$:	BBS	#<SEC$V_GBL+<32-<SEC$V_PERM+1>>>,R2,200$ ;BRANCH IF GLOBAL SECTION

                          40         0107       

                          51     DD  0108 10000 	PUSHL	R1			;SAVE SECTION INDEX

            52            6341   D0  010A 10100 	MOVL	SEC$L_CCB(R3)[R1],R2	;CHANNEL CONTROL BLOCK ADDRESS

            50         04 A341   D0  010E 10200 	MOVL	SEC$W_SECXFL(R3)[R1],R0	;GET FORWARD AND BACKWARD SECTION INDEX LINKS

                          2F     13  0113 10250 	BEQL	130$			;BRANCH IF UCB TYPE SECTION

            50            51     B1  0115 10300 	CMPW	R1,R0			;IF CURRENT = FORWARD, THIS IS THE LAST

                          08     12  0118 10400 	BNEQ	110$			;SECTION IN THE CHAIN

         04 A2         0C A341   D0  011A 10500 	MOVL	SEC$L_WINDOW(R3)[R1],CCB$L_WIND(R2) ;PUT WINDOW ARD BACK IN CHANNEL

                          22     11  0120 10600 	BRB	130$			;AND DEALLOCATE THE SECTION

            51         04 A2     B1  0122 10700 110$:	CMPW	CCB$L_WIND(R2),R1	;IF SECTION INDEX IN CCB

                          04     12  0126 10800 	BNEQ	120$			;POINTS TO SECTION BEING DELETED

         04 A2            50     B0  0128 10900 	MOVW	R0,CCB$L_WIND(R2)	;THEN POINT IT AT THE FORWARD LINK

            50         F0 8F     78  012C 11000 120$:	ASHL	#-16,R0,R2		;BACKWARD SECTION INDEX

                          52         0130       

            51            6342   DE  0131 11100 	MOVAL	(R3)[R2],R1		;ADR OF BACKWARD SECTION TABLE ENTRY

         04 A1            50     B0  0135 11200 	MOVW	R0,SEC$W_SECXFL(R1)	;BAKSEC(FL) = CURSEC(FL)

            50            50     32  0139 11300 	CVTWL	R0,R0			;FORWARD SECTION INDEX

            51            6340   DE  013C 11400 	MOVAL	(R3)[R0],R1		;ADR OF FORWARD SECTION TABLE ENTRY

         06 A1            52     B0  0140 11500 	MOVW	R2,SEC$W_SECXBL(R1)	;FORSEC(BL) = CURSEC(BL)

                          02     BA  0144 11600 130$:	POPR	#^M<R1>			;RECOVER SECTION INDEX TO BE DEALLOCATED

                          0F     11  0146 11700 	BRB	MMG$DALCSTX		;DEALLOCATE THE SECTION TABLE ENTRY

                                     0148 11800 					;AND RETURN

                                     0148 11900 ;

                                     0148 12000 ; DEALLOCATE GLOBAL SECTION

                                     0148 12100 ;

                          0A     BB  0148 12200 200$:	PUSHR	#^M<R1,R3>		;SAVE SECTION TABLE BASE, SECTION INDEX

            53            6341   DE  014A 12300 	MOVAL	(R3)[R1],R3		;ADDRESS OF SECTION TABLE ENTRY

                 00000000'EF     16  014E 12400 	JSB	MMG$DELGBLSEC		;DELETE THE GLOBAL SECTION

                          0A     BA  0154 12500 	POPR	#^M<R1,R3>		;RESTORE SECTION TABLE BASE, SECTION INDEX

                                 05  0156 12600 	RSB

PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page  11

X0315           DALCSTX - DEALLOCATE SECTION TABLE INDEX                                                                         (7)



                                     0157   100 	.SBTTL	DALCSTX - DEALLOCATE SECTION TABLE INDEX

                                     0157   200 ;++

                                     0157   300 ; FUNCTIONAL DESCRIPTION:

                                     0157   400 ;

                                     0157   410 ;	THIS ROUTINE PLACES THE GIVEN SECTION TABLE ENTRY ON THE THE

                                     0157   420 ; SECTION TABLE FREE LIST, TURNING ON THE SIGN BIT OF THE REFCNT LONG WORD

                                     0157   430 ; AS AN INDICATION THAT IT IS NOT IN USE.

                                     0157   500 ;

                                     0157   600 ; CALLING SEQUENCE:

                                     0157   700 ;

                                     0157   800 ;	BSBW	MMG$DALCSTX

                                     0157   900 ;

                                     0157  1000 ; INPUT PARAMETERS:

                                     0157  1100 ;

                                     0157  1200 ;	R1 = SECTION TABLE INDEX

                                     0157  1210 ;	R5 = PROCESS HEADER ADDRESS

                                     0157  1300 ;

                                     0157  1400 ; IMPLICIT INPUTS:

                                     0157  1500 ;

                                     0157  1600 ;	NONE

                                     0157  1700 ;

                                     0157  1800 ; OUTPUT PARAMETERS:

                                     0157  1900 ;

                                     0157  2000 ;	R0,R1,R2,R3 PRESERVED

                                     0157  2100 ;

                                     0157  2200 ; IMPLICIT OUTPUTS:

                                     0157  2300 ;

                                     0157  2400 ;	NONE

                                     0157  2500 ;

                                     0157  2600 ; COMPLETION CODES:

                                     0157  2700 ;

                                     0157  2800 ;	NONE

                                     0157  2900 ;

                                     0157  3000 ; SIDE EFFECTS:

                                     0157  3100 ;

                                     0157  3200 ;	NONE

                                     0157  3300 ;

                                     0157  3400 ;--

                                     0157  3401 ;

                                     0157  3402 ; **********************************************************************

                                     0157  3403 ;

                                     0157  3404 ; **************** THE FOLLOWING CODE MAY BE PAGED *****************

                                     0157  3405 ;

                                 00000157  3406 	.PSECT	Y$EXEPAGED

                                     0157  3407 ;

                                     0157  3408 ; **********************************************************************

                                     0157  3409 ;

                                     0157  3500 MMG$DALCSTX::

            55         20 A5     C1  0157  3600 	ADDL3	PHD$L_PSTBASOFF(R5),R5,-(SP) ;BASE ADDRESS OF SECTION TABLE

                          7E         015B       

            6E            18     C1  015C  3620 	ADDL3	#SEC$L_REFCNT,(SP),-(SP) ;OFFSET TO REFERENCE COUNT

                          7E         015F       

            9E41          01     CE  0160  3640 	MNEGL	#1,@(SP)+[R1]		;NEG REF COUNT MEANS NOT IN USE

            9E41       26 A5     32  0164  3700 	CVTWL	PHD$W_PSTFREE(R5),@(SP)+[R1] ;PUT FREE POINTER INTO THIS SECTION ENTRY

         26 A5            51     B0  0169  3800 	MOVW	R1,PHD$W_PSTFREE(R5)	;AND THIS SECTION INDEX IN FREE POINTER

                                 05  016D  3900 	RSB

PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page  12

X0315           ALCSTX - ALOCATE SECTION TABLE INDEX                                                                             (8)



                                     016E   100 	.SBTTL	ALCSTX - ALOCATE SECTION TABLE INDEX

                                     016E   200 ;++

                                     016E   300 ; FUNCTIONAL DESCRIPTION:

                                     016E   400 ;

                                     016E   410 ;	THIS ROUTINE ALLOCATES A SECTION TABLE INDEX FROM THE

                                     016E   420 ; SECTION TABLE BELONGING TO THE SPECIFIED PROCESS HEADER

                                     016E   500 ;

                                     016E   600 ; CALLING SEQUENCE:

                                     016E   700 ;

                                     016E   800 ;	BSBW	MMG$ALCSTX

                                     016E   900 ;

                                     016E  1000 ; INPUT PARAMETERS:

                                     016E  1100 ;

                                     016E  1150 ;	R4 = PROCESS CONTROL BLOCK ADDRESS

                                     016E  1200 ;	R5 = PROCESS HEADER ADDRESS

                                     016E  1210 ;	IPL = ASTDEL

                                     016E  1220 ;		ASSUMPTION: ONLY GST IS ALLOCATED FROM THE SYSTEM HEADER

                                     016E  1230 ;		AND THE GLOBAL SECTION MUTEX IS LOCKED FOR WRITING WHEN

                                     016E  1240 ;		THIS IS DONE.  OTHERWISE, THE SYSTEM HEADER WOULD REQUIRE

                                     016E  1250 ;		IPL = SYNCH

                                     016E  1300 ;

                                     016E  1400 ; IMPLICIT INPUTS:

                                     016E  1500 ;

                                     016E  1600 ;	NONE

                                     016E  1700 ;

                                     016E  1800 ; OUTPUT PARAMETERS:

                                     016E  1900 ;

                                     016E  2000 ;	R0 = SYSTEM STATUS CODE

                                     016E  2010 ;	R1 = SECTION TABLE INDEX IF SUCCESSFUL

                                     016E  2020 ;	R2,R3 PRESERVED

                                     016E  2100 ;

                                     016E  2200 ; IMPLICIT OUTPUTS:

                                     016E  2300 ;

                                     016E  2400 ;	NONE

                                     016E  2500 ;

                                     016E  2600 ; COMPLETION CODES:

                                     016E  2700 ;

                                     016E  2800 ;	SS$_SECTBLFUL			;SECTION TABLE FULL

                                     016E  2900 ;

                                     016E  3000 ; SIDE EFFECTS:

                                     016E  3100 ;

                                     016E  3200 ;	NONE

                                     016E  3300 ;

                                     016E  3400 ;--

                                     016E  3450 

                                     016E  3451 ;

                                     016E  3452 ; **********************************************************************

                                     016E  3453 ;

                                     016E  3454 ; **************** THE FOLLOWING CODE MAY BE PAGED *****************

                                     016E  3455 ;

                                 0000016E  3456 	.PSECT	Y$EXEPAGED

                                     016E  3457 ;

                                     016E  3458 ; **********************************************************************

                                     016E  3459 ;

                                     016E  3500 MMG$ALCSTX::

            51         26 A5     32  016E  3600 	CVTWL	PHD$W_PSTFREE(R5),R1	;SEE IF ANY SECTIONS ON FREE LIST

                          0E     13  0172  3700 	BEQL	20$			;BRANCH IF NONE

PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page  13

X0315           ALCSTX - ALOCATE SECTION TABLE INDEX                                                                             (8)



            55         20 A5     C1  0174  3800 	ADDL3	PHD$L_PSTBASOFF(R5),R5,R0 ;BASE ADDRESS OF SECTION TABLE

                          50         0178       

         26 A5            6041   F7  0179  3900 	CVTLW	(R0)[R1],PHD$W_PSTFREE(R5) ;REMOVE THIS SECTION FROM FREE LIST

            50            01     3C  017E  4000 	MOVZWL	#SS$_NORMAL,R0		;SUCCESSFUL COMPLETION

                                 05  0181  4100 	RSB				;RETURN TO CALLER

                                     0182  4200 ;

                                     0182  4300 ; NEED TO ALLOCATE A NEW SECTION

                                     0182  4400 ;

            51            08     9A  0182  4500 20$:	MOVZBL	#SEC$C_LENGTH@-2,R1	;SPACE REQUIRED IN LONG WORDS

                          0C     BB  0185  4600 	PUSHR	#^M<R2,R3>		;PRESERVE THESE REGISTERS

                          0E     10  0187  4700 	BSBB	MMG$ALCPHD		;TRY TO ALLOCATE PROCESS HEADER SPACE

                          0C     BA  0189  4800 	POPR	#^M<R2,R3>		;RESTORE SAVED REGISTERS

            08            50     E9  018B  4900 	BLBC	R0,40$			;BRANCH IF NOT ENOUGH SPACE AVAILABLE

         24 A5            51     A2  018E  5000 	SUBW	R1,PHD$W_PSTLAST(R5)	;UPDATE LAST ALLOCATED PST INDEX

            51         24 A5     32  0192  5100 	CVTWL	PHD$W_PSTLAST(R5),R1	;SECTION INDEX

                                 05  0196  5200 40$:	RSB

PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page  14

X0315           ALCPHD - ALLOCATE PROCESS HEADER                                                                                 (9)



                                     0197   100 	.SBTTL	ALCPHD - ALLOCATE PROCESS HEADER

                                     0197   200 ;++

                                     0197   300 ; FUNCTIONAL DESCRIPTION:

                                     0197   400 ;

                                     0197   410 ;	THIS ROUTINE IS CALLED TO ALLOCATE SOME SPACE IN THE PROCESS HEADER

                                     0197   420 ;	FOR EITHER A NEW SECTION TABLE ENTRY OR SOME NUMBER OF WORKING

                                     0197   430 ;	SET LIST ENTRIES.  THE WORKING SET LIST ENTRIES GROW TOWARD LARGER

                                     0197   440 ;	ADDRESSES FROM PHD$W_WSLAST.  THE SECTION TABLE GROWS FROM THE

                                     0197   450 ;	HIGHEST ADDRESS TOWARD THE END OF THE WORKING SET.  WHEN THEY

                                     0197   460 ;	MEET, IT IS POSSIBLE THAT THERE IS STILL MORE SPACE AVAILABLE IF

                                     0197   470 ;	THE PROCESS SECTION TABLE BASE ADDRESS IS NOT EQUAL TO THE P0 PAGE

                                     0197   480 ;	TABLE ADDRESS.  IN ORDER TO ALLOW THE SECTION TABLE TO BE EASILY

                                     0197   490 ;	RELOCATED TO A HIGHER ADDRESS, ALL SECTION INDICES ARE NEGATIVE

                                     0197   500 ;	LONG WORD INDICES FROM A SECTION BASE ADDRESS.  THIS ADDRESS IS

                                     0197   510 ;	COMPUTED AS THE SUM OF THE PROCESS HEADER ADDRESS AND THE CONTENTS

                                     0197   520 ;	OF PSTBASOFF.

                                     0197   530 ;

                                     0197   600 ; CALLING SEQUENCE:

                                     0197   700 ;

                                     0197   800 ;	BSBW	MMG$ALCPHD

                                     0197   900 ;

                                     0197  1000 ; INPUT PARAMETERS:

                                     0197  1100 ;

                                     0197  1200 ;	R1 = NUMBER OF LONG WORDS REQUIRED

                                     0197  1210 ;	R4 = PROCESS CONTROL BLOCK ADDRESS

                                     0197  1220 ;	R5 = PROCESS HEADER ADDRESS (P1 SPACE UNLESS SYSTEM PCB)

                                     0197  1230 ;	IPL = ASTDEL

                                     0197  1300 ;

                                     0197  1400 ; IMPLICIT INPUTS:

                                     0197  1500 ;

                                     0197  1600 ;	NONE

                                     0197  1700 ;

                                     0197  1800 ; OUTPUT PARAMETERS:

                                     0197  1900 ;

                                     0197  2000 ;	R0 = SYSTEM STATUS CODE

                                     0197  2010 ;	R1 = PRESERVED IF SUCCESSFUL

                                     0197  2020 ;	   = NUMBER OF LONG WORDS AVAILABLE IF FAILED

                                     0197  2100 ;

                                     0197  2200 ; IMPLICIT OUTPUTS:

                                     0197  2300 ;

                                     0197  2400 ;	NONE

                                     0197  2500 ;

                                     0197  2600 ; COMPLETION CODES:

                                     0197  2700 ;

                                     0197  2800 ;	SS$_NORMAL		;SUCCESSFUL COMPLETION

                                     0197  2810 ;	SS$_SECTBLFUL		;SECTION TABLE FULL

                                     0197  2900 ;

                                     0197  3000 ; SIDE EFFECTS:

                                     0197  3100 ;

                                     0197  3200 ;	NONE

                                     0197  3300 ;

                                     0197  3400 ;--

PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page  15

X0315           ALCPHD - ALLOCATE PROCESS HEADER                                                                                (10)



                                     0197    10 ;

                                     0197    11 ; **********************************************************************

                                     0197    12 ;

                                     0197    13 ; **************** THE FOLLOWING CODE MAY BE PAGED *****************

                                     0197    14 ;

                                 00000197    15 	.PSECT	Y$EXEPAGED

                                     0197    16 ;

                                     0197    17 ; **********************************************************************

                                     0197    18 ;

                                     0197   100 MMG$ALCPHD::

                                     0197   300 ;

                                     0197   400 ; ESTABLISH HOW MUCH ROOM IS AVAILABLE

                                     0197   500 ;

            50         24 A5     32  0197   600 10$:	CVTWL	PHD$W_PSTLAST(R5),R0	;SECTION INDEX TO LOWEST ADDRESSED SECTION

         20 A5            55     C1  019B   700 	ADDL3	R5,PHD$L_PSTBASOFF(R5),R2 ;P1 ADR OF END OF PROC SEC TAB

                          52         019F       

            50            6240   DE  01A0   800 	MOVAL	(R2)[R0],R0		;LOWEST ADDRESS IN SECTION TABLES

            52         12 A5     3C  01A4   900 	MOVZWL	PHD$W_WSLAST(R5),R2	;WSLX FOR LAST (INCLUSIVE) ENTRY

            52         04 A542   DE  01A8  1000 	MOVAL	4(R5)[R2],R2		;ADR OF FIRST AVAILABLE BYTE BEYOND WSL

            50            52     C3  01AD  1100 	SUBL3	R2,R0,R2		;NO. OF BYTES AVAILABLE

                          52         01B0       

                          2F     19  01B1  1200 	BLSS	ALCPHDBUG		;BRANCH IF OVERLAP, ERROR

            52            04     C6  01B3  1250 	DIVL	#4,R2			;CONVERT TO LONG WORDS

            52            51     D1  01B6  1300 	CMPL	R1,R2			;ENOUGH SPACE AVAILABLE

                          04     14  01B9  1400 	BGTR	20$			;BRANCH IF NOT, TRY TO GET MORE

            50            01     3C  01BB  1600 	MOVZWL	#SS$_NORMAL,R0		;INDICATE SUCCESSFUL COMPLETION

                                 05  01BE  1700 	RSB				;AND RETURN

                                     01BF  1800 ;

                                     01BF  1900 ; NEED TO EXPAND PROCESS HEADER IF POSSIBLE

                                     01BF  2100 ; R0 = P1 SPACE ADDRESS OF LOWEST ADDRESSED SECTION TABLE ENTRY

                                     01BF  2150 ; R1 = DESIRED LONG WORD COUNT

                                     01BF  2200 ; R2 = NO. OF LONG WORDS AVAILABLE WITHOUT EXPANSION

                                     01BF  2300 ;

                          06     BB  01BF  2400 20$:	PUSHR	#^M<R1,R2>		;PUSH AVAILABLE SPACE, DESIRED SPACE

         20 A5            1E     9C  01C1  2410 	ROTL	#<32-2>,PHD$L_PSTBASOFF(R5),R1 ;LONG WORD OFFSET TO BASE OF PST

                          51         01C5       

         4A A5            51     B1  01C6  2420 	CMPW	R1,PHD$W_PSTBASMAX(R5)	;AT MAX PST BASE?

                          0F     18  01CA  2430 	BGEQ	40$			;BRANCH IF YES, CANNOT EXPAND

                 0000004F'EF     16  01CC  2500 	JSB	MMG$EXPANDPHD		;EXPAND PROCESS HEADER IF POSSIBLE

                          06     BA  01D2  2600 30$:	POPR	#^M<R1,R2>		;R1=DESIRED SPACE, R2=AVAILABLE SPACE

            C0            50     E8  01D4  2700 	BLBS	R0,10$			;IF EXPANDED OK, TRY TO ALLOCATE AGAIN

            51            52     D0  01D7  2800 	MOVL	R2,R1			;OTHERWISE RETURN WHAT IS AVAILABLE

                                 05  01DA  2900 	RSB				;ALONG WITH ERROR CONDITION IN R0

            50       021C 8F     3C  01DB  2910 40$:	MOVZWL	#SS$_SECTBLFUL,R0	;SECTION TABLE FULL

                          F0     11  01E0  2920 	BRB	30$

                                     01E2  3000 

                                     01E2  3100 ALCPHDBUG:

                                     01E2  3200 	BUG_CHECK ALCPHD,FATAL

PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page  16

X0315           EXPANDPHD - EXPAND THE PROCESS HEADER                                                                           (11)



                                     01E6   100 	.SBTTL	EXPANDPHD - EXPAND THE PROCESS HEADER

                                     01E6   200 ;++

                                     01E6   300 ; FUNCTIONAL DESCRIPTION:

                                     01E6   400 ;

                                     01E6   410 ;	THIS ROUTINE ATTEMPTS TO ADD A NEW PAGE OF ZEROES AT THE CURRENT

                                     01E6   420 ;	END OF THE SECTION TABLE.  IF THERE WAS SOME ROOM BEFORE THE P0 PAGE

                                     01E6   430 ;	TABLE, THEN THIS WILL SUCCEED AND THE SECTION TABLE IS MOVED INTO

                                     01E6   440 ;	THE NEW AREA.

                                     01E6   500 ;

                                     01E6   600 ; CALLING SEQUENCE:

                                     01E6   700 ;

                                     01E6   800 ;	BSBW	MMG$EXPANDPHD

                                     01E6   900 ;

                                     01E6  1000 ; INPUT PARAMETERS:

                                     01E6  1100 ;

                                     01E6  1200 ;	R0 = ADDRESS OF LOWEST ADDRESSED SECTION TABLE ENTRY

                                     01E6  1210 ;	     P1 SPACE ADDRESS UNLESS SYSTEM PROCESS HEADER

                                     01E6  1220 ;	R4 = PROCESS CONTROL BLOCK ADDRESS

                                     01E6  1230 ;	R5 = PROCESS HEADER ADDRESS (P1 SPACE UNLESS SYSTEM HEADER)

                                     01E6  1300 ;

                                     01E6  1400 ; IMPLICIT INPUTS:

                                     01E6  1500 ;

                                     01E6  1600 ;	NONE

                                     01E6  1700 ;

                                     01E6  1800 ; OUTPUT PARAMETERS:

                                     01E6  1900 ;

                                     01E6  2000 ;	R0 = SYSTEM STATUS CODE

                                     01E6  2100 ;

                                     01E6  2200 ; IMPLICIT OUTPUTS:

                                     01E6  2300 ;

                                     01E6  2400 ;	NONE

                                     01E6  2500 ;

                                     01E6  2600 ; COMPLETION CODES:

                                     01E6  2700 ;

                                     01E6  2800 ;	SS$_SECTBLFUL		;SECTION TABLE FULL

                                     01E6  2900 ;

                                     01E6  3000 ; SIDE EFFECTS:

                                     01E6  3100 ;

                                     01E6  3200 ;	NONE

                                     01E6  3300 ;

                                     01E6  3400 ;--

PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page  17

X0315           EXPANDPHD - EXPAND THE PROCESS HEADER                                                                           (12)



                                     01E6    10 ;

                                     01E6    11 ; **********************************************************************

                                     01E6    12 ;

                                     01E6    13 ; **************** THE FOLLOWING CODE MUST BE RESIDENT *****************

                                     01E6    14 ;

                                 0000004F    15 	.PSECT	$MMGCOD

                                     004F    16 ;

                                     004F    17 ; **********************************************************************

                                     004F    18 ;

                                     004F   100 MMG$EXPANDPHD:

                                     004F  2400 	SETIPL	#IPL$_SYNCH		;PROTECT PROCESS HEADER DATA BASE

                     0071 8F     BB  0052  2500 	PUSHR	#^M<R0,R4,R5,R6>	;

            56         20 A5     D0  0056  2550 	MOVL	PHD$L_PSTBASOFF(R5),R6	;BYTE OFFSET TO END OF SECTION TABLE

         64 A4            56     C1  005A  2600 	ADDL3	R6,PCB$L_PHD(R4),R2	;SYSTEM ADR OF NEXT

                          52         005E       

                                     005F  2700 					;AVAILABLE PAGE OF PROCESS HEADER

                          FF9E'  30  005F  3000 	BSBW	MMG$SVAPTECHK		;GET SYS VA OF PTE FOR SYSTEM PTE

                          63     D5  0062  3100 	TSTL	(R3)			;MUST BE 0 OR DATA BASE ERROR

                          52     12  0064  3200 	BNEQ	30$			;BRANCH IF ERROR

            0A            1B     9C  0066  3300 	ROTL	#PTE$V_PROT,#PRT$C_SRKW,(R3) ;MAKE INTO DEMAND ZERO PAGE

                          63         0069       

                                     006A  3400 	SETIPL	#IPL$_ASTDEL		;BACK TO PAGE FAULTABLE STATE

                                     006D  3500 ;

                                     006D  3600 ; IF WE'RE SWAPPED AT THIS POINT, THE SPTE WILL STILL CONTAIN A DEMAND ZERO

                                     006D  3700 ; PTE.  THERE IS NO DANGER OF ANOTHER PROCESS TOUCHING THIS SYSTEM ADDRESS

                                     006D  3800 ; SINCE IT IS AN ACCESS VIOLATION TO TOUCH ANOTHER PROCESS' HEADER, AND SINCE

                                     006D  3900 ; THIS CODE IS RUNNING AT ASTDEL, THIS PROCESS CAN'T DO ANYTHING.

                                     006D  4000 ;

                       64 B446   95  006D  4200 	TSTB	@PCB$L_PHD(R4)[R6]	;FAULT THE PROCESS HEADER PAGE

                                     0071  4300 					;THROUGH ITS SYSTEM ADDRESS

                                     0071  4400 	SETIPL	#IPL$_SYNCH		;PROTECT PROCESS HEADER DATA BASE AGAIN

            52         64 B446   9E  0074  4500 	MOVAB	@PCB$L_PHD(R4)[R6],R2	;ADDRESS OF NEW PROCESS HEADER PAGE

                          FF84'  30  0079  4600 	BSBW	MMG$SVAPTECHK		;GET SYS VIRTUAL ADR OF SPTE

            50            63     D0  007C  4700 	MOVL	(R3),R0			;GET THE SPT ENTRY

                          61     18  007F  4800 	BGEQ	EXPANDPHDBUG		;BRANCH IF NOT VALID, ERROR

                          50     DD  0081  4900 	PUSHL	R0			;SAVE THE SPTE

            15            00     EF  0083  5000 	EXTZV	#PTE$V_PFN,#PTE$S_PFN,R0,R0 ;GET THE PFN

            50            50         0086       

            51       0000'DF40   3C  0088  5100 	MOVZWL	@W^PFN$AW_WSLX[R0],R1	;GET WORKING SET LIST INDEX

            6541          20     C8  008E  5200 	BISL	#WSL$M_WSLOCK,(R5)[R1]	;SET THE WORKING SET LOCK

                                     0092  5300 					;PROCESS HDR PAGE IS NOT A CANDIDATE

                                     0092  5400 					;FOR WORKING SET LIST REPLACEMENT

                          0C     BB  0092  5410 	PUSHR	#^M<R2,R3>		;SAVE SVAPTE AND VA FROM SWAPWSLE

            52         0E A5     3C  0094  5420 	MOVZWL	PHD$W_WSDYN(R5),R2	;WSLX TO SWAP TO

                          FF65'  30  0098  5430 	BSBW	MMG$SWAPWSLE		;SWAP INTO LOCKED PORTION

                       0E A5     B6  009B  5440 	INCW	PHD$W_WSDYN(R5)		;DYNAMIC PORTION STARTS ONE HIGHER

         0E A5         10 A5     B1  009E  5450 	CMPW	PHD$W_WSNEXT(R5),PHD$W_WSDYN(R5) ;MAKE SURE WSNEXT IS OK

                          05     1E  00A3  5460 	BGEQU	20$			;BRANCH IF IT IS

         10 A5         12 A5     B0  00A5  5470 	MOVW	PHD$W_WSLAST(R5),PHD$W_WSNEXT(R5) ;MUST RESET IT

                          0C     BA  00AA  5480 20$:	POPR	#^M<R2,R3>		;RECOVER VA, SVAPTE

                          FF51'  30  00AC  5490 	BSBW	MMG$EXTRADYNWS		;RECOMPUTE EXTRA DYNAMIC WSLE COUNT

            55            56     C1  00AF  5500 	ADDL3	R6,R5,R2		;P1 SPACE ADDRESS FOR THE NEW PAGE

                          52         00B2       

                          FF4A'  30  00B3  5600 	BSBW	MMG$PTEADRCHK		;GET ITS PTE ADDRESS

                          63     D5  00B6  5700 	TSTL	(R3)			;IT TOO SHOULD HAVE BEEN ZERO

                          28     12  00B8  5800 30$:	BNEQ	EXPANDPHDBUG		;BRANCH IF IT WASN'T, ERROR

            63            8E     D0  00BA  5900 	MOVL	(SP)+,(R3)		;FILL IN P1 SPACE PTE

PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page  18

X0315           EXPANDPHD - EXPAND THE PROCESS HEADER                                                                           (12)



                                     00BD  6000 ;

                                     00BD  6100 ; NOW MOVE THE SECTION TABLE PAGE(S) TO OPEN UP SOME SPACE BETWEEN

                                     00BD  6200 ; THE WORKING SET LIST AND THE SECTION TABLE.

                                     00BD  6300 ; MUST NOT LOWER IPL AT THIS POINT BECAUSE MODIFIED PAGE WRITER MIGHT

                                     00BD  6400 ; TRY TO ACCESS THE SECTION TABLE.

                                     00BD  6500 ; R2 = P1 VIRTUAL ADDRESS OF 1ST BYTE OF NEW PAGE

                                     00BD  6550 ; 0(SP) = ADDRESS OF LOWEST ADDRESSED SECTION TABLE ENTRY

                                     00BD  6600 ;

         20 A5       0200 C6     DE  00BD  6650 	MOVAL	^X200(R6),PHD$L_PSTBASOFF(R5) ;PST BASE IS 1 PAGE HIGHER

            51            6E     D0  00C3  6700 	MOVL	(SP),R1			;ADDRESS OF 1ST SECTION TABLE ENTRY

            52            51     C2  00C6  6800 	SUBL	R1,R2			;NO. OF BYTES OF SECTION TABLE TO MOVE

            61            52     28  00C9  6900 	MOVC3	R2,(R1),^X200(R1)	;MOVE SECTION TABLE 1 PAGE

                     0200 C1         00CC       

            61            00     2C  00CF  7000 	MOVC5	#0,(R1),#0,#^X200,@(SP)+ ;ZERO 1 PAGE FROM 1ST SEC TBL ENTRY

       0200 8F            00         00D2       

                          9E         00D6       

            50            01     3C  00D7  7100 	MOVZWL	#SS$_NORMAL,R0		;SET SUCCESS CODE

                                     00DA  7200 	SETIPL	#IPL$_ASTDEL		;BACK TO AST LEVEL

                     0070 8F     BA  00DD  7300 	POPR	#^M<R4,R5,R6>		;RESTORE REGISTERS

                                 05  00E1  7400 	RSB				;AND RETURN

                                     00E2  8400 ;

                                     00E2  8500 ; DATA BASE INCONSISTENCY

                                     00E2  8600 ;

                                     00E2  8700 EXPANDPHDBUG:

                                     00E2  8800 	BUG_CHECK EXPANDPHD,FATAL

                                     00E6  8900 

                                     00E6  9000 

                                     00E6  9100 

                                     00E6  9200 	.END

PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page  19

SYMBOL TABLE                                                                                                                    (12)



ALCPHDBUG        000001E2 R     03   PCB$L_ASTQFL     00000010            PCB$W_SIZE       00000008            

BIT...         = 00000000            PCB$L_EFC2P      00000058            PCB$W_STATE      00000030            

BUG$_ALCPHD      ********   X   03   PCB$L_EFC3P      0000005C            PCB$W_TMBU       00000036            

BUG$_EXPANDPHD   ********   X   04   PCB$L_EFCS       00000050            PCB$W_TQCNT      0000004A            

BUG$_SECREFNEG   ********   X   04   PCB$L_EFCU       00000054            PFN$AW_WSLX      ********   X   04   

CCB$B_AMOD       00000009            PCB$L_EFWM       0000004C            PHD$B_ASTLVL     000000CF            

CCB$B_STS        00000008            PCB$L_OWNER      0000001C            PHD$B_DFPFC      00000038            

CCB$C_LENGTH     00000010            PCB$L_PHD        00000064            PHD$B_PAGFIL     0000001F            

CCB$K_LENGTH     00000010            PCB$L_PHYPCB     00000018            PHD$B_PGTBPFC    00000039            

CCB$L_DIRP       0000000C            PCB$L_PID        00000060            PHD$C_LENGTH     00000118            

CCB$L_UCB        00000000            PCB$L_PQB        0000004C            PHD$C_PHDPAGCTX= 00000008            

CCB$L_WIND       00000004            PCB$L_SQBL       00000004            PHD$K_LENGTH     00000118            

CCB$W_IOC        0000000A            PCB$L_SQFL       00000000            PHD$L_BIOCNT     00000054            

CHK_DBG_SYMTAB   00000000 R     04   PCB$L_STS        00000028            PHD$L_CPULIM     00000058            

CTL$GL_PHD       ********   X   03   PCB$L_UIC        00000020            PHD$L_CPUTIM     0000003C            

CTL$GQ_PROCPRIV  ********   X   03   PCB$L_WSSWP      00000024            PHD$L_DIOCNT     00000050            

EXE$GL_GSDMTX    ********   X   03   PCB$L_WTIME      0000002C            PHD$L_ESP        0000007C            

EXPANDPHDBUG     000000E2 R     04   PCB$T_LNAME      0000006C            PHD$L_FREP0VA    00000028            

GBL...         = 00000000            PCB$V_ASTPEN   = 00000011            PHD$L_FREP1VA    00000030            

IAC$CLRIACLOCK   ********   X   03   PCB$V_BATCH    = 0000000E            PHD$L_FREPTECNT  0000002C            

IPL$_ASTDEL    = 00000002            PCB$V_DELPEN   = 00000001            PHD$L_KSP        00000078            

IPL$_HWCLK     = 00000018            PCB$V_FORCPEN  = 00000002            PHD$L_P0BR       000000C8            

IPL$_IOPOST    = 00000004            PCB$V_HIBER    = 00000013            PHD$L_P0LRASTL   000000CC            

IPL$_MAILBOX   = 0000000B            PCB$V_INQUAN   = 00000003            PHD$L_P1BR       000000D0            

IPL$_POWER     = 0000001F            PCB$V_LOGIN    = 00000014            PHD$L_P1LR       000000D4            

IPL$_QUEUEAST  = 00000006            PCB$V_NETWRK   = 00000015            PHD$L_PAGEFLTS   0000004C            

IPL$_SCHED     = 00000003            PCB$V_NOACNT   = 0000000F            PHD$L_PAGFIL     0000001C            

IPL$_SYNCH     = 00000007            PCB$V_NODELET  = 00000017            PHD$L_PC         000000C0            

IPL$_TIMER     = 00000007            PCB$V_PHDRES   = 00000012            PHD$L_PCB        00000078            

MMG$ALCPHD       00000197 RG    03   PCB$V_PSWAPM   = 00000004            PHD$L_PGFLCNT    00000034            

MMG$ALCSTX       0000016E RG    03   PCB$V_PWRAST   = 00000016            PHD$L_PGFLQUOTA  0000005C            

MMG$DALCSTX      00000157 RG    03   PCB$V_RES      = 00000000            PHD$L_PSL        000000C4            

MMG$DALCSTXSCN   000000DE RG    03   PCB$V_RESPEN   = 00000005            PHD$L_PSTBASOFF  00000020            

MMG$DECSECREF    00000030 RG    04   PCB$V_SSFEXC   = 00000006            PHD$L_PTWSLELCK  00000064            

MMG$DELGBLSEC    ********   X   03   PCB$V_SSFEXCE  = 00000007            PHD$L_PTWSLEVAL  00000068            

MMG$DELGBLWCB    ********   X   03   PCB$V_SSFEXCS  = 00000008            PHD$L_R0         00000088            

MMG$EXPANDPHD    0000004F R     04   PCB$V_SSFEXCU  = 00000009            PHD$L_R1         0000008C            

MMG$EXTRADYNWS   ********   X   04   PCB$V_SSRWAIT  = 0000000A            PHD$L_R10        000000B0            

MMG$GL_CTLBASVA  ********   X   03   PCB$V_SUSPEN   = 0000000B            PHD$L_R11        000000B4            

MMG$GL_SPTBASE   ********   X   04   PCB$V_SWPVBN   = 00000010            PHD$L_R12        000000B8            

MMG$GL_SYSPHD    ********   X   03   PCB$V_WAKEPEN  = 0000000C            PHD$L_R13        000000BC            

MMG$GSDMTXULK    ********   X   03   PCB$V_WALL     = 0000000D            PHD$L_R2         00000090            

MMG$IMGRESET     00000000 RG    03   PCB$W_APTCNT     00000034            PHD$L_R3         00000094            

MMG$PTEADRCHK    ********   X   04   PCB$W_ASTCNT     0000003C            PHD$L_R4         00000098            

MMG$SUBSECREF    00000023 RG    04   PCB$W_BIOCNT     0000003E            PHD$L_R5         0000009C            

MMG$SVAPTECHK    ********   X   04   PCB$W_BIOLM      00000040            PHD$L_R6         000000A0            

MMG$SWAPWSLE     ********   X   04   PCB$W_BYTCNT     00000042            PHD$L_R7         000000A4            

MMG$WSPEAKCHK    ********   X   03   PCB$W_BYTLM      00000068            PHD$L_R8         000000A8            

PCB$B_ASTACT     0000000C            PCB$W_DIOCNT     00000044            PHD$L_R9         000000AC            

PCB$B_ASTEN      0000000D            PCB$W_DIOLM      00000046            PHD$L_REFERFLT   00000014            

PCB$B_PRI        0000000B            PCB$W_FILCNT     00000048            PHD$L_SSP        00000080            

PCB$B_PRIB       00000033            PCB$W_GPGCNT     00000038            PHD$L_USP        00000084            

PCB$B_TYPE       0000000A            PCB$W_GRP        00000022            PHD$L_WSL        00000118            

PCB$B_WEFC       00000032            PCB$W_MEM        00000020            PHD$M_DALCSTX  = 00000002            

PCB$C_LENGTH     0000007C            PCB$W_MTXCNT     0000000E            PHD$M_PFMFLG   = 00000001            

PCB$K_LENGTH     0000007C            PCB$W_PPGCNT     0000003A            PHD$M_WSPEAKCHK= 00000004            

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

PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page  20

SYMBOL TABLE                                                                                                                    (12)



PHD$S_ASTLVL   = 00000008            PR$_SBIQC      = 00000036            PSL$V_FPD      = 0000001B            

PHD$S_P0LR     = 00000018            PR$_SBIS       = 00000031            PSL$V_FU       = 00000006            

PHD$V_ASTLVL   = 00000018            PR$_SBISC      = 00000032            PSL$V_IPL      = 00000010            

PHD$V_DALCSTX  = 00000001            PR$_SBITA      = 00000035            PSL$V_IS       = 0000001A            

PHD$V_P0LR     = 00000000            PR$_SBR        = 0000000C            PSL$V_IV       = 00000005            

PHD$V_PFMFLG   = 00000000            PR$_SCBB       = 00000011            PSL$V_PRVMOD   = 00000016            

PHD$V_WSPEAKCHK= 00000002            PR$_SID        = 0000003E            PSL$V_TBIT     = 00000004            

PHD$W_ASTLM      00000044            PR$_SIRR       = 00000014            PSL$V_TP       = 0000001E            

PHD$W_BAK        00000048            PR$_SISR       = 00000015            PTE$C_EOWN     = 00800000            

PHD$W_DFWSCNT    0000001A            PR$_SLR        = 0000000D            PTE$C_ER       = 38000000            

PHD$W_EMPTPG     000000D8            PR$_SSP        = 00000002            PTE$C_ERKW     = 30000000            

PHD$W_EXTDYNWS   00000076            PR$_TBIA       = 00000039            PTE$C_EW       = 28000000            

PHD$W_FILLM      00000060            PR$_TBIS       = 0000003A            PTE$C_KOWN     = 00000000            

PHD$W_FLAGS      0000003A            PR$_TODR       = 0000001B            PTE$C_KR       = 18000000            

PHD$W_PHVINDEX   00000046            PR$_TXCS       = 00000022            PTE$C_KW       = 10000000            

PHD$W_PRCLM      00000042            PR$_TXDB       = 00000023            PTE$C_NA       = 00000000            

PHD$W_PST        00000020            PR$_USP        = 00000003            PTE$C_SOWN     = 01000000            

PHD$W_PSTBASMAX  0000004A            PR$_WCSA       = 0000002C            PTE$C_SR       = 58000000            

PHD$W_PSTFREE    00000026            PR$_WCSD       = 0000002D            PTE$C_SREW     = 48000000            

PHD$W_PSTLAST    00000024            PRT$C_ER       = 00000007            PTE$C_SRKW     = 50000000            

PHD$W_PTCNTACT   00000070            PRT$C_ERKW     = 00000006            PTE$C_SW       = 40000000            

PHD$W_PTCNTLCK   0000006C            PRT$C_EW       = 00000005            PTE$C_UOWN     = 01800000            

PHD$W_PTCNTMAX   00000072            PRT$C_KR       = 00000003            PTE$C_UR       = 78000000            

PHD$W_PTCNTVAL   0000006E            PRT$C_KW       = 00000002            PTE$C_UREW     = 68000000            

PHD$W_QUANT      00000040            PRT$C_NA       = 00000000            PTE$C_URKW     = 70000000            

PHD$W_TQLM       00000062            PRT$C_RESERVED = 00000001            PTE$C_URSW     = 60000000            

PHD$W_WSAUTH     0000000A            PRT$C_SR       = 0000000B            PTE$C_UW       = 20000000            

PHD$W_WSDYN      0000000E            PRT$C_SREW     = 00000009            PTE$M_CRF      = 00010000            

PHD$W_WSFLUID    00000074            PRT$C_SRKW     = 0000000A            PTE$M_DZRO     = 00020000            

PHD$W_WSLAST     00000012            PRT$C_SW       = 00000008            PTE$M_GPTX     = 003FFFFF            

PHD$W_WSLIST     00000008            PRT$C_UR       = 0000000F            PTE$M_MODIFY   = 04000000            

PHD$W_WSLOCK     0000000C            PRT$C_UREW     = 0000000D            PTE$M_OWN      = 01800000            

PHD$W_WSLX       0000004A            PRT$C_URKW     = 0000000E            PTE$M_PFN      = 001FFFFF            

PHD$W_WSNEXT     00000010            PRT$C_URSW     = 0000000C            PTE$M_PGFLVB   = 003FFFFF            

PHD$W_WSQUOTA    00000018            PRT$C_UW       = 00000004            PTE$M_PROT     = 78000000            

PR$_ACCR       = 00000029            PSL$C_EXEC     = 00000001            PTE$M_TYP0     = 00400000            

PR$_ACCS       = 00000028            PSL$C_KERNEL   = 00000000            PTE$M_TYP1     = 04000000            

PR$_ASTLVL     = 00000013            PSL$C_SUPER    = 00000002            PTE$M_VALID    = 80000000            

PR$_ESP        = 00000001            PSL$C_USER     = 00000003            PTE$M_WRT      = 00040000            

PR$_ICCS       = 00000018            PSL$M_CM       = 80000000            PTE$S_GPTX     = 00000016            

PR$_ICR        = 0000001A            PSL$M_CURMOD   = 03000000            PTE$S_OWN      = 00000002            

PR$_IPL        = 00000012            PSL$M_DV       = 00000080            PTE$S_PFN      = 00000015            

PR$_ISP        = 00000004            PSL$M_FPD      = 08000000            PTE$S_PGFLVB   = 00000016            

PR$_KSP        = 00000000            PSL$M_FU       = 00000040            PTE$S_PROT     = 00000004            

PR$_MAPEN      = 00000038            PSL$M_IPL      = 001F0000            PTE$S_STX      = 00000010            

PR$_NICR       = 00000019            PSL$M_IS       = 04000000            PTE$V_CRF      = 00000010            

PR$_P0BR       = 00000008            PSL$M_IV       = 00000020            PTE$V_DZRO     = 00000011            

PR$_P0LR       = 00000009            PSL$M_PRVMOD   = 00C00000            PTE$V_GPTX     = 00000000            

PR$_P1BR       = 0000000A            PSL$M_SAFBITS  = 000037FF            PTE$V_MODIFY   = 0000001A            

PR$_P1LR       = 0000000B            PSL$M_TBIT     = 00000010            PTE$V_OWN      = 00000017            

PR$_PCBB       = 00000010            PSL$M_TP       = 40000000            PTE$V_PFN      = 00000000            

PR$_PME        = 0000003D            PSL$S_CURMOD   = 00000002            PTE$V_PGFLVB   = 00000000            

PR$_RXCS       = 00000020            PSL$S_IPL      = 00000005            PTE$V_PROT     = 0000001B            

PR$_RXDB       = 00000021            PSL$S_PRVMOD   = 00000002            PTE$V_STX      = 00000000            

PR$_SBIER      = 00000034            PSL$V_CM       = 0000001F            PTE$V_TYP0     = 00000016            

PR$_SBIFS      = 00000030            PSL$V_CURMOD   = 00000018            PTE$V_TYP1     = 0000001A            

PR$_SBIMT      = 00000033            PSL$V_DV       = 00000007            PTE$V_VALID    = 0000001F            

PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page  21

SYMBOL TABLE                                                                                                                    (12)



PTE$V_WRT      = 00000012            SS$_BADFILEVER = 00000820            SS$_FILESTRUCT = 000008C0            

RM$RESET         ********   X   03   SS$_BADIMGHDR  = 00000044            SS$_FILNOTACC  = 000000AC            

SCH$LOCKW        ********   X   03   SS$_BADIRECTORY= 00000828            SS$_FILNOTCNTG = 000002AC            

SEC$B_AMOD       00000015            SS$_BADPARAM   = 00000014            SS$_FILNOTEXP  = 000000B4            

SEC$B_PFC        0000000B            SS$_BADSTACK   = 000002B4            SS$_FLTDIV     = 00000494            

SEC$C_LENGTH     00000020            SS$_BEGOFFILE  = 00000938            SS$_FLTOVF     = 0000048C            

SEC$K_LENGTH     00000020            SS$_BLOCKCNTERR= 00000940            SS$_FLTUND     = 0000049C            

SEC$K_MATALL   = 00000000            SS$_BREAK      = 00000414            SS$_FORMAT     = 000000BC            

SEC$K_MATEQU   = 00000001            SS$_BUFBYTALI  = 0000030C            SS$_GPTFULL    = 000000C4            

SEC$K_MATLEQ   = 00000002            SS$_BUFFEROVF  = 00000601            SS$_GSDFULL    = 000000CC            

SEC$L_CCB        00000000            SS$_BUGCHECK   = 000002A4            SS$_HANGUP     = 000002CC            

SEC$L_GSD        00000000            SS$_CANCEL     = 00000830            SS$_HEADERFULL = 000008C8            

SEC$L_PAGCNT     0000001C            SS$_CHANINTLK  = 0000004C            SS$_IDXFILEFULL= 000008D0            

SEC$L_REFCNT     00000018            SS$_CLIFRCEXT  = 00000980            SS$_ILLBLKNUM  = 000000DC            

SEC$L_VBN        00000010            SS$_CMODSUPR   = 0000041C            SS$_ILLCNTRFUNC= 000000E4            

SEC$L_VPXPFC     00000008            SS$_CMODUSER   = 00000424            SS$_ILLEFC     = 000000EC            

SEC$L_WINDOW     0000000C            SS$_COMPAT     = 0000042C            SS$_ILLIOFUNC  = 000000F4            

SEC$M_AMOD     = 00000300            SS$_CONTINUE   = 00000001            SS$_ILLLBLAST  = 00000968            

SEC$M_CRF      = 00000002            SS$_CONTROLC   = 00000651            SS$_ILLPAGCNT  = 000000FC            

SEC$M_DZRO     = 00000004            SS$_CONTROLO   = 00000609            SS$_ILLSEQOP   = 000002DC            

SEC$M_GBL      = 00000001            SS$_CONTROLY   = 00000611            SS$_ILLSER     = 00000104            

SEC$M_PERM     = 00004000            SS$_CREATED    = 00000619            SS$_ILLUSRLBLRD= 00000958            

SEC$M_SYSGBL   = 00008000            SS$_CTRLERR    = 00000054            SS$_ILLUSRLBLWT= 00000960            

SEC$M_WRT      = 00000008            SS$_DATACHECK  = 0000005C            SS$_INCVOLLABEL= 0000010C            

SEC$S_AMOD     = 00000002            SS$_DATAOVERUN = 00000838            SS$_INSFARG    = 00000114            

SEC$S_CRF      = 00000001            SS$_DEBUG      = 0000046C            SS$_INSFMEM    = 00000124            

SEC$S_DZRO     = 00000001            SS$_DECOVF     = 000004A4            SS$_INSFRAME   = 0000012C            

SEC$S_GBL      = 00000001            SS$_DEVACTIVE  = 000002C4            SS$_INSFWSL    = 0000011C            

SEC$S_PERM     = 00000001            SS$_DEVALLOC   = 00000840            SS$_INTDIV     = 00000484            

SEC$S_PFC      = 00000008            SS$_DEVALRALLOC= 00000641            SS$_INTOVF     = 0000047C            

SEC$S_SYSGBL   = 00000001            SS$_DEVASSIGN  = 00000848            SS$_IVADDR     = 00000134            

SEC$S_VPX      = 00000016            SS$_DEVFOREIGN = 00000064            SS$_IVCHAN     = 0000013C            

SEC$S_WRT      = 00000001            SS$_DEVICEFULL = 00000850            SS$_IVCHNLSEC  = 0000026C            

SEC$V_AMOD     = 00000008            SS$_DEVMOUNT   = 0000006C            SS$_IVDEVNAM   = 00000144            

SEC$V_CRF      = 00000001            SS$_DEVNOTALLOC= 00000858            SS$_IVGSDNAM   = 0000014C            

SEC$V_DZRO     = 00000002            SS$_DEVNOTMBX  = 00000074            SS$_IVLOGNAM   = 00000154            

SEC$V_GBL      = 00000000            SS$_DEVNOTMOUNT= 0000007C            SS$_IVLOGTAB   = 0000015C            

SEC$V_PERM     = 0000000E            SS$_DEVOFFLINE = 00000084            SS$_IVPROTECT  = 000002F4            

SEC$V_PFC      = 00000018            SS$_DIRFULL    = 00000860            SS$_IVQUOTAL   = 00000164            

SEC$V_SYSGBL   = 0000000F            SS$_DRVERR     = 0000008C            SS$_IVSECFLG   = 0000016C            

SEC$V_VPX      = 00000000            SS$_DUPFILENAME= 00000868            SS$_IVSECIDCTL = 000002E4            

SEC$V_WRT      = 00000003            SS$_DUPLNAM    = 00000094            SS$_IVSSRQ     = 00000174            

SEC$W_FLAGS      00000014            SS$_ENDOFFILE  = 00000870            SS$_IVSTSFLG   = 0000017C            

SEC$W_SECXBL     00000006            SS$_ENDOFTAPE  = 00000878            SS$_IVTIME     = 00000184            

SEC$W_SECXFL     00000004            SS$_ENDOFUSRLBL= 00000970            SS$_LCKPAGFUL  = 000000D4            

SGN$GL_PTPAGCNT  ********   X   04   SS$_EXQUOTA    = 0000001C            SS$_LENVIO     = 0000018C            

SS$_ABORT      = 0000002C            SS$_EXTIDXFILE = 00000880            SS$_LKWSETFUL  = 00000194            

SS$_ACCONFLICT = 00000800            SS$_FCPREADERR = 00000888            SS$_MBFULL     = 000008D8            

SS$_ACCVIO     = 0000000C            SS$_FCPREPSTN  = 00000988            SS$_MBTOOSML   = 0000019C            

SS$_ACPVAFUL   = 000002FC            SS$_FCPREWNDERR= 00000890            SS$_MCHECK     = 000002BC            

SS$_ARTRES     = 00000474            SS$_FCPSPACERR = 00000898            SS$_MEDOFL     = 000001A4            

SS$_ASTFLT     = 0000040C            SS$_FCPWRITERR = 000008A0            SS$_MSGNOTFND  = 00000621            

SS$_BADATTRIB  = 00000034            SS$_FILACCERR  = 0000009C            SS$_MTLBLLONG  = 00000304            

SS$_BADCHKSUM  = 00000808            SS$_FILALRACC  = 000000A4            SS$_MUSTCLOSEFL= 00000948            

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            

PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page  22

SYMBOL TABLE                                                                                                                    (12)



SS$_NOHOMEBLK  = 000008E0            SS$_WAITUSRLBL = 00000950            WCB$W_NMAP       00000016            

SS$_NOIOCHAN   = 000001B4            SS$_WASCLR     = 00000001            WCB$W_P1_COUNT   00000024            

SS$_NOLINKS    = 0000027C            SS$_WASECC     = 00000639            WCB$W_P2_COUNT   0000002A            

SS$_NOLOGNAM   = 000001BC            SS$_WASSET     = 00000009            WCB$W_PREVCOUNT  FFFFFFFA            

SS$_NOMBX      = 00000274            SS$_WRITLCK    = 0000025C            WCB$W_REFCNT     0000000E            

SS$_NOMOREFILES= 00000930            SS$_WRONGACP   = 0000031C            WCB$W_SIZE       00000008            

SS$_NONEXDRV   = 000001C4            SYS$ADJWSL       ********   X   03   WSL$C_GBLWRT   = 00000006            

SS$_NONEXPR    = 000008E8            SYS$DELTVA       ********   X   03   WSL$C_GLOBAL   = 00000004            

SS$_NONLOCAL   = 000008F0            VA$M_BYTE      = 000001FF            WSL$C_GPGTBL   = 0000000A            

SS$_NOPRIV     = 00000024            VA$M_P1        = 40000000            WSL$C_LENGTH   = 00000004            

SS$_NORMAL     = 00000001            VA$M_SYSTEM    = 80000000            WSL$C_PPGTBL   = 00000008            

SS$_NOSIGNAL   = 00000900            VA$M_VPG       = FFFFFE00            WSL$C_PROCESS  = 00000000            

SS$_NOSOLICIT  = 00000284            VA$M_VPN       = 3FFFFE00            WSL$C_SYSTEM   = 00000002            

SS$_NOSUCHDEV  = 00000908            VA$S_BYTE      = 00000009            WSL$M_GOODPAGE = 00000040            

SS$_NOSUCHFILE = 00000910            VA$S_VPG       = 00000017            WSL$M_MODIFY   = 00000100            

SS$_NOSUCHNODE = 0000028C            VA$S_VPN       = 00000015            WSL$M_PAGTYP   = 0000000E            

SS$_NOSUCHSEC  = 00000978            VA$V_BYTE      = 00000000            WSL$M_PFNLOCK  = 00000010            

SS$_NOTAPEOP   = 00000264            VA$V_P1        = 0000001E            WSL$M_VALID    = 00000001            

SS$_NOTFILEDEV = 000001CC            VA$V_SYSTEM    = 0000001F            WSL$M_WSLOCK   = 00000020            

SS$_NOTINTBLSZ = 000001D4            VA$V_VPG       = 00000009            WSL$S_PAGTYP   = 00000003            

SS$_NOTLABELMT = 000001DC            VA$V_VPN       = 00000009            WSL$V_GOODPAGE = 00000006            

SS$_NOTMODIFIED= 00000659            WCB$B_ACCESS     0000000B            WSL$V_MODIFY   = 00000008            

SS$_NOTNETDEV  = 000002EC            WCB$B_TYPE       0000000A            WSL$V_PAGTYP   = 00000001            

SS$_NOTRAN     = 00000629            WCB$C_LENGTH     00000024            WSL$V_PFNLOCK  = 00000004            

SS$_NOTSQDEV   = 000001E4            WCB$C_MAP        00000024            WSL$V_VALID    = 00000000            

SS$_OPCCUS     = 00000434            WCB$K_LENGTH     00000024            WSL$V_WSLOCK   = 00000005            

SS$_OPCDEC     = 0000043C            WCB$K_MAP        00000024            

SS$_OPINCOMPL  = 000002D4            WCB$L_FCB        00000018            

SS$_PAGOWNVIO  = 000001EC            WCB$L_LBN        00000002            

SS$_PAGRDERR   = 00000444            WCB$L_ORGUCB     00000010            

SS$_PARITY     = 000001F4            WCB$L_P1_LBN     00000026            

SS$_PARTESCAPE = 000001FC            WCB$L_P2_LBN     0000002C            

SS$_PFMBSY     = 00000204            WCB$L_PID        0000000C            

SS$_PLHLDR     = 00000404            WCB$L_PREVLBN    FFFFFFFC            

SS$_PSTFULL    = 0000020C            WCB$L_RVT        0000001C            

SS$_RADRMOD    = 0000044C            WCB$L_STVBN      00000020            

SS$_REJECT     = 00000294            WCB$L_WLBL       00000004            

SS$_REMOTE     = 00000649            WCB$L_WLFL       00000000            

SS$_RESIGNAL   = 00000918            WCB$M_NOTFCP   = 00000004            

SS$_RESULTOVF  = 00000214            WCB$M_READ     = 00000001            

SS$_ROPRAND    = 00000454            WCB$M_SHRWCB   = 00000008            

SS$_SECTBLFUL  = 0000021C            WCB$M_WRITE    = 00000002            

SS$_SSFAIL     = 0000045C            WCB$V_DLOCK    = 00000001            

SS$_SUBRNG     = 000004AC            WCB$V_NOREAD   = 0000000A            

SS$_SUPERSEDE  = 00000631            WCB$V_NOTFCP   = 00000002            

SS$_TAPEPOSLOST= 00000224            WCB$V_NOTRUNC  = 0000000B            

SS$_TBIT       = 00000464            WCB$V_NOWRITE  = 00000000            

SS$_TIMEOUT    = 0000022C            WCB$V_READ     = 00000000            

SS$_TOOMANYVER = 00000990            WCB$V_READCK   = 00000009            

SS$_TOOMUCHDATA= 0000029C            WCB$V_SEQONLY  = 00000006            

SS$_UNASEFC    = 00000234            WCB$V_SHRWCB   = 00000003            

SS$_UNSAFE     = 0000023C            WCB$V_SPOOL    = 00000004            

SS$_UNWIND     = 00000920            WCB$V_WRITE    = 00000001            

SS$_UNWINDING  = 00000928            WCB$V_WRITEAC  = 00000008            

SS$_VASFULL    = 00000244            WCB$V_WRITECK  = 00000005            

SS$_VECINUSE   = 0000024C            WCB$W_ACON       00000014            

SS$_VOLINV     = 00000254            WCB$W_COUNT      00000000            

PHDUTL          - PROCESS HEADER UTILITIES                       21-AUG-1978 20:05:03   VAX-11 MACRO X0.3-11               Page  23

PROGRAM SECTION SYNOPSIS                                                                                                        (12)







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       000001E6      03     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  

$MMGCOD          000000E6      04     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  





THERE WERE NO ERRORS OR WARNINGS.

7914. BYTES LEFT IN FREE MEMORY POOL.

2964. BYTES OF RECLAIMED MEMORY.

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

16 MLB DIR RDS - 1043 GETS TO DEFINE 30 MACROS. 79 INTER. FILE WRITES. 

