PRCLM	MACRO M1110  22-AUG-78 01:50  PAGE 3





      1						.TITLE	PRCLM

      2						.IDENT	/06/

      3					                                                                                ;**-1

      4					;

      5					; COPYRIGHT   1975,  DIGITAL EQUIPMENT CORP.,  MAYNARD,   MASS.                 ;**NEW**

      6					;                                                                               ;**-2

      7					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE

      8					; ON A  SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION

      9					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT

     10					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.

     11					;

     12					; THE  INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT

     13					; NOTICE AND  SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL

     14					; EQUIPMENT CORPORATION.

     15					;

     16					; DEC  ASSUMES NO  RESPONSIBILITY  FOR  THE  USE  OR RELIABILITY

     17					; OF ITS  SOFTWARE ON  EQUIPMENT WHICH  IS NOT SUPPLIED BY DEC.

     18					;

     19					; VERSION 06

     20					;

     21					; C. MONIA/D. CUTLER  23-OCT-75

     22					;

     23					; MODIFICATIONS:

     24					;

     25					; NO.		DATE		PROGRAMMER

     26					; ---		----		----------

     27					;

     28					; 048		09-FEB-76	C. MONIA

     29					; 054		27-MAR-76	C. MONIA

     30					; 056		07-APR-76	C. MONIA

     31					; 058		22-APR-76	C. MONIA

     32					; 061		16-MAY-76	C. MONIA

     33					; 065		30-JUN-76	J. KASSON

     34					;

     35					; PROCESS RELOCATABLE OBJECT MODULE

     36					;

     37					; LOCAL DATA

     38					;

     39					;	*** NOTE ***

     40					;

     41					; MODULE 'P3PRE' MUST BE MODIFIED WHENEVER THE CONTENTS OF THIS

     42					; SECTION ARE CHANGED.

     43					;

     44

     45	000000					.PSECT	PRCL$D,D,OVR

     46

     47	000000				CRSCT:	.BLKW	10.		; CURRENT SECTION DATA

     48	000024				CRVSC:	.BLKW	1		; VIRTUAL ADDRESS OF CURRENT SECTION

     49	000026	125257 	003340 		LOADNM:	.RAD50	/$LOAD/		; MANUAL LOAD SUBROUTINE NAME

     50	000032				MODN:	.BLKW	1		; FIRST HALF OF MODULE NAME (ADJ. TO LCLSYM)

     51	000034				LCLSYM:	.BLKW	8.		;LOCAL SYMBOL DESCRIPTOR

     52	000054				SRCPF:	.BLKW	1		;SEARCH PATH FLAG

     53	000056				SRVSG:	.BLKW	1		; VIRTUAL ADDRESS OF SEARCH SEGMENT

     54	000060				SYDEF:	.BLKW	1		;SYMBOL DEFINITION FLAG

     55	000062				SYENT:	.BLKW	1		;SYMBOL ENTRY ADDRESS

     56	000064				SYFLG:	.BLKW	1		; CURRENT SYMBOL FLAGS

     57

PRCLM	MACRO M1110  22-AUG-78 01:50  PAGE 3-1





     58	000000					.PSECT

     59

     60					;+

     61					; **-$PRCLM-PROCESS RELOCATABLE OBJECT MODULE

     62					;

     63					; THIS SUBROUTINE IS CALLED TO PROCESS A RELOCATABLE OBJECT MODULE.

     64					; ALL GLOBAL SYMBOL DIRECTORY RECORDS ARE READ AND ENTERED IN THE

     65					; SECTION AND SYMBOL TABLES FOR THE CURRENT SEGMENT.

     66					;

     67					; INPUTS:

     68					;

     69					;	R4=REAL ADDRESS OF ELEMENT DESCRIPTOR

     70					;	R5=REAL ADDRESS OF CURRENT SEGMENT

     71					;	$CRELM=REAL ADDRESS OF ELEMENT DESCRIPTOR

     72					;	$CRSEG=REAL ADDRESS OF SEGMENT DESCRIPTOT

     73					;	$CRVEL=VIRTUAL ADDRESS OF ELEMENT DESCRIPTOR

     74					;	$CRVSG=VIRTUAL ADDRESS OF SEGMENT DESCRIPTOR

     75					;

     76					; OUTPUTS:

     77					;

     78					;	ALL GLOBAL SYMBOL DIRECTORY RECORDS ARE PROCESSED

     79					;

     80					;-

     81

     82

     83	000000				$PRCLM::			;

     84	000000	010346 				MOV	R3,-(SP)	; SAVE R3

     85	000002				PRCEL1:	CALL	$GTBYT		;GET RECORD LENGTH

     86	000006	103410 				BCS	PRCEL3		;IF CS EOF (ILL FORMAT)

     87	000010	010003 				MOV	R0,R3		;SAVE RECORD LENGTH

     88	000012				PRCEL2:	CALL	$GTWRD		;GET BLOCK TYPE

     89	000016	162703 	000002 			SUB	#2,R3		;ADJUST BYTE COUNT

     90	000022	020027 	000006 			CMP	R0,#LGBLK	;LEGAL BLOCK TYPE?

     91	000026	101401 				BLOS	PRCEL4		;IF LOS YES

     92	000030	005000 			PRCEL3:	CLR	R0		;SET ILLEGAL BLOCK TYPE

     93	000032	006300 			PRCEL4:	ASL	R0		;MAKE WORD INDEX

     94	000034					CALL	@DSPVCT(R0)	;CALL BLOCK DEPENDENT ROUTINE

     95	000040	000760 				BR	PRCEL1		;GO AGAIN

     96

     97					;

     98					; DISPATCH VECTOR

     99					;

    100

    101	000042	000216'			DSPVCT:	.WORD	ILFMT		;BLK 0-ILLEGAL BLOCK TYPE

    102	000044	000060'				.WORD	STGSD		;BLK 1-START GSD

    103	000046	003740'				.WORD	ENGSD		;BLK 2-END GSD

    104	000050	004262'				.WORD	RPEAT		;BLK 3-TXT

    105	000052	004262'				.WORD	RPEAT		;BLK 4-RLD

    106	000054	004262'				.WORD	RPEAT		;BLK 5-ISD

    107	000056	000216'				.WORD	ILFMT		;BLK 6-MODULE END

    108		000006 			LGBLK=<.-DSPVCT-2>/2		;HIGHEST LEGAL BLOCK TYPE

    109

    110					;

    111					; START GSD-BLOCK TYPE 1

    112					;

    113

    114	000060	010346 			STGSD:	MOV	R3,-(SP)	;SAVE BYTE COUNT

PRCLM	MACRO M1110  22-AUG-78 01:50  PAGE 3-2





    115	000062	012703 	000036'			MOV	#LCLSYM+2,R3	; GET ADDRESS TO STORE SYMBOL

    116	000066	012746 	000004 			MOV	#4,-(SP)	;SET LOOP COUNT

    117	000072				10$:	CALL	$GTWRD		;GET A WORD

    118	000076	010023 				MOV	R0,(R3)+	;SAVE IN TEMP BUFFER

    119	000100	005316 				DEC	(SP)		;DECREMENT LOOP COUNT

    120	000102	003373 				BGT	10$		;IF GT GO AGAIN

    121	000104	005726 				TST	(SP)+		;REMOVE COUNT WORD FROM STACK

    122	000106	012603 				MOV	(SP)+,R3	;RETRIEVE BYTE COUNT

    123	000110	162703 	000010 			SUB	#8.,R3		;ADJUST FOR SYMBOL ENTRY

    124	000114	012701 	000034'			MOV	#LCLSYM,R1	;GET ADDR OF SYMBOL DESCRIPTOR

    125	000120	116102 	000001G			MOVB	S$YFLG+1(R1),R2	; GET TYPE OF GSD ENTRY

    126	000124	105061 	000001G			CLRB	S$YFLG+1(R1)	; CLEAR HIGH FLAGS WORD BYTE

    127	000130	020227 	000007 			CMP	R2,#LGTYP	;LEGAL TYPE?

    128	000134	101030 				BHI	ILFMT		;IF HI ILLEGAL FORMAT

    129	000136	006302 				ASL	R2		;MAKE WORD INDEX

    130	000140	010500 				MOV	R5,R0		;ADDRESS OF CURRENT SEGMENT TO R0

    131	000142					CALL	@GSDVCT(R2)	;DISPATCH TO ROUTINE

    132	000146	005703 				TST	R3		;ANY MORE TO PROCESS?

    133	000150	003343 				BGT	STGSD		;IF GT YES

    134	000152					RETURN			;

    135

    136					;

    137					; GSD ENTRY TYPE DISPATCH TABLE

    138					;

    139					;	*** NOTE ***

    140					;

    141					; MODULE 'P3PRE' MUST BE MODIFIED WHENEVER THE CONTENTS OF THIS

    142					; SECTION CHANGE.

    143					;

    144

    145	000000					.PSECT	GSDV$D,D,OVR

    146

    147

    148	000000	000154'			GSDVCT:	.WORD	MODNME		;MODULE NAME

    149	000002	000236'				.WORD	SCTNME		;SECTION NAME

    150	000004	001326'				.WORD	INTSYM		;INTERNAL SYMBOL

    151	000006	001330'				.WORD	XFRADR		;TRANSFER ADDRESS

    152	000010	001540'				.WORD	SYMDCL		;SYMBOL DECLARATION

    153	000012	000302'				.WORD	PSTNME		;PROGRAM SECTION NAME

    154	000014	003550'				.WORD	VIDENT		;VERSION IDENTIFICATION

    155	000016	003624'				.WORD	VSTNME		;VIRTUAL ARRAY STORAGE SECTION NAME

    156		000007 			LGTYP=<.-GSDVCT-2>/2		;HIGHEST LEGAL GSD TYPE

    157

    158	000154					.PSECT

    159

    160

    161					;

    162					; MODULE NAME

    163					;

    164

    165	000154	005764 	000000G		MODNME:	TST	E$LMOD(R4)	;MODULE NAME ALREADY DEFINED?

    166	000160	001016 				BNE	ILFMT		;IF NE YES

    167	000162	012700 	000040'			MOV	#LCLSYM+4,R0	; GET ADDRESS OF SECOND HALF OF SYMBOL

    168	000166	012701 	000032'			MOV	#MODN,R1	; GET ADDRESS TO STORE MODULE NAME

    169	000172	011064 	000002G			MOV	(R0),E$LMOD+2(R4);SET SECOND HALF OF MODULE NAME

    170	000176	014064 	000000G			MOV	-(R0),E$LMOD(R4);SET FIRST HALF OF MODULE NAME

    171	000202	012021 				MOV	(R0)+,(R1)+	;SET MODULE NAME IN LOCAL SYM DESCRIPTOR

PRCLM	MACRO M1110  22-AUG-78 01:50  PAGE 3-3





    172	000204	011011 				MOV	(R0),(R1)	;

    173	000206	016701 	000000G			MOV	$CRVEL,R1	; GET VIRTUAL ADDRESS OF CURRENT ELEMENT

    174	000212					CALLR	$WRMPG		; WRITE-MARK PAGE

    175

    176					;

    177					; ILLEGAL FORMAT-BLOCK TYPES 0 AND 6

    178					;

    179

    180	000216	016702 	000000G		ILFMT:	MOV	$INPPT,R2	;GET INPUT FILE RECORD BLOCK

    181	000222	016202 	000000G			MOV	R$NAME(R2),R2	;GET ADDRESS OF NAME STRING

    182	000226	012701 				MOV	(PC)+,R1	;GET ERROR/SEVERITY

    183	000230	   000G	   000G			.BYTE	E$R14,S$V2	;FATAL-NO RETURN

    184	000232					CALL	$ERMSG		;OUTPUT ERROR MESSAGE

    185

    186					;

    187					; SECTION AND PROGRAM SECTION NAME

    188					;

    189

    190	000236	012702 	000000G		SCTNME:	MOV	#$ABSCT,R2	;GET ADDRESS OF ABS SECTION ENTRY

    191	000242	116261 	000000G	000000G		MOVB	C$SFLG(R2),C$SFLG(R1);ASSUME ABS SECTION

    192	000250	026261 	000000G	000000G		CMP	S$YM(R2),S$YM(R1);ABS SECTION?

    193	000256	001411 				BEQ	PSTNME		;IF EQ YES

    194	000260	152761 	000000G	000000G		BISB	#CS$REL,C$SFLG(R1);ASSUME NAMED REL SECTION

    195	000266	005761 	000000G			TST	S$YM(R1)	;NAMED SECTION?

    196	000272	001003 				BNE	PSTNME		;IF NE YES

    197	000274	142761 	000000C	000000G		BICB	#<CS$GBL!CS$ALO>,C$SFLG(R1) ; CLEAR GLOBAL, OVERLAYED FLAGS

    198	000302				PSTNME:				;

    199	000302	010102 				MOV	R1,R2		; COPY DESCRIPTOR ADDRESS

    200	000304	062702 	000000G			ADD	#C$SFLG,R2	; POINT TO FLAGS

    201	000310	142712 	000000C			BICB	#<CS$IND!CS$MEM>,(R2) ; CLEAR MEMORY, INDIRECT FLAGS

    202	000314	132712 	000000G			BITB	#CS$REL,(R2)	; SECTION RELOCATABLE

    203	000320	001415 				BEQ	1$		; IF EQ NO

    204	000322	132712 	000000G			BITB	#CS$TYP,(R2)	; DATA SECTION?

    205	000326	001012 				BNE	1$		; IF NE YES

    206	000330	012702 	000044'			MOV	#LCLSYM+10,R2	; POINT TO SECTION LENGTH

    207	000334	032712 	000001 			BIT	#1,(R2)		; LENGTH ON BYTE BOUNDARY?

    208	000340	001405 				BEQ	1$		; IF EQ NO

    209	000342	005212 				INC	(R2)		; INCREMENT LENGTH

    210	000344	001003 				BNE	1$		; IF NE OK

    211	000346	012701 	000000C			MOV	#<S$V0*400!E$R19>,R1 ; P-SECTION OVERFLOW

    212	000352	000415 				BR	2$		;

    213	000354				1$:				;

    214	000354	132761 	000000G	000000G		BITB	#CS$LIB,C$SFLG(R1) ; LIBRARY SECTION?

    215	000362	001420 				BEQ	3$		;IF EQ NO

    216	000364	132764 	000000G	000000G		BITB	#SW$RL,E$LSWT(R4);LIB SECTION LEGAL?

    217	000372	001014 				BNE	3$		;IF NE YES

    218	000374	142761 	000000G	000000G		BICB	#CS$LIB,C$SFLG(R1) ; CLEAR LIBRARY FLAG

    219	000402	012701 				MOV	(PC)+,R1	;ILLEGAL REFERENCE TO LIBRARY SECTION

    220	000404	   000G	   000G			.BYTE	E$R60,S$V0	;DIAGNOSTIC

    221	000406				2$:				;

    222	000406	012702 	000036'			MOV	#LCLSYM+2,R2	; POINT TO SYMBOL NAME

    223	000412					CALL	$ERMSG		;OUTPUT ERROR MESSAGE

    224	000416	012701 	000034'			MOV	#LCLSYM,R1	;RETRIEVE ADDRESS OF LOCAL STORAGE

    225	000422	010500 				MOV	R5,R0		;RESET SEGMENT DESCRIPTOR ADDRESS

    226	000424	132761 	000000G	000000G	3$:	BITB	#CS$GBL,C$SFLG(R1);LOCAL SECTION?

    227	000432	001513 				BEQ	50$		;IF EQ YES

    228	000434	012746 	000000G			MOV	#$WSRCC,-(SP)	;SET ADDRESS OF SEARCH ROUTINE

PRCLM	MACRO M1110  22-AUG-78 01:50  PAGE 3-4





    229	000440				5$:	CALL	@(SP)+		;SEARCH FOR SECTION

    230	000442	103516 				BCS	60$		;IF CS NO FIND EM

    231	000444	001004 				BNE	7$		;IF NE FOUND ON PATH UP OR DOWN

    232	000446	016701 	000000G			MOV	$CRVSM,R1	; GET VIRTUAL ADDRESS OF SECTION

    233	000452	000167 	000374 			JMP	SCTCHK		;FOUND IN CURRENT SEGMENT

    234	000456	132760 	000000G	000000G	7$:	BITB	#CS$GBL,C$SFLG(R0);GLOBAL SECTION?

    235	000464	001765 				BEQ	5$		;IF EQ NO

    236

    237					;

    238					; FOUND ON PATH UP OR DOWN

    239					;

    240

    241	000466	005067 	000060'			CLR	SYDEF		;CLEAR DEFINITION FOUND FLAG

    242	000472					CALL	30$		;SET UP SEARCH PARAMETERS

    243	000476				10$:	CALL	@(SP)+		;CONTINUE SEARCH

    244	000500	103411 				BCS	20$		;IF CS DONE

    245	000502	132760 	000000G	000000G		BITB	#CS$GBL,C$SFLG(R0);GLOBAL SECTION?

    246	000510	001772 				BEQ	10$		;IF EQ NO

    247	000512					CALL	30$		;COMPARE PARAMETERS

    248	000516	103367 				BCC	10$		;IF CC CONTINUE SEARCH

    249	000520	005726 				TST	(SP)+		;CLEAN STACK

    250	000522	000450 				BR	40$		;AMBIGUOUS DEFINITION

    251

    252					;

    253					; ALL PATHS SEARCHED-ALLOCATE INDIRECT CONTROL SECTION ENTRY

    254					;

    255

    256	000524	005767 	000060'		20$:	TST	SYDEF		;DEFINITION FOUND?

    257	000530	001445 				BEQ	40$		;IF EQ NO

    258	000532	012701 	000002G			MOV	#C$SELM+2,R1	; GET SIZE OF INDIRECT ENTRY

    259	000536					CALL	$ALSVB		; ALLOCATE SMALL VIRTUAL CORE BLOCK

    260	000542	016760 	000060'	000000G		MOV	SYDEF,C$SBSE(R0);SET INDIRECT ENTRY ADDRESS

    261	000550	016760 	000056'	000000G		MOV	SRVSG,C$SLTH(R0) ; SET VIRTUAL ADDRESS OF SEGMENT DECRIPTOR

    262	000556	152760 	000000C	000000G		BISB	#<CS$IND!CS$GBL>,C$SFLG(R0) ; SET INDIRECT GLOBAL FLAGS

    263	000564	012702 	000034'			MOV	#LCLSYM,R2	; GET LOCAL DESCRIPTOR ADDRESS

    264	000570	000463 				BR	70$		;

    265					;

    266					; COMPARE PARAMETERS

    267					;

    268

    269	000572				30$:				;

    270	000572	016701 	000000G			MOV	$CRVSM,R1	; GET VIRTUAL ADDRESS OF SYMBOL

    271	000576	132760 	000000G	000000G		BITB	#CS$IND,C$SFLG(R0) ; INDIRECT REFERENCE?

    272	000604	001403 				BEQ	32$		; IF EQ NO

    273	000606	016001 	000000G			MOV	C$SBSE(R0),R1	; GET VA OF REAL ENTRY

    274	000612	000405 				BR	34$		;

    275	000614				32$:				;

    276	000614	010167 	000060'			MOV	R1,SYDEF	; SET DEFINITION FOUND FLAG

    277	000620	016767 	000000G	000056'		MOV	$CRVSR,SRVSG	; SAVE VIRTUAL ADDRESS OF SEARCH SEGMENT

    278	000626				34$:				;

    279	000626	020167 	000062'			CMP	R1,SYENT	; SAME AS LAST REFERENCE?

    280	000632	001401 				BEQ	36$		; IF EQ YES

    281	000634	000261 				SEC			; SET CARRY

    282	000636				36$:				;

    283	000636	010167 	000062'			MOV	R1,SYENT	; SET ADDRESS OF LAST ENTRY

    284	000642					RETURN			;

    285

PRCLM	MACRO M1110  22-AUG-78 01:50  PAGE 3-5





    286					;

    287					; AMBIGUOUS CONTROL SECTION DEFINITION

    288					;

    289

    290	000644				40$:				;

    291	000644	012702 	000032'			MOV	#MODN,R2	; GET ADDRESS OF MODULE NAME

    292	000650	012701 				MOV	(PC)+,R1	;GET ERROR/SEVERITY

    293	000652	   000G	   000G			.BYTE	E$R15,S$V0	;DIAGNOSTIC

    294	000654					CALL	$ERMSG		;OUTPUT ERROR MESSAGE

    295	000660	000407 				BR	60$		;

    296

    297					;

    298					; LOCAL CONTROL SECTION

    299					;

    300

    301	000662	062700 	000000G		50$:	ADD	#S$GCST,R0	;POINT TO CONTROL SECTION TABLE HEADER

    302	000666					CALL	$SRCH		;SEARCH FOR SECTION ENTRY

    303	000672	010146 				MOV	R1,-(SP)	; ASSUME FOUND

    304	000674	103066 				BCC	SCTCHK		;IF CC YES

    305	000676	005726 				TST	(SP)+		;CLEAN STACK

    306	000700	012701 	000000G		60$:	MOV	#C$SLGH,R1	;GET LENGTH OF SECTION TABLE ENTRY

    307	000704					CALL	$ALSVB		; ALLOCATE SMALL VIRTUAL CORE BLOCK

    308	000710	012702 	000034'			MOV	#LCLSYM,R2	; GET ADDRESS OF LOCAL DESCRIPTOR

    309	000714	016260 	000000G	000000G		MOV	C$SFLG(R2),C$SFLG(R0)	; COPY FLAGS WORD

    310	000722	132760 	000000G	000000G		BITB	#CS$LIB,C$SFLG(R0);LIB SECTION?

    311	000730	001403 				BEQ	70$		;IF EQ NO

    312	000732	016760 	000044'	000000G		MOV	LCLSYM+10,C$SLTH(R0) ; ESTABLISH LENGTH OF SECTION

    313	000740				70$:				;

    314	000740	016760 	000000G	000000G		MOV	$CRVEL,C$SELM(R0) ; SET ELEMENT DESCRIPTOR BACKPOINTER

    315	000746	016260 	000000G	000000G		MOV	S$YM(R2),S$YM(R0) ; INSERT SYMBOL IN ENTRY

    316	000754	016260 	000002G	000002G		MOV	S$YM+2(R2),S$YM+2(R0) ;

    317	000762	010146 				MOV	R1,-(SP)	; SAVE ENTRY ADDRESS

    318	000764	016700 	000000G			MOV	$CRVSG,R0	; GET VIRTUAL ADDRESS OF CURRENT

    319	000770	062700 	000000C			ADD	#S$GCST/2,R0	; POINT TO SECTION TABLE HEADER

    320	000774					CALL	$SRCHI		;SEARCH FOR INSERT

    321	001000					CALL	$ISYM		;INSERT SYMBOL

    322	001004	032767 	000000G	000000G		BIT	#SE$QA,$SWTCH	;SEQUENCE ALLOCATION?

    323	001012	001414 				BEQ	80$		;IF EQ NO

    324	001014	012701 	000000G			MOV	#S$ZSEQ,R1	;GET SIZE OF SEQUENCE LIST ENTRY

    325	001020					CALL	$ALBLK		;ALLOCATE STORAGE

    326	001024	011660 	000002 			MOV	(SP),2(R0)	;SET ADDRESS OF SECTION TABLE ENTRY

    327	001030	016701 	000000G			MOV	$CRSEG,R1	;GET ADDRESS OF CURRENT SEGMENT

    328	001034	010071 	000002G			MOV	R0,@S$GSEQ+2(R1);LINK NEW ENTRY TO OLD LAST

    329	001040	010061 	000002G			MOV	R0,S$GSEQ+2(R1)	;SET NEW LAST ENTRY

    330	001044				80$:				;

    331	001044	011601 				MOV	(SP),R1		; RETRIEVE ENTRY ADDRESS

    332	001046					CALL	$CVRL		; CONVERT TO REAL ADDRESS

    333

    334					;

    335					; CHECK FOR EQUIVALENT CONTROL SECTION DEFINITIONS

    336					;

    337

    338	001052	132760 	000000G	000000G	SCTCHK:	BITB	#CS$IND,C$SFLG(R0);INDIRECT REFERENCE?

    339	001060	001404 				BEQ	10$		;IF EQ NO

    340	001062	016001 	000000G			MOV	C$SBSE(R0),R1	; GET ADDRESS OF REAL ENTRY

    341	001066					CALL	$CVRL		; CONVERT TO REAL ADDRESS

    342	001072				10$:				;

PRCLM	MACRO M1110  22-AUG-78 01:50  PAGE 3-6





    343	001072	010116 				MOV	R1,(SP)		; SAVE VIRTUAL ADDRESS OF ENTRY

    344	001074	010046 				MOV	R0,-(SP)	; SAVE REAL ADDRESS OF ENTRY

    345	001076	012701 	000000'			MOV	#CRSCT,R1	; POINT TO LOCAL STORAGE

    346	001102	012702 	000000C			MOV	#C$SLGH/2,R2	; GET LENGTH OF SECTION ENTRY

    347	001106				15$:				;

    348	001106	012021 				MOV	(R0)+,(R1)+	; COPY SECTION ENTRY

    349	001110					SOB	R2,15$		; REPEAT

    350	001114	012600 				MOV	(SP)+,R0	; RESTORE R0

    351	001116	012702 	000034'			MOV	#LCLSYM,R2	;GET ADDR OF LOCAL DESCRIPTOR

    352	001122	016001 	000000G			MOV	C$SFLG(R0),R1	;GET TABLE ENTRY FLAGS

    353	001126	016200 	000000G			MOV	C$SFLG(R2),R0	;GET LOCAL ENTRY FLAGS

    354	001132	032701 	000000G			BIT	#CS$LIB,R1	;TABLE ENTRY LIB SECTION?

    355	001136	001404 				BEQ	20$		;IF EQ NO

    356	001140	042701 	000000G			BIC	#CS$LIB,R1	;CLEAR LIBRARY FLAG

    357	001144	042700 	000000G			BIC	#CS$LIB,R0	;CLEAR LIBRARY FLAG

    358	001150				20$:				;

    359	001150	042700 	000000G			BIC	#CS$ATL,R0	; CLEAR POSSIBLE AUTOLOAD FLAG

    360	001154	042701 	000000G			BIC	#CS$ATL,R1	; CLEAR POSSIBLE AUTOLOAD FLAG

    361	001160	020001 				CMP	R0,R1		;EQUIVALENT?

    362	001162	001405 				BEQ	SCTCMT		;IF EQ YES

    363	001164	012701 				MOV	(PC)+,R1	;GET ERROR/SEVERITY

    364	001166	   000G	   000G			.BYTE	E$R16,S$V0	;DIAGNOSTIC

    365	001170	005742 				TST	-(R2)		; POINT TO FIRST HALF OF MODULE NAME

    366	001172					CALL	$ERMSG		;OUTPUT ERROR MESSAGE

    367

    368					;

    369					; BUILD CONTROL SECTION MAPPING TABLE ENTRY

    370					;

    371

    372	001176	010346 			SCTCMT:	MOV	R3,-(SP)	;SAVE R3

    373	001200	016701 	000000G			MOV	$CRVEL,R1	; GET VIRTUAL ADDRESS OF CURRENT

    374	001204	001402 				BEQ	5$		; IF EQ DUMMY ELEMENT

    375	001206					CALL	$WRMPG		; WRITE MARK ELEMENT DESCRIPTOR

    376	001212				5$:				;

    377	001212	005264 	000000G			INC	E$LNUM(R4)	;INCREMENT SECTION NUMBER

    378	001216	016401 	000000G			MOV	E$LNUM(R4),R1	;GET HIGHEST SECTION NUMBER

    379	001222	010103 				MOV	R1,R3		;SAVE FOR LATER

    380	001224	005201 				INC	R1		;INCREMENT TO NEXT SECTION NUMBER

    381	001226	006301 				ASL	R1		;CONVERT TO BYTES

    382	001230	006301 				ASL	R1		;

    383	001232					CALL	$ALBLK		;ALLOCATE STORAGE

    384	001236	010046 				MOV	R0,-(SP)	;SAVE NEW TABLE ADDRESS

    385	001240	016401 	000000G			MOV	E$LCMT(R4),R1	;GET ADDRESS OF CURRENT TABLE

    386	001244	001417 				BEQ	20$		;IF EQ NONE

    387	001246	006303 				ASL	R3		;CONVERT SECTION NUMBER TO WORD COUNT

    388	001250	010302 				MOV	R3,R2		;SET LOOP COUNT

    389	001252	012120 			10$:	MOV	(R1)+,(R0)+	;MOVE CMT TO NEW LOCATION

    390	001254					SOB	R2,10$		;REPEAT

    391	001260	010046 				MOV	R0,-(SP)	;SAVE ADDR OF NEXT IN TABLE

    392	001262	012700 	000000G			MOV	#$FRHD,R0	;GET ADDRESS OF FRRE SPACE HEADER

    393	001266	010301 				MOV	R3,R1		;SET SIZE OF BLOCK TO RELEASE

    394	001270	006301 				ASL	R1		;CONVERT WORD COUNT TO BYTE COUNT

    395	001272	016402 	000000G			MOV	E$LCMT(R4),R2	;GET ADDRESS OF BLOCK TO RELEASE

    396	001276					CALL	$RLCB		;RELEASE OLD TABLE

    397	001302	012600 				MOV	(SP)+,R0	;RETRIEVE NEXT IN TABLE

    398	001304	012664 	000000G		20$:	MOV	(SP)+,E$LCMT(R4);SET ADDRESS OF NEW CMT TABLE

    399	001310	012603 				MOV	(SP)+,R3	;RESTORE R3

PRCLM	MACRO M1110  22-AUG-78 01:50  PAGE 3-7





    400	001312	012610 				MOV	(SP)+,(R0)	;SET LINK TO TABLE ENTRY

    401	001314	012067 	000024'			MOV	(R0)+,CRVSC	; SET VIRTUAL ADDRESS OF CURRENT SEGMENT

    402	001320	016710 	000044'			MOV	LCLSYM+10,(R0)	; SET MAX LENGTH OF SECTION

    403	001324					RETURN			;

    404

    405					;

    406					; INTERNAL SYMBOL

    407					;

    408

    409	001326				INTSYM:	RETURN			;IGNOR-UNSUPPORTED FEATURE

    410

    411					;

    412					; TRANSFER ADDRESS

    413					;

    414

    415	001330				XFRADR:				;

    416	001330	022767 	000001 	000044'		CMP	#1,LCLSYM+10	; DUMMY TRANSFER ADDRESS

    417	001336	001477 				BEQ	60$		;IF EQ YES

    418	001340	026767 	000000G	000000G		CMP	$CRVSG,$RTSEG	; CURRENT=ROOT?

    419	001346	001061 				BNE	40$		;IF NE NO

    420	001350	012702 	000000G			MOV	#$XFRAD,R2	;ASSUME TASK XFR ADDRESS

    421	001354	032764 	000000G	000000G		BIT	#SW$DA,E$LSWT(R4);DEBUGGING AID?

    422	001362	001402 				BEQ	10$		;IF EQ NO

    423	001364	012702 	000000G			MOV	#$ODTAD,R2	;SET ODT XFR ADDRESS

    424	001370	022712 	000001 		10$:	CMP	#1,(R2)		;XFR ADDRESS ALREADY DEFINED?

    425	001374	001033 				BNE	30$		;IF NE YES

    426	001376	010246 				MOV	R2,-(SP)	;SAVE VECTOR ADDRESS

    427	001400	062700 	000000G			ADD	#S$GCST,R0	;POINT TO SECTION TABLE HEADER

    428	001404					CALL	$SRCH		;SEARCH SECTION TABLE

    429	001410	011602 				MOV	(SP),R2		; RETRIEVE VECTOR ADDRESS

    430	001412	010116 				MOV	R1,(SP)		; SAVE VIRTUAL ADDRESS OF ENTRY

    431	001414	103436 				BCS	40$		;IF CS NO FIND EM

    432	001416	132760 	000000G	000000G		BITB	#CS$IND,C$SFLG(R0);INDIRECT REFERENCE?

    433	001424	001032 				BNE	40$		;IF NE YES

    434	001426	016701 	000044'			MOV	LCLSYM+10,R1	; GET OFFSET ADDRESS

    435	001432	132760 	000000G	000000G		BITB	#CS$REL,C$SFLG(R0);ABS SECTION?

    436	001440	001403 				BEQ	20$		;IF EQ YES

    437	001442	066001 	000000G			ADD	C$SCUR(R0),R1	;ADD IN CURRENT BASE

    438	001446	103421 				BCS	40$		;IF CS ADDRESS OVERFLOW

    439	001450	032701 	000001 		20$:	BIT	#1,R1		;ODD ADDRESS?

    440	001454	001016 				BNE	40$		;IF NE YES

    441	001456	010122 				MOV	R1,(R2)+	;SET TRANSFER ADDRESS

    442	001460	012612 				MOV	(SP)+,(R2)	; SET SECTION TABLE ENTRY ADDRESS

    443	001462	000425 				BR	60$		;

    444

    445					;

    446					; MULTIPLE DEFINITION OF TRANSFER ADDRESS

    447					;

    448

    449	001464				30$:				;

    450	001464	012702 	000032'			MOV	#MODN,R2	; POINT TO MODULE NAME

    451	001470	016562 	000000G	000004 		MOV	S$GNME(R5),4(R2);INSERT SEGMENT NAME

    452	001476	016562 	000002G	000006 		MOV	S$GNME+2(R5),6(R2);

    453	001504	012701 				MOV	(PC)+,R1	;GET ERROR/SEVERITY

    454	001506	   000G	   000G			.BYTE	E$R17,S$V0	;DIAGNOSTIC

    455	001510	000410 				BR	50$		;

    456

PRCLM	MACRO M1110  22-AUG-78 01:50  PAGE 3-8





    457					;

    458					; ILLEGAL TRANSFER ADDRESS

    459					;

    460

    461	001512				40$:				;

    462	001512	005726 				TST	(SP)+		; CLEAN STACK

    463	001514	012702 	000032'			MOV	#MODN,R2	; POINT TO MODULE NAME

    464	001520	016262 	000012 	000010 		MOV	10.(R2),8.(R2)	;MOVE OFFSET ADDRESS

    465	001526	012701 				MOV	(PC)+,R1	;GET ERROR/SEVERITY

    466	001530	   000G	   000G			.BYTE	E$R18,S$V0	;DIAGNOSTIC

    467	001532				50$:	CALL	$ERMSG		;OUTPUT ERROR MESSAGE

    468	001536				60$:	RETURN			;

    469

    470					;

    471					; SYMBOL DECLARATION

    472					;

    473

    474	001540	010346 			SYMDCL:	MOV	R3,-(SP)	;SAVE R3

    475	001542	010103 				MOV	R1,R3		;COPY LOCAL DESCRIPTOR ADDRESS

    476	001544	116302 	000000G			MOVB	S$YFLG(R3),R2	; COPY FLAGS

    477	001550	142763 	000000G	000000G		BICB	#SY$LIB,S$YFLG(R3);CLEAR LIBRARY DEFINITION FLAG

    478	001556	032764 	000000G	000000G		BIT	#SW$RL,E$LSWT(R4);RESIDENT LIBRARY ELEMENT?

    479	001564	001416 				BEQ	5$		; IF EQ NO

    480	001566	132702 	000000G			BITB	#SY$LIB,R2	; LIBRARY RELOCATION PERFORMED?

    481	001572	001410 				BEQ	3$		; IF EQ NO

    482	001574	016402 	000000G			MOV	E$LLGH(R4),R2	; GET LIBRARY LIST ADDRESS

    483	001600	066263 	000000G	000000G		ADD	L$DSA(R2),S$YVAL(R3) ; RELOCATE SYMBOL

    484	001606	142763 	000000G	000000G		BICB	#SY$REL,S$YFLG(R3) ; MAKE SYMBOL ABSOLUTE

    485	001614				3$:				;

    486	001614	152763 	000000G	000000G		BISB	#SY$LIB,S$YFLG(R3);SET LIBRARY DEFINITION FLAG

    487	001622	132763 	000000G	000000G	5$:	BITB	#SY$DEF,S$YFLG(R3);SYMBOL DEFINITION?

    488	001630	001446 				BEQ	30$		;IF EQ NO

    489	001632	032764 	000000G	000000G		BIT	#SW$MA,E$LSWT(R4) ; ELEMENT INCLUDED IN MAP?

    490	001640	001403 				BEQ	6$		; IF EQ YES

    491	001642	152763 	000000G	000001G		BISB	#SY$EXC,S$YFLG+1(R3) ; SET EXCLUSION FLAG

    492	001650				6$:				;

    493	001650	012700 	000000'			MOV	#CRSCT,R0	; GET POINTER TO CURRENT SECTION DATA

    494	001654	132760 	000000G	000000G		BITB	#CS$REL,C$SFLG(R0) ; ABS SECTION?

    495	001662	001431 				BEQ	30$		; IF EQ YES

    496	001664	132760 	000000G	000000G		BITB	#CS$ALO,C$SFLG(R0) ; OVERLAID?

    497	001672	001003 				BNE	10$		; IF NE YES

    498	001674	066063 	000000G	000000G		ADD	C$SCUR(R0),S$YVAL(R3) ; ADD RELOCATION BIAS

    499	001702				10$:				;

    500	001702	132760 	000000G	000000G		BITB	#CS$TYP,C$SFLG(R0) ; "I" SECTION?

    501	001710	001016 				BNE	30$		; IF NE NO

    502	001712	132760 	000000G	000000G		BITB	#CS$ATL,C$SFLG(R0) ; SECTION AUTOLOAD?

    503	001720	001007 				BNE	20$		;IF NE YES

    504	001722	032764 	000000G	000000G		BIT	#SW$AL,E$LSWT(R4);ELEMENT AUTOLOAD?

    505	001730	001003 				BNE	20$		;IF NE YES

    506	001732	105765 	000001G			TSTB	S$GSTS+1(R5)	;SEGMENT AUTOLOAD?

    507	001736	001403 				BEQ	30$		;IF EQ NO

    508	001740	152763 	000000G	000000G	20$:	BISB	#SY$ATL,S$YFLG(R3);SET AUTOLOAD FLAG

    509	001746				30$:				;

    510	001746	026727 	000000G	000000G		CMP	$SZSEG,#S$ZSEG	; RESIDENT SEGMENT DESCRIPTOR MAX LENGTH?

    511	001754	103017 				BHIS	40$		; IF HIS YES, NO FURTHER TESTS NEEDED

    512	001756	132763 	000000G	000000G		BITB	#SY$DEF,S$YFLG(R3) ; SYMBOL REFERENCE?

    513	001764	001013 				BNE	40$		; IF NE NO

PRCLM	MACRO M1110  22-AUG-78 01:50  PAGE 3-9





    514	001766	026367 	000000G	000026'		CMP	S$YM(R3),LOADNM	; MANUAL LOAD CALL

    515	001774	001007 				BNE	40$		; IF NE NO

    516	001776	026367 	000002G	000030'		CMP	S$YM+2(R3),LOADNM+2 ; CHECK SECOND HALF OF NAME

    517	002004	001003 				BNE	40$		; NOT MANUAL LOAD REFERENCE

    518	002006	062767 	000004 	000000G		ADD	#4,$SZSEG	; INCREASE RESIDENT SEGMENT DESCRIPTOR SIZE

    519	002014				40$:				;

    520	002014	012767 	177777 	000060'		MOV	#-1,SYDEF	; SET PASS COUNT FLAG

    521	002022	012746 	000000G			MOV	#$WSRCS,-(SP)	;SET ADDRESS OF SEARCH ROUTINE

    522	002026				SYMSRC:	CALL	@(SP)+		;SEARCH FOR SYMBOL

    523	002030	103002 				BCC	1$		;IF CC FOUND ENTRY

    524	002032	000167 	001224 			JMP	SYMINS		;

    525	002036	132763 	000000G	000000G	1$:	BITB	#SY$DEF,S$YFLG(R3);CURRENT SYMBOL DEFINITION?

    526	002044	001177 				BNE	SYMDEF		;IF NE YES

    527

    528					;

    529					; CURRENT IS SYMBOL REFERENCE

    530					;

    531

    532	002046	012602 				MOV	(SP)+,R2	;CLEAN STACK BUT SAVE ADDRESS

    533	002050	005701 				TST	R1		; FIND IN CURRENT SEGMENT?

    534	002052	001031 				BNE	5$		; IF NE NO

    535	002054	012702 	000000G			MOV	#SY$WK,R2	; COPY FLAG

    536	002060	062700 	000000G			ADD	#S$YFLG,R0	; POINT TO FLAGS BYTE

    537	002064	062703 	000000G			ADD	#S$YFLG,R3	; ...

    538	002070	130213 				BITB	R2,(R3)		; HAVE WEAK REFERENCE?

    539	002072	001062 				BNE	33$		; IF NE YES, IGNORE

    540	002074	130210 				BITB	R2,(R0)		; FIND WEAK REFERENCE?

    541	002076	001460 				BEQ	33$		; IF EQ NO

    542	002100	140210 				BICB	R2,(R0)		; CLEAR FLAG

    543	002102	016760 	000024'	000000C		MOV	CRVSC,S$YCMT-S$YFLG(R0) ; SET ADDRESS OF CURRENT SECTION

    544	002110	016701 	000000G			MOV	$CRVSM,R1	; GET VIRTUAL ADDRESS OF REFERENCE

    545	002114					CALL	$WRMPG		; WRITE-MARK PAGE

    546	002120	005267 	000000G			INC	$MSYMC		; INCREMENT MASTER UNDEFINED COUNT

    547	002124	005265 	000000G			INC	S$GUND(R5)	; INCREMENT SEGMENT UNDEFINED COUNT

    548	002130					CALL	$BLDRF		; BUILD REFERENCE LIST ENTRY

    549	002134	000441 				BR	33$		;

    550	002136				5$:				;

    551	002136	010246 				MOV	R2,-(SP)	;RESTORE RETURN ADDRESS

    552	002140	012702 	000060'			MOV	#SYDEF,R2	;GET ADDRESS OF FOUND SYMBOL FLAG

    553	002144	005212 				INC	(R2)		;INCREMENT FLAG TO RECORD BEEN HERE

    554	002146	132760 	000000G	000000G		BITB	#SY$DEF,S$YFLG(R0);SYMBOL DEFINITION?

    555	002154	001724 				BEQ	SYMSRC		;IF EQ NO-CONTINUE SEARCH

    556	002156	005712 				TST	(R2)		;TEST FOUND FLAG

    557	002160	001013 				BNE	20$		;IF NE BEEN HERE MORE THAN ONCE

    558	002162					CALL	40$		;SET UP INITIAL PARAMETERS

    559	002166				10$:	CALL	@(SP)+		;CONTINUE SEARCH

    560	002170	103411 				BCS	30$		;IF CS DONE

    561	002172	132760 	000000G	000000G		BITB	#SY$DEF,S$YFLG(R0);SYMBOL DEFINED?

    562	002200	001403 				BEQ	20$		;IF EQ NO

    563	002202					CALL	40$		;COMPARE PARAMETERS

    564	002206	103367 				BCC	10$		;IF CC OKAY

    565	002210	005726 			20$:	TST	(SP)+		;CLEAN STACK

    566	002212	000504 				BR	80$		;AMBIGUOUS SYMBOL DEFINITION

    567

    568					;

    569					; ALL PATHS SEARCHED-ALLOCATE INDIRECT SYMBOL TABLE ENTRY

    570					;

PRCLM	MACRO M1110  22-AUG-78 01:50  PAGE 3-10





    571

    572	002214	005767 	000060'		30$:	TST	SYDEF		;DEFINITION FOUND?

    573	002220	001501 				BEQ	80$		;IF EQ NO-AMBIGUOUS DEFINITION

    574	002222	026767 	000056'	000000G		CMP	SRVSG,$RTSEG	; FOUND IN MAIN ROOT?

    575	002230	001403 				BEQ	33$		; IF EQ YES, RESOLVE DIRECTLY

    576	002232	005767 	000054'			TST	SRCPF		;FOUND ON PATH UP?

    577	002236	100002 				BPL	34$		;IF PL YES

    578	002240	000167 	001300 		33$:	JMP	SYMRET		;

    579	002244	012701 	000000G		34$:	MOV	#S$YLGH,R1	;GET SIZE OF SYMBOL ENTRY

    580	002250					CALL	$ALSVB		; ALLOCATE SMALL VIRTUAL CORE BLOCK

    581	002254					CALL	$LCKPG		; LOCK DESCRIPTOR IN MEMORY

    582	002260	016702 	000060'			MOV	SYDEF,R2	; GET VIRTUAL ADDRESS OF REAL SYMBOL

    583	002264	010260 	000000G			MOV	R2,S$YVAL(R0)	; SET INDIRECT ENTRY ADDRESS

    584	002270	152760 	000000G	000000G		BISB	#SY$IND,S$YFLG(R0);SET INDIRECT FLAG

    585	002276	152760 	000000G	000000G		BISB	#SY$DEF,S$YFLG(R0);SET DEFINITION FLAG

    586	002304	132767 	000000G	000064'		BITB	#SY$ATL,SYFLG	; AUTOLOAD SYMBOL

    587	002312	001405 				BEQ	35$		;IF EQ NO

    588	002314	010502 				MOV	R5,R2		; COPY REAL ADDRESS OF SEGMENT

    589	002316					CALL	LNKATL		; LINK ITEM TO AUTOLOAD LIST

    590	002322					CALL	$CVRL		; CONVERT ENTRY TO REAL ADDRESS

    591	002326				35$:				;

    592	002326					CALL	$UNLPG		; UNLOCK NEW ENTRY

    593	002332	000167 	001074 			JMP	SYMIN1		; INSERT ENTRY IN CURRENT SEGMENT

    594

    595					;

    596					; COMPARE PARAMETERS

    597					;

    598

    599	002336	132760 	000000G	000000G	40$:	BITB	#SY$IND,S$YFLG(R0);INDIRECT REFERENCE?

    600	002344	001403 				BEQ	50$		;IF EQ NO

    601	002346	016000 	000000G			MOV	S$YVAL(R0),R0	;GET ADDRESS OF REAL ENTRY

    602	002352	000414 				BR	60$		;

    603	002354				50$:				;

    604	002354	016067 	000000G	000064'		MOV	S$YFLG(R0),SYFLG ; SAVE ENTRY FLAGS

    605	002362	016700 	000000G			MOV	$CRVSM,R0	; GET VIRTUAL ADDRESS OF DEFINITION

    606	002366	010067 	000060'			MOV	R0,SYDEF	; SET DEFINITION FLAG

    607	002372	010167 	000054'			MOV	R1,SRCPF	;SET PATH FLAG

    608	002376	016767 	000000G	000056'		MOV	$CRVSR,SRVSG	; SET VIRTUAL ADDRESS OF SEGMENT

    609	002404	020067 	000062'		60$:	CMP	R0,SYENT	;SAME AS LAST?

    610	002410	000261 				SEC			;ASSUME ANSWER IS NO

    611	002412	001001 				BNE	70$		;IF NE NO

    612	002414	000241 				CLC			;CLEAR CARRY

    613	002416	010067 	000062'		70$:	MOV	R0,SYENT	;SET ADDRESS OF LAST

    614	002422					RETURN			;

    615

    616					;

    617					; AMBIGUOUS SYMBOL DEFINITION

    618					;

    619

    620	002424				80$:				;

    621	002424	012702 	000032'			MOV	#MODN,R2	; GET ADDRESS OF MODULE NAME

    622	002430	012701 				MOV	(PC)+,R1	;GET ERROR/SEVERITY

    623	002432	   000G	   000G			.BYTE	E$R20,S$V0	;DIAGNOSTIC

    624	002434					CALL	$ERMSG		;OUTPUT ERROR MESSAGE

    625	002440	000167 	000616 			JMP	SYMINS		;

    626					;

    627					; CURRENT IS SYMBOL DEFINITION

PRCLM	MACRO M1110  22-AUG-78 01:50  PAGE 3-11





    628					;

    629

    630	002444	005701 			SYMDEF:	TST	R1		;FIND IN CURRENT SEGMENT?

    631	002446	001055 				BNE	10$		;IF NE NO

    632	002450	016701 	000000G			MOV	$CRVSM,R1	; GET VIRTUAL ADDRESS OF SYMBOL

    633	002454					CALL	$DELRF		; REMOVE REFERENCE LIST ENTRY

    634	002460					CALL	$LCKPG		; LOCK PAGE IN MEMORY

    635	002464					CALL	SYMCHK		; CHECK FOR MULTIPLE DEFINITION

    636	002470	103573 				BCS	50$		; IF C/S SYMBOL MULTIPLY DEFINED

    637	002472	001174 				BNE	55$		; IGNORE DUPLICATE ABS SYMBOL

    638	002474	016701 	000000G			MOV	$CRVSM,R1	; GET VIRTUAL ADDRESS OF ENTRY

    639	002500					CALL	$CVRL		; CONVERT TO REAL

    640	002504					CALL	$WRMPG		; WRITE-MARK PAGE

    641	002510					CALL	$UNLPG		; UNLOCK PAGE

    642	002514	010167 	000062'			MOV	R1,SYENT	; SAVE VIRTUAL ADDRESS OF ENTRY

    643	002520	016002 	000000G			MOV	S$YFLG(R0),R2	; COPY PREVIOUS FLAGS

    644	002524	016360 	000000G	000000G		MOV	S$YFLG(R3),S$YFLG(R0) ; SET SYMBOL FLAGS

    645	002532	042760 	000000G	000000G		BIC	#SY$WK,S$YFLG(R0) ; CLEAR WEAK QUALIFIER

    646	002540	016367 	000000G	000064'		MOV	S$YFLG(R3),SYFLG ; SAVE SYMBOL FLAGS

    647	002546	016360 	000000G	000000G		MOV	S$YVAL(R3),S$YVAL(R0);SET SYMBOL VALUE

    648	002554	016760 	000024'	000000G		MOV	CRVSC,S$YCMT(R0) ; SET SECTION ENTRY ADDRESS

    649	002562	132702 	000000G			BITB	#SY$WK,R2	; SYMBOL WEAK REFERENCE?

    650	002566	001120 				BNE	45$		; IF NE YES, DON'T DECREMENT COUNTS

    651	002570	005365 	000000G			DEC	S$GUND(R5)	;DECREMENT UNDEFINED SYMBOL COUNT

    652	002574	005367 	000000G			DEC	$MSYMC		;DECREMENT MASTER UNDEFINED SYMBOL COUNT

    653	002600	000513 				BR	45$		;

    654	002602				10$:				;

    655	002602	010146 				MOV	R1,-(SP)	;SAVE PATH FLAG

    656	002604	012746 	002632'			MOV	#20$,-(SP)	; SET RETURN ADDRESS

    657	002610	010346 				MOV	R3,-(SP)	;PLACE R3 ON STACK

    658	002612	016701 	000000G			MOV	$CRVSR,R1	; GET VIRTUAL ADDRESS OF SEARCH SEGMENT

    659	002616					CALL	$CVLOK		; CONVERT TO REAL, LOCK IN CORE

    660	002622	010067 	000000G			MOV	R0,$CRSRC	; SET REAL ADDRESS OF SEARCH SEGMENT

    661	002626	000167 	000460 			JMP	SYMIN0		; INSERT SYMBOL IN CURRENT SEGMENT

    662	002632				20$:				;

    663	002632	016701 	000000G			MOV	$CRVSM,R1	; GET VIRTUAL ADDRESS OF FOUND REFERENCE

    664	002636					CALL	$CVLOK		; CONVERT TO REAL, LOCK IN MEMORY

    665	002642					CALL	$WRMPG		; WRITE MARK PAGE

    666	002646	010046 				MOV	R0,-(SP)	; SAVE REAL ADDRESS

    667	002650					CALL	SYMCHK		; CHECK FOR MULTIPLE DEFINITION

    668	002654	103450 				BCS	30$		; IF C/S SYMBOL MULTIPLY DEFINED

    669	002656	001051 				BNE	35$		; IF NE IGNORE DUPLICATE ABS SYMBOL

    670	002660	012600 				MOV	(SP)+,R0	; RETRIEVE REAL ADDRESS OF SYMBOL

    671	002662	016701 	000000G			MOV	$CRVSM,R1	; GET VIRTUAL ADDRESS OF ENTRY

    672	002666	132760 	000000G	000000G		BITB	#SY$WK,S$YFLG(R0) ; FOUND WEAK REFERENCE?

    673	002674	001006 				BNE	25$		; IF NE YES, DON'T DECREMENT COUNTS

    674	002676	016702 	000000G			MOV	$CRSRC,R2	;GET ADDRESS OF SEARCH SEGMENT

    675	002702	005362 	000000G			DEC	S$GUND(R2)	;DECREMENT UNDEFINED SYMBOL COUNT

    676	002706	005367 	000000G			DEC	$MSYMC		;DECREMENT MASTER UNDEFINED SYMBOL COUNT

    677	002712				25$:				;

    678	002712	016702 	000062'			MOV	SYENT,R2	;GET ADDRESS OF CURRENT ENTRY

    679	002716	010260 	000000G			MOV	R2,S$YVAL(R0)	;SET INDIRECT ENTRY ADDRESS

    680	002722	005060 	000000G			CLR	S$YSEG(R0)	;CLEAR SEGMENT ADDRESS

    681	002726	152760 	000000G	000000G		BISB	#SY$IND,S$YFLG(R0);SET INDIRECT FLAG

    682	002734	152760 	000000G	000000G		BISB	#SY$DEF,S$YFLG(R0);SET DEFINITION FLAG

    683	002742	022627 	000001 			CMP	(SP)+,#1	; FOUND ON PATH DOWN ?

    684	002746	001416 				BEQ	40$		;++021 IF EQ NO

PRCLM	MACRO M1110  22-AUG-78 01:50  PAGE 3-12





    685	002750	132767 	000000G	000064'		BITB	#SY$ATL,SYFLG	; DEFINITION AUTOLOAD SYMBOL?

    686	002756	001412 				BEQ	40$		;IF EQ NO

    687	002760	016702 	000000G			MOV	$CRSRC,R2	; GET REAL ADDRESS OF SEARCH SEGMENT

    688	002764	016701 	000000G			MOV	$CRVSM,R1	; GET VIRTUAL ADDRESS OF REFERENCE

    689	002770					CALL	LNKATL		; LINK ITEM TO AUTOLOAD LIST

    690	002774	000403 				BR	40$		;

    691	002776				30$:				;

    692	002776					CALL	60$		; MULTIPLE GLOBAL SYMBOL DEFINITION

    693	003002				35$:				;

    694	003002	022626 				CMP	(SP)+,(SP)+	; CLEAN STACK

    695	003004				40$:				;

    696	003004	016701 	000000G			MOV	$CRVSM,R1	; GET VIRTUAL ADDRESS OF CURRENT SYMBOL

    697	003010					CALL	$UNLPG		; UNLOCK PAGE

    698	003014	016701 	000000G			MOV	$CRVSR,R1	; GET VIRTUAL ADDRESS OF SEARCH SEGMENT

    699	003020					CALL	$WRMPG		; WRITE-MARK PAGE

    700	003024					CALL	$UNLPG		; UNLOCK PAGE

    701	003030				45$:				;

    702	003030					CALL	@(SP)+		; CONTINUE SEARCH

    703	003032	103002 				BCC	47$		; IF C/C HAVE SYMBOL

    704	003034	000167 	000504 			JMP	SYMRET		; ELSE NO MORE TO PROCESS

    705	003040				47$:				;

    706	003040	010146 				MOV	R1,-(SP)	; SAVE PATH FLAG

    707	003042	016701 	000000G			MOV	$CRVSR,R1	; GET VIRTUAL ADDRESS OF SEARCH SEGMENT

    708	003046					CALL	$CVLOK		; CONVER TO REAL, LOCK IN MEMORY

    709	003052	010067 	000000G			MOV	R0,$CRSRC	; SAVE REAL ADDRESS

    710	003056	000665 				BR	20$		; PROCESS THIS SEGMENT

    711

    712					;

    713					; MULTIPLE SYMBOL DEFINITION IN CURRENT SEGMENT

    714					;

    715

    716	003060				50$:				;

    717	003060					CALL	60$		;OUTPUT MESSAGE

    718	003064				55$:				;

    719	003064	005726 				TST	(SP)+		; CLEAN STACK

    720	003066	016701 	000000G			MOV	$CRVSM,R1	; GET VIRTUAL ADDRESS OF FOUND ENTRY

    721	003072					CALL	$UNLPG		; UNLOCK PAGE BUFFER

    722	003076	000167 	000442 			JMP	SYMRET		;

    723

    724					;

    725					; MULTIPLY DEFINED SYMBOL

    726					;

    727

    728	003102				60$:				;

    729	003102	012702 	000032'			MOV	#MODN,R2	; GET ADDRESS OF MODULE NAME

    730	003106	012701 				MOV	(PC)+,R1	;GET ERROR/SEVERITY

    731	003110	   000G	   000G			.BYTE	E$R21,S$V0	;DIAGNOSTIC

    732	003112					CALL	$ERMSG		;OUTPUT ERROR MESSAGE

    733	003116					RETURN			;

    734

    735

    736					;

    737					; LINK AN ITEM TO SEGMENT AUTOLOAD LIST

    738					;

    739

    740	003120				LNKATL:				;

    741	003120	005262 	000004G			INC	S$GATL+4(R2)	; INCREMENT NUMBER OF AUTOLOAD ENTRIES

PRCLM	MACRO M1110  22-AUG-78 01:50  PAGE 3-13





    742	003124	010146 				MOV	R1,-(SP)	; SAVE VIRTUAL ADDRESS OF REFERENCE

    743	003126	010246 				MOV	R2,-(SP)	; SAVE REAL SEGMENT DESCRIPTOR ADDRESS

    744	003130	012701 	000000G			MOV	#A$LLST,R1	; GET LENGTH OF AUTOLOAD ENTRY

    745	003134					CALL	$ALBLK		; ALLOCATE STORAGE

    746	003140	012602 				MOV	(SP)+,R2	; RESTORE SEGMENT DESCRIPTOR ADDRESS

    747	003142	062702 	000000G			ADD	#S$GATL,R2	; POINT TO AUTOLOAD LISTHEAD

    748	003146	005722 				TST	(R2)+		; LIST EMPTY?

    749	003150	001002 				BNE	10$		; IF NE NO

    750	003152	010012 				MOV	R0,(R2)		; MAKE THIS ENTRY LAST

    751	003154	000401 				BR	20$		;

    752	003156				10$:				;

    753	003156	010032 				MOV	R0,@(R2)+	; LINK TO LAST ITEM IN LIST

    754	003160				20$:				;

    755	003160	010042 				MOV	R0,-(R2)	; MAKE THIS ITEM LAST

    756	003162	011660 	000002 			MOV	(SP),2(R0)	; SET ADDRESS OF INDIRECT ENTRY

    757	003166	012601 				MOV	(SP)+,R1	; RESTORE ENTRY ADDRESS

    758	003170					RETURN			;

    759

    760					;

    761					; CHECK FOR MULTIPLY DEFINED SYMBOLS

    762					;

    763

    764	003172				SYMCHK:				;

    765	003172	000241 				CLC			; ASSUME NO MULTIPLE DEFINITION

    766	003174	132760 	000000G	000000G		BITB	#SY$DEF,S$YFLG(R0) ; FIND DEFINITION?

    767	003202	001426 				BEQ	30$		; IF EQ NO, EXIT

    768	003204	132763 	000000G	000000G		BITB	#SY$REL,S$YFLG(R3) ; CURRENT ABSOLUTE?

    769	003212	001020 				BNE	10$		; IF NE NO

    770	003214	132760 	000000G	000000G		BITB	#SY$IND,S$YFLG(R0) ; INDIRECT ENTRY?

    771	003222	001404 				BEQ	5$		; IF EQ NO

    772	003224	016001 	000000G			MOV	S$YVAL(R0),R1	; GET VIRTUAL ADDRESS OF REAL ENTRY

    773	003230					CALL	$CVRL		; CONVERT TO REAL ADDRESS

    774	003234				5$:				;

    775	003234	132760 	000000G	000000G		BITB	#SY$REL,S$YFLG(R0) ; ENTRY ABSOLUTE?

    776	003242	001004 				BNE	10$		; IF NE NO

    777	003244	026063 	000000G	000000G		CMP	S$YVAL(R0),S$YVAL(R3) ; SYMBOLS EQUIVALENT?

    778	003252	001401 				BEQ	20$		; IF EQ YES

    779	003254				10$:				;

    780	003254	000261 				SEC			; SET MULTIPLE DEFINITION FLAG

    781	003256				20$:				;

    782	003256	000244 				CLZ			; SET EQUIVALENCE FLAG

    783	003260				30$:				;

    784	003260					RETURN			;

    785

    786					;

    787					; INSERT SYMBOL IN CURRENT SEGMENT

    788					;

    789	003262				SYMINS:				;++008

    790	003262	132763 	000000G	000000G		BITB	#SY$WK,S$YFLG(R3) ; WEAK DEFINITION OR REFERENCE

    791	003270	001125 				BNE	SYMRET		; IF NE YES, IGNORE

    792	003272	132763 	000000G	000000G		BITB	#SY$DEF,S$YFLG(R3) ;++008 SYMBOL DEFINITION?

    793	003300	001404 				BEQ	SYMIN0		;++008 NO -- CONTINUE INSERT

    794	003302	032764 	000000G	000000G		BIT	#SW$SS,E$LSWT(R4) ;++008 SELECTIVE DEFINITION MODULE ?

    795	003310	001115 				BNE	SYMRET		;++008 YES -- IGNORE

    796	003312				SYMIN0:				;++008

    797	003312	012701 	000000G			MOV	#S$YLGH,R1	;++008 GET SIZE OF SYMBOL TABLE ENTRY

    798	003316					CALL	$ALSVB		; ALLOCATE SMALL VIRTUAL CORE BLOCK

PRCLM	MACRO M1110  22-AUG-78 01:50  PAGE 3-14





    799	003322	010167 	000062'			MOV	R1,SYENT	; SAVE ADDRESS OF SYMBOL ENTRY

    800	003326	016367 	000000G	000064'		MOV	S$YFLG(R3),SYFLG ; SAVE SYMBOL FLAGS

    801	003334	016360 	000000G	000000G		MOV	S$YFLG(R3),S$YFLG(R0);SET SYMBOL FLAGS

    802	003342	042760 	000000G	000000G		BIC	#SY$WK,S$YFLG(R0) ; CLEAR WEAK QUALIFIER

    803	003350	016360 	000000G	000000G		MOV	S$YVAL(R3),S$YVAL(R0);SET SYMBOL VALUE

    804	003356	016760 	000024'	000000G		MOV	CRVSC,S$YCMT(R0) ; SET SECTION ENTRY ADDRESS

    805	003364	016760 	000000G	000000G		MOV	$CRVSG,S$YSEG(R0) ; SET VIRTUAL ADDRESS OF CURRENT SEGMENT

    806	003372	132763 	000000G	000000G		BITB	#SY$DEF,S$YFLG(R3);SYMBOL DEFINITION?

    807	003400	001014 				BNE	SYMIN1		;IF NE YES

    808	003402	005060 	000000G			CLR	S$YCMT(R0)	;CLEAR SECTION ENTRY ADDRESS

    809	003406	005265 	000000G			INC	S$GUND(R5)	;INCREMENT UNDEFINED SYMBOL COUNT

    810	003412	005267 	000000G			INC	$MSYMC		;INCREMENT MASTER UNDEFINED SYMBOL COUNT

    811	003416					CALL	$LCKPG		; LOCK PAGE IN MEMORY

    812	003422					CALL	$BLDRF		; BUILD REFERENCE LIST ENTRY

    813	003426					CALL	$UNLPG		; UNLOCK PAGE

    814	003432	016360 	000000G	000000G	SYMIN1:	MOV	S$YM(R3),S$YM(R0);SET FIRST HALF OF SYMBOL

    815	003440	016360 	000002G	000002G		MOV	S$YM+2(R3),S$YM+2(R0);SET SECOND HALF OF SYMBOL

    816	003446	016700 	000000G			MOV	$CRVSG,R0	; GET VIRTUAL ADDRESS OF CURRENT SEGMENT

    817	003452	062700 	000000C			ADD	#S$GSTB/2,R0	; POINT TO SYMBOL TABLE LISTHEAD

    818	003456	010146 				MOV	R1,-(SP)	; SAVE VIRTUAL ADDRESS OF SYMBOL

    819	003460					CALL	$SRCHI		;SEARCH FOR INSERT

    820	003464					CALL	$ISYM		;INSERT SYMBOL

    821	003470	022767 	000001 	000000G		CMP	#1,$NUMSG	; SINGLE SEGMENT TASK?

    822	003476	001421 				BEQ	10$		; IF EQ YES

    823	003500	016746 	000000G			MOV	$CRVSG,-(SP)	; PUSH VIRTUAL ADDRESS OF CURRENT SEGMENT

    824	003504	016346 	000002G			MOV	S$YM+2(R3),-(SP) ; PUSH SYMBOL NAME

    825	003510	016346 	000000G			MOV	S$YM(R3),-(SP)	; ...

    826	003514	162706 	000006 			SUB	#6,SP		; CONVERT TO PROPER FORMAT

    827	003520	010601 				MOV	SP,R1		; COPY DESCRIPTOR ADDRESS

    828	003522	012700 	000000G			MOV	#$SYMHD,R0	; GET LISTHEAD ADDRESS

    829	003526					CALL	$SRCIV		; SEARCH FOR INSERTION

    830	003532					CALL	$ISYMV		; INSERT SYMBOL

    831	003536	062706 	000014 			ADD	#<3*2>+<3*2>,SP	; REMOVE ALL BUT SYMBOL ADDRESS

    832	003542				10$:				;

    833	003542	005226 				INC	(SP)+		; CLEAN STACK

    834	003544	012603 			SYMRET:	MOV	(SP)+,R3	;RESTORE R3

    835	003546					RETURN			;

    836

    837					;

    838					; VERSION IDENTIFICATION

    839					;

    840

    841	003550	012700 	000000G		VIDENT:	MOV	#$IDENT,R0	;GET ADDRESS OF PRG IDENTIFICATION

    842	003554	005710 				TST	(R0)		;ANY PREVIOUS DEFINITION?

    843	003556	001010 				BNE	10$		;IF NE YES

    844	003560	032764 	000000G	000000G		BIT	#SW$RL,E$LSWT(R4) ;++016 RESIDENT LIBRARY ?

    845	003566	001004 				BNE	10$		;++016 IF NE YES

    846	003570	016120 	000000G			MOV	S$YM(R1),(R0)+	;INSERT PROGRAM IDENTIFICATION

    847	003574	016110 	000002G			MOV	S$YM+2(R1),(R0)	;

    848	003600	016164 	000000G	000000G	10$:	MOV	S$YM(R1),E$LIDT(R4);INSERT VERSION IDENTIFICATION

    849	003606	016164 	000002G	000002G		MOV	S$YM+2(R1),E$LIDT+2(R4);

    850	003614	016701 	000000G			MOV	$CRVEL,R1	; GET VIRTUAL ADDRESS OF CURRENT ELEMENT

    851	003620					CALLR	$WRMPG		; WRITE-MARK PAGE, EXIT

    852

    853					;

    854					; VIRTUAL ARRAY STORAGE

    855					;

PRCLM	MACRO M1110  22-AUG-78 01:50  PAGE 3-15





    856	003624				VSTNME:

    857	003624	005767 	000000G			TST	$VSWND		;ALREADY ALLOCATED AN EXTRA WINDOW?

    858	003630	001420 				BEQ	7$		;IF EQ YES

    859	003632	016746 	000000G			MOV	$NUMWN,-(SP)	;PUSH NUMBER OF TASK WINDOWS

    860	003636	066716 	000000G			ADD	$MXWND,(SP)	;ADD IN RESIDENT LIBRARY WINDOWS

    861	003642	005216 				INC	(SP)		;ADD WINDOW FOR VIRTUAL ARRAY

    862	003644	022627 	000010 			CMP	(SP)+,#8.	;TOO MANY WINDOWS REQUIRED?

    863	003650	101406 				BLOS	5$		;IF LOS NO

    864	003652	012701 				MOV	(PC)+,R1	;GET ERROR/SEVERITY

    865	003654	   000G	   000G			.BYTE	E$R86,S$V0	;

    866	003656	005002 				CLR	R2		;NO PARAMETERS

    867	003660					CALL	$ERMSG		;PRINT ERROR MESSAGE

    868	003664	000402 				BR	7$		;

    869	003666				5$:				;

    870	003666	005267 	000000G			INC	$NUMWN		;ADD ONE WINDOW TO TASK ALLOCATION

    871	003672				7$:				;

    872	003672	005067 	000000G			CLR	$VSWND		;CLEAR SO ONLY ONE WINDOW IS ADDED

    873	003676	005061 	000000G			CLR	C$SFLG(R1)	;CLEAR FLAGS

    874	003702	052761 	000000C	000000G		BIS	#<CS$VAS*400!CS$TYP!CS$GBL!CS$REL>,C$SFLG(R1)  ;

    875									;SET FLAGS

    876	003710	032767 	000000G	000000G		BIT	#MP$SY,$SWTCH	;MAPPED SYSTEM?

    877	003716	001006 				BNE	10$		;IF NE YES

    878	003720	012702 	000032'			MOV	#MODN,R2	;MODULE NAME

    879	003724	012701 				MOV	(PC)+,R1	;PRINT WARNING

    880	003726	   000G	   000G			.BYTE	E$R93,S$V0	;AND KEEP GOING

    881	003730					CALL	$ERMSG

    882	003734				10$:

    883	003734	000167 	174342 			JMP	PSTNME		;NOW GO PROCESS LIKE A PSECT

    884					;

    885					; END GSD-BLOCK TYPE 2

    886					;

    887

    888	003740	005726 			ENGSD:	TST	(SP)+		;CLEAN STACK

    889	003742	016403 	000000G			MOV	E$LCMT(R4),R3	;GET ADDRESS OF CMT TABLE

    890	003746	001462 				BEQ	40$		;IF EQ NONE IN TABLE

    891	003750	010546 				MOV	R5,-(SP)	;SAVE CURRENT SEGMENT DESCRIPTOR ADDRESS

    892	003752	016405 	000000G			MOV	E$LNUM(R4),R5	;GET HIGHEST SECTION NUMBER

    893	003756	005205 				INC	R5		;CONVERT TO REPEAT COUNT

    894	003760					CALL	BLVMT		; BUILD VIRTUAL MAPPING TABLE

    895	003764				10$:				;

    896	003764	012301 				MOV	(R3)+,R1	; GET ENTRY ADDRESS

    897	003766					CALL	$CVRL		; CONVERT TO REAL ADDRESS

    898	003772					CALL	$WRMPG		; WRITE-MARK PAGE

    899	003776	012301 				MOV	(R3)+,R1	;GET MAX SIZE

    900	004000	132760 	000000G	000000G		BITB	#CS$REL,C$SFLG(R0);ABS SECTION?

    901	004006	001435 				BEQ	30$		;IF EQ YES

    902	004010	132760 	000000G	000000G		BITB	#CS$LIB,C$SFLG(R0);LIB SECTION?

    903	004016	001012 				BNE	13$		;IF NE YES

    904	004020	132760 	000000G	000000G		BITB	#CS$ALO,C$SFLG(R0);WHAT TYPE?

    905	004026	001020 				BNE	20$		;IF NE OVERLAID

    906	004030	060160 	000000G			ADD	R1,C$SCUR(R0)	;UPDATE CURRENT OFFSET ADDRESS

    907	004034	103022 				BCC	30$		;IF CC OKAY

    908	004036	012701 				MOV	(PC)+,R1	;P-SECTION OVERFLOW

    909	004040	   000G	   000G			.BYTE	E$R19,S$V0	;DIAGNOSTIC

    910	004042	000405 				BR	17$		;

    911	004044	020160 	000000G		13$:	CMP	R1,C$SLTH(R0)	;COMPATABLE LENGTH?

    912	004050	101414 				BLOS	30$		;IF LOS YES

PRCLM	MACRO M1110  22-AUG-78 01:50  PAGE 3-16





    913	004052	012701 				MOV	(PC)+,R1	;INCOMPATABLE ALLOCATION REFERENCE

    914	004054	   000G	   000G			.BYTE	E$R59,S$V0	;DIAGNOSTIC

    915	004056	010002 			17$:	MOV	R0,R2		;COPY ADDRESS OF P-SETION ENTRY

    916	004060	005722 				TST	(R2)+		; POINT TO SECTION NAME

    917	004062					CALL	$ERMSG		;OUTPUT ERROR MESSAGE

    918	004066	000405 				BR	30$		;

    919	004070	020160 	000000G		20$:	CMP	R1,C$SCUR(R0)	;COMPARE SIZES

    920	004074	101402 				BLOS	30$		;IF LOS NO CHANGE

    921	004076	010160 	000000G			MOV	R1,C$SCUR(R0)	;SET NEW HIGH

    922	004102				30$:	SOB	R5,10$		;REPEAT

    923	004106	012605 				MOV	(SP)+,R5	;RESTORE SEGMENT DESCRIPTOR ADDRESS

    924	004110					CALL	$DLCMT		; DEALLOCATE RESIDENT CMT

    925	004114				40$:				;

    926	004114	032764 	000000G	000000G		BIT	#SW$LB,E$LSWT(R4) ; LIBRARY FILE?

    927	004122	001055 				BNE	70$		; IF NE YES

    928	004124	032764 	000000G	000000G		BIT	#SW$CC,E$LSWT(R4) ; CONCATENATED FILE?

    929	004132	001451 				BEQ	70$		; IF EQ NO

    930	004134				50$:				;

    931	004134	016701 	000000G			MOV	$CRVEL,R1	; GET CURRENT VIRTUAL ADDRESS

    932	004140					CALL	$UNLPG		; UNLOCK PAGE

    933	004144				55$:				;

    934	004144	005067 	000000G			CLR	$NBYTE		; CLEAR BYTE COUNT

    935	004150					CALL	$GTBYT		;GET RECORD LENGTH

    936	004154	103436 				BCS	60$		;IF CS ILL FORMAT

    937	004156					CALL	$GTWRD		;GET BLOCK TYPE

    938	004162	020027 	000006 			CMP	R0,#6		;END OF MODULE?

    939	004166	001366 				BNE	55$		; IF NE NO

    940	004170	005067 	000000G			CLR	$NBYTE		;CLEAR BYTE COUNT

    941	004174					CALL	$GTBYT		;GET RECORD LENGTH

    942	004200	103426 				BCS	70$		;IF CS NO MORE MODULES

    943	004202	010003 				MOV	R0,R3		;SAVE RECORD LENGTH

    944	004204					CALL	$ACMOD		; ALLOCATE CONCATENATED MODULE DESCRIPTOR

    945	004210					CALL	$LCKPG		; LOCK NEXT DESCRIPTOR IN MEMORY

    946	004214	010046 				MOV	R0,-(SP)	; SAVE REAL ADDRESS OF NEXT

    947	004216	010146 				MOV	R1,-(SP)	; SAVE VIRTUAL ADDRESS OF NEXT

    948	004220	016701 	000000G			MOV	$CRVEL,R1	; GET VIRTUAL ADDRESS OF CURRENT

    949	004224					CALL	$CVRL		; CONVERT TO REAL ADDRESS

    950	004230					CALL	$WRMPG		; WRITE MARK PAGE

    951	004234	011660 	000000G			MOV	(SP),E$LNXT(R0) ; SET LINK TO NEXT

    952	004240	012667 	000000G			MOV	(SP)+,$CRVEL	; SET VIRTUAL ADDRESS OF NEXT DESCRIPTOR

    953	004244	012604 				MOV	(SP)+,R4	; SET REAL ADDRESS OF NEXT DESCRIPTOR

    954	004246	000167 	173540 			JMP	PRCEL2		;GO AGAIN

    955	004252	000167 	173740 		60$:	JMP	ILFMT		;ILLEGAL FORMAT

    956	004256	012603 			70$:	MOV	(SP)+,R3	;RESTORE R3

    957	004260					RETURN			;

    958

    959					;

    960					; REPEAT-BLOCK TYPES 3,4, AND 5

    961					;

    962

    963	004262	005067 	000000G		RPEAT:	CLR	$NBYTE		;CLEAR BYTE COUNT

    964	004266					RETURN			;

    965

    966					;

    967					; SUBROUTINE TO BUILD THE VIRTUAL MAPPING TABLE

    968					;

    969

PRCLM	MACRO M1110  22-AUG-78 01:50  PAGE 3-17





    970	004270				BLVMT:				;

    971	004270					SAVRG			; SAVE THE NON-VOLATILE REGISTERS

    972	004274	062704 	000000G			ADD	#E$LVMT,R4	; POINT TO VMT ADDRESS

    973	004300	020527 	000000C			CMP	R5,#<P$GSIZ-P$GHD>/4 ; VMT EXCEED A PAGE?

    974	004304	101406 				BLOS	10$		; IF LOS NO

    975	004306	162705 	000000C			SUB	#<P$GSIZ-P$GHD>/4,R5 ; SPLIT VMT INTO TWO PARTS

    976	004312					CALL	10$		; ALLOCATE FIRST PART OF TABLE

    977	004316	012705 	000000C			MOV	#<P$GSIZ-P$GHD>/4,R5 ; GET NEXT INCREMENT

    978	004322				10$:				;

    979	004322	010501 				MOV	R5,R1		; COPY SIZE OF TABLE

    980	004324	006301 				ASL	R1		; CONVERT TO BYTES

    981	004326	006301 				ASL	R1		; ...

    982	004330					CALL	$ALSVB		; ALLOCATE VIRTUAL MEMORY

    983	004334	010124 				MOV	R1,(R4)+	; SAVE VIRTUAL ADDRESS

    984	004336				20$:				;

    985	004336	012320 				MOV	(R3)+,(R0)+	; COPY FIRST WORD OF ENTRY

    986	004340	012320 				MOV	(R3)+,(R0)+	; COPY SECOND WORD OF ENTRY

    987	004342					SOB	R5,20$		;

    988	004346					RETURN			;

    989

    990		000001 				.END

PRCLM	MACRO M1110  22-AUG-78 01:50  PAGE 3-18

SYMBOL TABLE



A$LLST= ****** GX	FA.SEQ= 040000   	F.EOBB= 000032   	N.FNAM= 000006   	S$GSTS= ****** GX

BLVMT   004270R  	FA.SHR= 000040   	F.ERR = 000052   	N.FTYP= 000014   	S$GUND= ****** GX

B.BBFS= 000010   	FA.TMP= 000020   	F.FACC= 000043   	N.FVER= 000016   	S$V0  = ****** GX

B.BFST= 000015   	FA.WCK= 020000   	F.FFBY= 000014   	N.NEXT= 000022   	S$V2  = ****** GX

B.NXBD= 000012   	FA.WRT= 000002   	F.FNAM= 000110   	N.STAT= 000020   	S$YCMT= ****** GX

B.VBN = 000004   	FD.BLK= 000010   	F.FNB = 000102   	N.UNIT= 000034   	S$YFLG= ****** GX

CH.AND= 000001   	FD.CCL= 000002   	F.FTYP= 000116   	PRCEL1  000002R  	S$YLGH= ****** GX

CR    = 000015   	FD.COM= 020000   	F.FVER= 000120   	PRCEL2  000012R  	S$YM  = ****** GX

CRSCT   000000R     002	FD.CR = 000002   	F.HIBK= 000004   	PRCEL3  000030R  	S$YSEG= ****** GX

CRVSC   000024R     002	FD.DIR= 000010   	F.LUN = 000042   	PRCEL4  000032R  	S$YVAL= ****** GX

CS$ALO= ****** GX	FD.FTN= 000001   	F.MBCT= 000054   	PSTNME  000302R  	S$ZSEG= ****** GX

CS$ATL= ****** GX	FD.F11= 040000   	F.MBC1= 000055   	P$GHD = ****** GX	S$ZSEQ= ****** GX

CS$GBL= ****** GX	FD.INS= 000010   	F.MBFG= 000056   	P$GSIZ= ****** GX	S.BFHD= 000020

CS$IND= ****** GX	FD.ISP= 002000   	F.NRBD= 000024   	RPEAT   004262R  	S.FATT= 000016

CS$LIB= ****** GX	FD.MNT= 100000   	F.NREC= 000030   	R$NAME= ****** GX	S.FDB = 000140

CS$MEM= ****** GX	FD.OSP= 004000   	F.OVBS= 000030   	R$$11M= 000000   	S.FNAM= 000006

CS$REL= ****** GX	FD.PLC= 000004   	F.RACC= 000016   	R.FIX = 000001   	S.FNB = 000036

CS$TYP= ****** GX	FD.PRN= 000004   	F.RATT= 000001   	R.SEQ = 000003   	S.FNBW= 000017

CS$VAS= ****** GX	FD.PSE= 010000   	F.RCNM= 000034   	R.VAR = 000002   	S.FNTY= 000004

C$SBSE= ****** GX	FD.RAH= 000001   	F.RCTL= 000017   	SCTCHK  001052R  	S.FTYP= 000002

C$SCUR= ****** GX	FD.RAN= 000002   	F.RSIZ= 000002   	SCTCMT  001176R  	S.NFEN= 000020

C$SELM= ****** GX	FD.REC= 000001   	F.RTYP= 000000   	SCTNME  000236R  	VIDENT  003550R

C$SFLG= ****** GX	FD.RWM= 000001   	F.SEQN= 000100   	SE$QA = ****** GX	VSTNME  003624R

C$SLGH= ****** GX	FD.SDI= 000020   	F.SPDV= 000072   	SPA   = 000040   	VT    = 000013

C$SLTH= ****** GX	FD.SQD= 000040   	F.SPUN= 000074   	SRCPF   000054R     002	XFRADR  001330R

DSPVCT  000042R  	FD.TTY= 000004   	F.STBK= 000036   	SRVSG   000056R     002	$ABSCT= ****** GX

ENGSD   003740R  	FD.WBH= 000002   	F.UNIT= 000136   	STGSD   000060R  	$ACMOD= ****** GX

E$LCMT= ****** GX	FF    = 000014   	F.URBD= 000020   	SW$AL = ****** GX	$ALBLK= ****** GX

E$LIDT= ****** GX	FF.CHR= 000005   	F.VBN = 000064   	SW$CC = ****** GX	$ALSVB= ****** GX

E$LLGH= ****** GX	FF.NV = 000003   	F.VBSZ= 000060   	SW$DA = ****** GX	$BLDRF= ****** GX

E$LMOD= ****** GX	FF.POE= 000002   	GSDVCT  000000R     003	SW$LB = ****** GX	$CRSEG= ****** GX

E$LNUM= ****** GX	FF.RWD= 000001   	HT    = 000011   	SW$MA = ****** GX	$CRSRC= ****** GX

E$LNXT= ****** GX	FF.RWF= 000006   	ILFMT   000216R  	SW$RL = ****** GX	$CRVEL= ****** GX

E$LSWT= ****** GX	FF.SPC= 000004   	INTSYM  001326R  	SW$SS = ****** GX	$CRVSG= ****** GX

E$LVMT= ****** GX	FO.APD= 000106   	LCLSYM  000034R     002	SYDEF   000060R     002	$CRVSM= ****** GX

E$R14 = ****** GX	FO.MFY= 000002   	LF    = 000012   	SYENT   000062R     002	$CRVSR= ****** GX

E$R15 = ****** GX	FO.RD = 000001   	LGBLK = 000006   	SYFLG   000064R     002	$CVLOK= ****** GX

E$R16 = ****** GX	FO.UPD= 000006   	LGTYP = 000007   	SYMCHK  003172R  	$CVRL = ****** GX

E$R17 = ****** GX	FO.WRT= 000016   	LNKATL  003120R  	SYMDCL  001540R  	$DELRF= ****** GX

E$R18 = ****** GX	F.ACTL= 000076   	LOADNM  000026R     002	SYMDEF  002444R  	$DLCMT= ****** GX

E$R19 = ****** GX	F.ALOC= 000040   	L$DSA = ****** GX	SYMINS  003262R  	$ERMSG= ****** GX

E$R20 = ****** GX	F.BBFS= 000062   	MODN    000032R     002	SYMIN0  003312R  	$FRHD = ****** GX

E$R21 = ****** GX	F.BDB = 000070   	MODNME  000154R  	SYMIN1  003432R  	$GTBYT= ****** GX

E$R59 = ****** GX	F.BGBC= 000057   	MP$SY = ****** GX	SYMRET  003544R  	$GTWRD= ****** GX

E$R60 = ****** GX	F.BKDN= 000026   	NB.DEV= 000200   	SYMSRC  002026R  	$IDENT= ****** GX

E$R86 = ****** GX	F.BKDS= 000020   	NB.DIR= 000100   	SY$ATL= ****** GX	$INPPT= ****** GX

E$R93 = ****** GX	F.BKEF= 000050   	NB.NAM= 000004   	SY$DEF= ****** GX	$ISYM = ****** GX

FA.APD= 000100   	F.BKP1= 000051   	NB.SD1= 000400   	SY$EXC= ****** GX	$ISYMV= ****** GX

FA.CRE= 000010   	F.BKST= 000024   	NB.SD2= 001000   	SY$IND= ****** GX	$LCKPG= ****** GX

FA.DLK= 001000   	F.BKVB= 000064   	NB.SNM= 000040   	SY$LIB= ****** GX	$MSYMC= ****** GX

FA.ENB= 100000   	F.CHR = 000075   	NB.STP= 000020   	SY$REL= ****** GX	$MXWND= ****** GX

FA.EXC= 002000   	F.CNTG= 000034   	NB.SVR= 000010   	SY$WK = ****** GX	$NBYTE= ****** GX

FA.EXT= 000004   	F.DFNB= 000046   	NB.TYP= 000002   	S$GATL= ****** GX	$NUMSG= ****** GX

FA.NSP= 000100   	F.DSPT= 000044   	NB.VER= 000001   	S$GCST= ****** GX	$NUMWN= ****** GX

FA.POS= 010000   	F.DVNM= 000134   	N.DID = 000024   	S$GNME= ****** GX	$ODTAD= ****** GX

FA.RD = 000001   	F.EFBK= 000010   	N.DVNM= 000032   	S$GSEQ= ****** GX	$PRCLM  000000RG

FA.RWD= 004000   	F.EFN = 000050   	N.FID = 000000   	S$GSTB= ****** GX	$RLCB = ****** GX

PRCLM	MACRO M1110  22-AUG-78 01:50  PAGE 3-19

SYMBOL TABLE



$RTSEG= ****** GX	$SRCIV= ****** GX	$UNLPG= ****** GX	$WSRCC= ****** GX	$$    = 000001

$SAVRG= ****** GX	$SWTCH= ****** GX	$VSWND= ****** GX	$WSRCS= ****** GX	...GBL= 000000

$SRCH = ****** GX	$SYMHD= ****** GX	$WRMPG= ****** GX	$XFRAD= ****** GX	...TPC= 000140

$SRCHI= ****** GX	$SZSEG= ****** GX



. ABS.	000000	   000

      	004350	   001

PRCL$D	000066	   002

GSDV$D	000020	   003

ERRORS DETECTED:  0



VIRTUAL MEMORY USED:  3413 WORDS  ( 14 PAGES)

DYNAMIC MEMORY:  4884 WORDS  ( 18 PAGES)

ELAPSED TIME:  00:00:36

OBJ$:PRCLM,LIS$:PRCLM/-SP=SRC$:MACFLM,FCSPR,PRCLM

