Google
 

Trailing-Edge - PDP-10 Archives - BB-H311B-RM - rsx20f-swskit/listings/lbr.lis
There are no other files named lbr.lis in the archive.
LBR	MACRO M1108  05-DEC-77 22:23  PAGE 1


      1						.IIF NDF	$VRSN,.NLIST
      2					;
      3					; LIBRARIAN ASSEMBLY PREFIX FILE
      4					;
      5					;
      6					;CONDITIONAL ASSEMBLY SYMBOLS
      7					;
      8
      9		000000 			R$$11M = 0			;RUN ON RSX-11M
     10
     11		000000 			Q$$CMO = 0			;QUEUE I/O TO COMMAND OUTPUT
     12
     13		000000 			S$$LIB = 0			;RUN WITH 'SYSLIB' (NOT 'SYSRES')
     14
     15
     16
     17					; SMALL MACRO DEFINITION FILE
     18
     19						.MCALL	CALL,RETURN
     20					;
     21						.MACRO	CALLR	ARG
     22						JMP	ARG
     23						.ENDM
     24
     25
     26
     27
     28						.MACRO	SAVRG
     29						JSR	R5,$SAVRG
     30						.ENDM
     31
     32
     33						.IF NDF	R$$EIS
     34
     35
     36						.MACRO	SOB	REG,ADR
     37						DEC	REG
     38						BNE	ADR
     39						.ENDM	SOB
     40
     41
     42						.MACRO	MUL	SRC,DST
     43						.IF DIF	<SRC>,<R0>
     44						MOV	SRC,R0
     45						.ENDC
     46						.IF IDN	<DST>,<R3>
     47						CALL	$LMUL1
     48						.IFF
     49						.IF IDN	<DST>,<R4>
     50						CALL	$LMUL2
     51						.IFF
     52						.ERROR		;DST IS ILLEGAL DESTINATION
     53						.ENDC
     54						.ENDC
     55						.ENDM	MUL
     56
     57
LBR	MACRO M1108  05-DEC-77 22:23  PAGE 1-1


     58						.MACRO	DIV	SRC,DST
     59						.IF DIF	<SRC>,<R0>
     60						MOV	SRC,R0
     61						.ENDC
     62						.IF IDN	<DST>,<R4>
     63						CALL	$LDIV
     64						.IFF
     65						.ERROR		;DST IS ILLEGAL DESTINATION
     66						.ENDC
     67						.ENDM	DIV
     68
     69
     70
     71						.ENDC
     72
     73						.IIF NDF	$VRSN,.LIST
LBR	MACRO M1108  05-DEC-77 22:23  PAGE 2


      1						.TITLE	LBR
      2
      3					;
      4					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      5					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      6					;
      7					; 	DEC ASSUMES NO RESPONSIBLIITY FOR THE USE
      8					;	OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT
      9					;	WHICH IS NOT SUPPLIED BY DEC.
     10					;
     11					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     12					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     13					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     14					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     15					;
     16					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     17					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     18					; EQUIPMENT CORPORATION.
     19					;
     20					; VERSION X03.6
     21					;
     22					; WRITTEN BY:
     23					;	GEORGE W. BERRY
     24					;
     25					; MODIFIED BY:
     26					;	C.A. D'ELIA	16-JUN-74
     27					;	C.A. D'ELIA	24-JUN-74  (VIRTUAL TABLES)
     28					;	THOMAS J. MILLER 01-NOV-74  (MACRO LIBRARIES)
     29					;				    (/DF SWITCH)
     30					;				    (/SZ SWITCH)
     31					;			 18-MAR-75  (FIX COMPRESS BUG)
     32					;			 20-JUN-75  (CRAM END OF FILE IN FDB)
     33					;			 16-JUL-75  (USE GTSK FOR GETTING LBR SIZE)
     34					;
     35					;
     36					;
     37					; LIBRARIAN ROOT SEGMENT.
     38					;
     39
     40
     41					;
     42					; LIBRARIAN VERSION IDENTIFICATION
     43					;
     44
     45						.MACRO	VERSN	VER
     46						.IDENT	/VER/
     47					$VRSN::	.RAD50	/VER/
     48						.IIF EQ	<.-2-$VRSN>,	.WORD	0
     49						.IIF B	<VER>,	.ERROR		;LBR VERSION MUST BE SPECIFIED
     50						.ENDM
     51
     52
     53	000000					VERSN	<X03.6>
     54
     55					;
     56					; LOCAL DATA
     57					;
LBR	MACRO M1108  05-DEC-77 22:23  PAGE 2-1


     58
     59	000004				SPSAV:	.BLKW	1		;SAVED INITIAL STACK POINTER
     60
     61					;
     62					; MACRO LIBRARY CALLS
     63					;
     64
     65						.MCALL	EXIT$S,FINIT$
     66
     67
     68						.IF DF	S$$LIB
     69
     70						.MCALL	OFNB$,FDOFF$
     71	000006					FDOFF$	DEF$L
     72
     73						.ENDC
     74
     75
     76						.IF NDF	Q$$CMO
     77
     78						.MCALL	OPEN$W,CLOSE$
     79
     80						.ENDC
     81
     82
     83					;+
     84					;
     85					; **-$LBR- ENTRY TO RSX11D/M LIBRARIAN
     86					;
     87					;-
     88
     89	000006				$LBR::	FINIT$			;INITIALIZE FCS
     90
     91
     92						.IF NDF	Q$$CMO
     93
     94
     95						OPEN$W	$CMOPT		;OPEN COMMAND OUTPUT FILE
     96						BCS	$QUIT		;ABORT IF ERROR
     97
     98
     99						.ENDC
    100
    101
    102	000012	010667 	177766 			MOV	SP,SPSAV	;SAVE FOR REENTRY
    103
    104	000016	016706 	177762 		$RSTRT::MOV	SPSAV,SP	;RESTART ENTRY
    105	000022					CALL	$INIT		;INIT LBR AND GET COMMAND LINE
    106	000026					CALL	$DECD		;GET OPTIONS
    107	000032	032715 	000000G			BIT	#CR$SW,(R5)	;/CR?
    108	000036	001402 				BEQ	10$
    109	000040					CALL	$CRE
    110
    111	000044	032715 	000000G		10$:	BIT	#DL$SW,(R5)	;/DE?
    112	000050	001402 				BEQ	20$
    113	000052					CALL	$DEL
    114
LBR	MACRO M1108  05-DEC-77 22:23  PAGE 2-2


    115	000056	032715 	000000G		20$:	BIT	#IN$SW,(R5)	;/IN?
    116	000062	001402 				BEQ	30$
    117	000064					CALL	$INS
    118
    119	000070	032715 	000000G		30$:	BIT	#CO$SW,(R5)	;/CO?
    120	000074	001402 				BEQ	40$
    121	000076					CALL	$CMP		;PERFORM FILE COMPRESS
    122
    123	000102	000167 	000000G		40$:	JMP	$LISCD		;CHECK FOR LISTING AND ...
    124									;... CLOSE LIBRARY FILE
    125
    126
    127
    128	000106				$QUIT::
    129
    130
    131						.IF NDF	Q$$CMO
    132
    133
    134						CLOSE$	$CMOPT		;CLOSE COMMAND OUTPUT FILE
    135
    136
    137						.ENDC
    138
    139
    140	000106					EXIT$S			;CALL RSX11D
    141
    142
    143
    144					;+
    145					;
    146					; THIS ROUTINE CLEARS A DESIGNATED AREA.
    147					;
    148					; CALLED BY:
    149					;
    150					;	JSR	R5,$CLEAR
    151					;	.WORD	START-OF-AREA-TO-CLEAR
    152					;	.WORD	NUMBER-OF-WORDS-TO-CLEAR
    153					;
    154					;-
    155	000114	012501 			$CLEAR::MOV	(R5)+,R1	;GET START OF AREA
    156	000116	012502 				MOV	(R5)+,R2	;GET NUMBER OF WORDS
    157	000120	005021 			10$:	CLR	(R1)+		;CLEAR DESIGNATED AREA
    158	000122					SOB	R2,10$		;
    159	000126	000205 				RTS	R5
    160
    161
    162						.IF DF	S$$LIB
    163
    164
    165					;+
    166					;
    167					; *-$OPEN-*-PARSE FILENAME AND OPEN FILE
    168					;
    169					; INPUTS:
    170					;	R0=ADDRESS OF FDB
    171					;	R1=FILE OPEN FUNCTION, E.G.  #FO.WRT , ETC
LBR	MACRO M1108  05-DEC-77 22:23  PAGE 2-3


    172					;
    173					;-
    174
    175	000130				$OPEN::	SAVRG			;SAVE R3-R5
    176	000134	010104 				MOV	R1,R4		;COPY FUNCTION INTO R4
    177	000136	010001 				MOV	R0,R1		;POINT R1 TO THE FILE NAME BLOCK
    178	000140	062701 	000102 			ADD	#F.FNB,R1	;
    179	000144	016002 	000044 			MOV	F.DSPT(R0),R2	;POINT R2 TO FILE DESCRIPTOR
    180	000150	016003 	000046 			MOV	F.DFNB(R0),R3	;POINT R3 TO DEFAULT FILENAME BLOCK
    181	000154					CALL	.PARSE		;PARSE FILENAME, CREATING FILENAME BLK
    182	000160	103404 				BCS	10$		;SKIP ON ERROR
    183	000162					OFNB$	R0,R4		;OPEN FILE (WITH DESIRED FUNCTION)
    184	000172				10$:	RETURN			;
    185
    186
    187						.ENDC
    188
    189
    190						.IF NDF	R$$EIS
    191
    192
    193					;+
    194					;
    195					; *-$LMUL1-*-MULTIPLY WITH A SINGLE WORD RESULT
    196					; *-$LMUL2-*-MULTIPLY WITH A DOUBLE WORD RESULT
    197					; *-$LDIV-*-DIVIDE
    198					;
    199					; $LMUL1 PERFORMS AS 'MUL  R0,R3'
    200					; $LMUL2 PERFORMS AS 'MUL  R0,R4'
    201					; $LDIV  PERFORMS AS 'DIV  R0,R4'
    202					;
    203					;-
    204
    205	000174	010446 			$LMUL1::MOV	R4,-(SP)	;SAVE R4 AND R5
    206	000176	010546 				MOV	R5,-(SP)	;
    207	000200	010304 				MOV	R3,R4		;COPY MULTIPLICAND INTO R4
    208	000202					CALL	$LMUL2		;PERFORM 2-WORD RESULT MULTIPLY
    209	000206	010503 				MOV	R5,R3		;PUT SINGLE PRECISION ANSWER IN R3
    210	000210	012605 				MOV	(SP)+,R5	;RESTORE R5 AND R4
    211	000212	012604 				MOV	(SP)+,R4	;
    212	000214					RETURN
    213
    214	000216	010046 			$LMUL2::MOV	R0,-(SP)	;SAVE R0
    215	000220	010146 				MOV	R1,-(SP)	;SAVE R1
    216	000222	010446 				MOV	R4,-(SP)	;COPY MULTIPLICAND INTO STACK
    217	000224	005001 				CLR	R1		;INIT HIGH WORD OF MULTIPLIER
    218	000226	005004 				CLR	R4		;INITIALIZE THE DOUBLE WORD RESULT
    219	000230	005005 				CLR	R5		;
    220	000232	005716 			10$:	TST	(SP)		;TEST REMAINDER OF MULTIPLICAND
    221	000234	001410 				BEQ	30$		;IF ZERO, WE'RE DONE
    222	000236	006016 				ROR	(SP)		;DIVIDE MULTIPLICAND BY TWO
    223	000240	103003 				BCC	20$		;SKIP IF BIT-0 WAS ZERO
    224	000242	060005 				ADD	R0,R5		;ELSE, ADD THE MULTIPLIER ...
    225	000244	005504 				ADC	R4		;... TO THE DOUBLE WORD RESULT
    226	000246	060104 				ADD	R1,R4
    227	000250	006300 			20$:	ASL	R0		;DOUBLE THE MULTIPLIER
    228	000252	006101 				ROL	R1		;...DOUBLE PRECISION
LBR	MACRO M1108  05-DEC-77 22:23  PAGE 2-4


    229	000254	000766 				BR	10$		;AND REPEAT
    230	000256	005726 			30$:	TST	(SP)+		;CLEAN THE STACK
    231	000260	012601 				MOV	(SP)+,R1	;RESTORE R1
    232	000262	012600 				MOV	(SP)+,R0	;RESTORE R0
    233	000264	005704 				TST	R4		;EXAMINE HIGH ORDER OF RESULT
    234	000266	001002 				BNE	40$		;IF NOT NULL, SET CARRY
    235	000270	005705 				TST	R5		;ELSE, EXAMINE LOW ORDER OF RESULT
    236	000272	100001 				BPL	50$		;IF NOT NEGATIVE, LEAVE
    237	000274	000261 			40$:	SEC			;SET CARRY
    238	000276				50$:	RETURN
    239
    240
    241	000300	010346 			$LDIV::	MOV	R3,-(SP)	;SAVE R3
    242	000302	012746 	000040 			MOV	#32.,-(SP)	;DIVIDEND HAS 32. BITS
    243	000306	005003 				CLR	R3		;INITIALIZE THE REMAINDER
    244	000310	006305 			10$:	ASL	R5		;SHIFT THE REMAINING DIVIDEND ...
    245	000312	006104 				ROL	R4		;... LEFT AND INTO THE REMAINDER
    246	000314	006103 				ROL	R3		;
    247	000316	020300 				CMP	R3,R0		;COMPARE REMAINDER W/ DIVISOR
    248	000320	103402 				BLO	20$		;SKIP IF IT'S LESS
    249	000322	160003 				SUB	R0,R3		;SUBTRACT DIVISOR FROM REMAINDER
    250	000324	005205 				INC	R5		;AND INCREMENT THE QUOTIENT
    251	000326	005316 			20$:	DEC	(SP)		;DECREMENT ITERATION COUNTER
    252	000330	001367 				BNE	10$		;CONTINUE UNTIL IT'S ZERO
    253	000332	005726 				TST	(SP)+		;PURGE ITERATION COUNT FROM STACK
    254	000334	010504 				MOV	R5,R4		;PUT QUOTIENT IN R4
    255	000336	010305 				MOV	R3,R5		;PUT REMAINDER IN R5
    256	000340	012603 				MOV	(SP)+,R3	;RESTORE R3
    257	000342					RETURN
    258
    259
    260						.ENDC
    261
    262
    263					;+
    264					; **-$NWLNK-*-INSERT ELEMENT INTO VIRTUAL MEMORY TABLE
    265					;
    266					; THIS ROUTINE INSERTS AN ELEMENT INTO A LINKED-LIST VIRTUAL MEMORY
    267					; TABLE.  IT UNLOCKS AND MARKS DIRTY THE PAGE CONTAINING THE LINK OF
    268					;  THE CURRENT TABLE ENTRY, IF NECESSARY.  FINALLY, THE NEWLY INSERTED
    269					; ENTRY BECOMES THE CURRENT ENTRY.
    270					;
    271					; INPUTS:
    272					;	R0 = ADDRESS OF NEW ENTRY
    273					;	R1 = VIRTUAL MEMORY LOCATION OF NEW ENTRY
    274					;	R4 = ADDRESS OF CURRENT ENTRY
    275					;	R5 = VIRTUAL MEMORY LOCATION OF CURRENT ENTRY
    276					;
    277					; OUTPUTS:
    278					;	R0 & R1 ARE LOST
    279					;	R4 = ADDRESS OF NEW CURRENT ENTRY
    280					;	R5 = VIRTUAL MEMORY LOCATION OF NEW CURRENT ENTRY
    281					;
    282					;-
    283
    284	000344	011410 			$NWLNK::MOV	(R4),(R0)	;LINK NEXT ELEMENT TO NEW ENTRY
    285	000346	010114 				MOV	R1,(R4)		;LINK NEW ENTRY TO CURRENT ELEMENT
LBR	MACRO M1108  05-DEC-77 22:23  PAGE 2-5


    286	000350	010546 				MOV	R5,-(SP)	;SAVE VIRTUAL LOCATION OF CURRENT ELE
    287	000352	010004 				MOV	R0,R4		;NEW ENTRY BECOMES CURRENT ELEMENT ...
    288	000354	010105 				MOV	R1,R5		;... BY STORING ITS ADDR AND V.L.
    289	000356	012601 				MOV	(SP)+,R1	;PUT VIRTUAL LOCN OF OLD ELE IN R1
    290	000360	001404 				BEQ	10$		;BRANCH IF IT WAS A LIST HEAD
    291	000362					CALL	$WRMPG		;ELSE, MARK DIRTY AND ...
    292	000366					CALL	$UNLPG		;... UNLOCK PAGE WITH OLD LINK
    293	000372				10$:	RETURN
    294
    295
    296		000006'				.END	$LBR
LBR	MACRO M1108  05-DEC-77 22:23  PAGE 2-6
SYMBOL TABLE

CO$SW = ****** GX	F.EOBB= 000032   	F.RCTL= 000017   	Q$$CMO= 000000   	$LBR    000006RG
CR$SW = ****** GX	F.ERR = 000052   	F.RSIZ= 000002   	R$$11M= 000000   	$LDIV   000300RG
DL$SW = ****** GX	F.FACC= 000043   	F.RTYP= 000000   	SPSAV   000004R  	$LISCD= ****** GX
F.ALOC= 000040   	F.FFBY= 000014   	F.STBK= 000036   	S$$LIB= 000000   	$LMUL1  000174RG
F.BBFS= 000062   	F.FNAM= 000110   	F.UNIT= 000136   	S.FATT= 000016   	$LMUL2  000216RG
F.BDB = 000070   	F.FNB = 000102   	F.URBD= 000020   	S.FDB = 000140   	$NWLNK  000344RG
F.BGBC= 000057   	F.FTYP= 000116   	F.VBN = 000064   	S.FNAM= 000006   	$OPEN   000130RG
F.BKDN= 000026   	F.FVER= 000120   	F.VBSZ= 000060   	S.FNB = 000036   	$QUIT   000106RG
F.BKDS= 000020   	F.HIBK= 000004   	IN$SW = ****** GX	S.FNBW= 000017   	$RSTRT  000016RG
F.BKEF= 000050   	F.LUN = 000042   	N.DID = 000024   	S.FNTY= 000004   	$SAVRG= ****** GX
F.BKP1= 000051   	F.MBCT= 000054   	N.DVNM= 000032   	S.FTYP= 000002   	$UNLPG= ****** GX
F.BKST= 000024   	F.MBC1= 000055   	N.FID = 000000   	S.NFEN= 000020   	$VRSN   000000RG
F.BKVB= 000064   	F.MBFG= 000056   	N.FNAM= 000006   	$CLEAR  000114RG 	$WRMPG= ****** GX
F.CNTG= 000034   	F.NRBD= 000024   	N.FTYP= 000014   	$CMP  = ****** GX	$$    = 000067
F.DFNB= 000046   	F.NREC= 000030   	N.FVER= 000016   	$CRE  = ****** GX	.FINIT= ****** G
F.DSPT= 000044   	F.OVBS= 000030   	N.NEXT= 000022   	$DECD = ****** GX	.OPFNB= ****** G
F.DVNM= 000134   	F.RACC= 000016   	N.STAT= 000020   	$DEL  = ****** GX	.PARSE= ****** GX
F.EFBK= 000010   	F.RATT= 000001   	N.UNIT= 000034   	$INIT = ****** GX	...TPC= 000140
F.EFN = 000050   	F.RCNM= 000034   	PAR$$$= 000000   	$INS  = ****** GX

. ABS.	000000	   000
      	000374	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  2045 WORDS  ( 8 PAGES)
DYNAMIC MEMORY:  3104 WORDS  ( 11 PAGES)
ELAPSED TIME:  00:00:18
[42,10]LBR,[42,20]LBR/-SP=[42,30]LBRPRF,LBR
LBRCD	MACRO M1108  05-DEC-77 22:23  PAGE 2


      1						.TITLE	LBRCD
      2						.IDENT	/X03.2/
      3
      4					;
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      6					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      7					;
      8					;	DEC ASSUMES NO RESPONSIBLIITY FOR THE USE
      9					;	OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT
     10					;	WHICH IS NOT SUPPLIED BY DEC.
     11					;
     12					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     13					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     14					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     15					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     16					;
     17					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     18					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     19					; EQUIPMENT CORPORATION.
     20					;
     21					; VERSION X03.2
     22					;
     23					; WRITTEN BY:
     24					;	GEORGE W. BERRY
     25					;
     26					; MODIFIED BY:
     27					;	C.A. D'ELIA	16-MAY-74
     28					;	C.A. D'ELIA	29-JUN-74  (VIRTUAL TABLES)
     29					;	THOMAS J. MILLER 29-OCT-74
     30					;
     31
     32					;
     33					; MACRO LIBRARY CALLS
     34					;
     35
     36						.MCALL	FDOFF$
     37	000000					FDOFF$	DEF$L
     38
     39
     40						.IF NDF	S$$LIB
     41
     42
     43						.MCALL	OPEN$W
     44
     45						.IFF
     46
     47						.MCALL	FCSBT$
     48	000000					FCSBT$
     49
     50
     51						.ENDC
     52
     53
     54					;
     55					; LOCAL DATA
     56					;
     57
LBRCD	MACRO M1108  05-DEC-77 22:23  PAGE 2-1


     58	000000	000000G			DDBLK:	.WORD	$DEND
     59	000002	000000G				.WORD	$DBLK
     60	000004	000000G				.WORD	$DMN
     61
     62
     63	000006	000000G			DGBLK:	.WORD	$DGEND
     64	000010	000000G				.WORD	$DGBLK
     65	000012	000000 			DGSTRT:	.WORD	0
     66
     67					;
     68					; DEFINE DEFAULT PARAMETERS FOR /CR
     69					;
     70						.MACRO	DEFAULT NAME,SIZ,EPT,MNT,TYP,LBRTYP
     71						.RAD50	/NAME/
     72						.WORD	SIZ		;DEFAULT FOR $SIZ
     73						.WORD	EPT		;DEFAULT FOR $EPT
     74						.WORD	MNT		;DEFAULT FOR $MNT
     75						.WORD	TYP		;DEFAULT FOR $TYP
     76						.PSECT	DFTYP,D,GBL,OVR	;NOTE - THIS PSECT IS ALLOCATED IN THE
     77									;   ROOT.  THE FIRST WORD OF THE PSECT
     78									;   IS ACCESSED THROUGH THE GLOBAL SYMBOL
     79									;   LBRTAB DEFINED IN THE MODULE LBRDF.
     80						.RAD50	/LBRTYP/	;DEFAULT LIBRARY FILE EXTENSION
     81						.PSECT
     82						.ENDM
     83					;
     84					;
     85	000014				DFTAB:
     86	000014					DEFAULT	OBJ,100.,512.,256.,TY$OBJ,OLB
     87		000012 			DFESIZ=	.-DFTAB
     88	000026					DEFAULT	MAC,100.,0,256.,TY$MAC,MLB
     89	000040	000000 				.WORD	0		;MARK END OF DEFAULT TABLE
     90
     91					;+
     92					;
     93					; **-$DECD- COMMAND LINE DECODER FOR LIBRARIAN
     94					;
     95					; THIS ROUTINE SCANS THE INPUT COMMAND LINE, SETTING UP
     96					; THE SWITCH OPTION WORD, $SWTCH.  THE LEGALITY AND SYNTAX
     97					; OF THE COMMAND LINE IS ALSO VERIFIED.  ON RETURN, THE
     98					; LIBRARY FILE IS OPEN FOR UPDATE (EXCEPT IF /CR WAS
     99					; SPECIFIED).
    100					;
    101					; INPUTS:
    102					;
    103					;	R1 = ADDRESS OF CSI BLOCK
    104					;	R5 = $SWTCH ADDRESS
    105					;
    106					; OUTPUTS:
    107					;
    108					;	NONE
    109					;
    110					;-
    111
    112	000042				$DECD::	SAVRG			;SAVE R3 - R5
    113	000046	016700 	000000G			MOV	$LBRPT,R0	;SCAN FOR FIRST OUTPUT FILE
    114	000052					CALL	$SCANO
LBRCD	MACRO M1108  05-DEC-77 22:23  PAGE 2-2


    115	000056	103007 				BCC	10$		;BRANCH IF LIBRARY FILE READ
    116	000060	032715 	000000G			BIT	#DF$SW,(R5)	;DEFAULT SWITCH MAY STAND ALONE
    117	000064	001007 				BNE	15$		;BRANCH IF IT IS PRESENT
    118	000066	012701 				MOV	(PC)+,R1	;ERROR-NO LIBRARY SPECIFIED
    119	000070	   000G	   000G			.BYTE	E$R20,S$V2
    120	000072	000167 	000372 			JMP	ERR		;GO TO ERROR EXIT
    121
    122	000076	032715 	000000G		10$:	BIT	#DF$SW,(R5)	;DEFAULT SWITCH SPECIFIED?
    123	000102	001437 				BEQ	32$		;BRANCH IF NOT
    124	000104	006104 			15$:	ROL	R4		;SAVE C-BIT IN R4
    125	000106	005067 	000000G			CLR	DF$TYP		;INITIALLY CLEAR DEFAULT TYPE
    126	000112	012700 	000003G			MOV	#L$BUF+3,R0	;POINT TO DF SWITCH VALUE
    127	000116	105710 				TSTB	(R0)		;NO VALUE SPECIFIED?
    128	000120	001424 				BEQ	30$		;IF SO, LEAVE IT CLEAR (OBJ TYPE)
    129	000122	005001 				CLR	R1		;OTHERWISE SET TO CONVERT VALUE
    130	000124					CALL	$CAT5		;CONVERT TO RAD50 STOPPING ON .OR $
    131	000130	005003 				CLR	R3		;INITIALIZE TABLE POINTER
    132	000132	005763 	000014'		20$:	TST	DFTAB(R3)	;AT END OF TABLE?
    133	000136	001410 				BEQ	25$		;YES, ILLEGAL TYPE
    134	000140	020163 	000014'			CMP	R1,DFTAB(R3)	;COMPARE SWITCH VALUE WITH TYPE IN TABLE
    135	000144	001412 				BEQ	30$		;DONE IF MATCH FOUND
    136	000146	005267 	000000G			INC	DF$TYP		;OTHERWISE BUMP DEFAULT TYPE
    137	000152	062703 	000012 			ADD	#DFESIZ,R3	;...AND TABLE POINTER
    138	000156	000765 				BR	20$		;TRY AGAIN
    139	000160	005067 	000000G		25$:	CLR	DF$TYP		;ERROR, FORCE DEFAULT TYPE TO OBJ
    140	000164	012701 				MOV	(PC)+,R1	;PICK UP ERROR MESSAGE CODE
    141	000166	   000G	   000G			.BYTE	E$R5,S$V2	;ILLEGAL LIBRARY TYPE
    142	000170	000537 				BR	ERR		;BRANCH TO PRINT
    143	000172	006004 			30$:	ROR	R4		;RESTORE SAVED C-BIT
    144	000174	103002 				BCC	32$		;CONTINUE IF LIBRARY FILE WAS SPECIFIED
    145	000176	000167 	000360 			JMP	EXIT		;OTHERWISE GET NEXT COMMAND LINE
    146	000202	016703 	000000G		32$:	MOV	DF$TYP,R3	;PICK UP DEFAULT TYPE
    147	000206	006303 				ASL	R3		;CONVERT TO WORD OFFSET
    148	000210	016367 	000000G	000014G		MOV	LBRTAB(R3),LBRNAM+N.FTYP ;DEFAULT EXTENSION FOR LIBRARY FILE
    149	000216	032715 	000000G			BIT	#CO$SW,(R5)	;COMPRESS OPTION?
    150	000222	001406 				BEQ	60$		;BRANCH IF NOT
    151	000224	032715 	000000G			BIT	#XC$SW,(R5)	;INSURE LEGAL SWITCH COMBINATION
    152	000230	001554 				BEQ	EXIT		;BRANCH TO LEAVE IF ONLY /CO
    153	000232	012701 			35$:	MOV	(PC)+,R1	;ILLEGAL SWITCH COMBINATION
    154	000234	   000G	   000G			.BYTE	E$R21,S$V2
    155	000236	000514 				BR	ERR
    156	000240	052715 	000000G		60$:	BIS	#IN$SW,(R5)	;/IN IS FORCED DEFAULT
    157	000244	032715 	000000G			BIT	#CR$SW,(R5)	;/CR?
    158	000250	001013 				BNE	70$		;BRANCH IF /CR
    159	000252	012700 	000000'			MOV	#DDBLK,R0	;ASSUME /DE
    160	000256					CALL	CSTOR
    161	000262	010067 	177524 			MOV	R0,DGSTRT
    162	000266	012700 	000006'			MOV	#DGBLK,R0	;ASSUME /DG ALSO
    163	000272					CALL	CSTOR
    164	000276					RETURN			;EXIT
    165
    166	000300	032715 	000000G		70$:	BIT	#DL$SW,(R5)	;/DE WITH /CR IS INVALID
    167	000304	001352 				BNE	35$		;BRANCH IF /DE
    168	000306	012700 	000000G			MOV	#L$BUF,R0	;SET UP DEFAULTS
    169	000312	012704 	000014'			MOV	#DFTAB,R4	;BASED ON TYPE
    170	000316	005710 				TST	(R0)		;NULL TYPE IMPLIES DEFAULT
    171	000320	001414 				BEQ	105$
LBRCD	MACRO M1108  05-DEC-77 22:23  PAGE 2-3


    172	000322	005001 				CLR	R1
    173	000324					CALL	$CAT5		;CONVERT TYPE SPEC. TO RAD50
    174
    175	000330	020114 			22$:	CMP	R1,(R4)		;CHECK FOR MATCH
    176	000332	001417 				BEQ	21$		;BRANCH IF MATCH
    177	000334	062704 	000012 			ADD	#DFESIZ,R4	;GO ON TO NEXT DFTAB ENTRY
    178	000340	005714 				TST	(R4)		;IS IT 0 (END OF TABLE)?
    179	000342	001372 				BNE	22$		;BRANCH IF MORE TO SCAN
    180	000344	012701 				MOV	(PC)+,R1	;ILLEGAL TYPE SPECIFICATION
    181	000346	   000G	   000G			.BYTE	E$R5,S$V2
    182	000350	000447 				BR	ERR		;TAKE ERROR EXIT
    183
    184	000352	016703 	000000G		105$:	MOV	DF$TYP,R3	;PICK UP DEFAULT TYPE
    185	000356	005203 				INC	R3		;MAKE IT A LOOP COUNTER
    186	000360	000402 				BR	115$		;BRANCH TO LOOP TEST
    187	000362	062704 	000012 		110$:	ADD	#DFESIZ,R4	;BUMP TABLE POINTER
    188	000366				115$:	SOB	R3,110$
    189	000372	005724 			21$:	TST	(R4)+		;GET DEFAULTS
    190	000374	012703 	000003 			MOV	#3,R3
    191	000400	012702 	000000G			MOV	#$SIZ,R2
    192	000404	005712 			23$:	TST	(R2)		;DEFAULT NEEDED?
    193	000406	001001 				BNE	24$		;SKIP IF NOT
    194	000410	011412 				MOV	(R4),(R2)	;STORE DEFAULT
    195	000412	022422 			24$:	CMP	(R4)+,(R2)+	;AND GET NEXT DEFAULT
    196	000414					SOB	R3,23$
    197	000420	011403 				MOV	(R4),R3		;PICK UP TYPE
    198	000422	010312 				MOV	R3,(R2)		;STORE IT IN $TYP
    199	000424	006303 				ASL	R3		;CONVERT TYPE TO WORD OFFSET
    200	000426	016367 	000000G	000014G		MOV	LBRTAB(R3),LBRNAM+N.FTYP ;SET DEFAULT EXTENSION FOR LBR FILE
    201
    202	000434	016700 	000000G			MOV	$LBRPT,R0	;OPEN LIBRARY FILE
    203	000440	016760 	000000G	000034 	CREATE:	MOV	$SIZ,F.CNTG(R0)	;SET FILE SIZE (CONTIGUOUS)
    204
    205
    206						.IF NDF	S$$LIB
    207
    208
    209						OPEN$W	R0
    210
    211						.IFF
    212
    213	000446	012701 	000016 			MOV	#FO.WRT,R1	;SPECIFY OPEN FOR WRITE
    214	000452					CALL	$OPEN		;PARSE FILENAME AND OPEN FILE
    215
    216
    217						.ENDC
    218
    219
    220	000456	103041 				BCC	EXIT
    221	000460	012701 			OERR:	MOV	(PC)+,R1	;OPEN FAILURE
    222	000462	   000G	   000G			.BYTE	E$R11,S$V2
    223	000464	016002 	000000G			MOV	R$NAME(R0),R2
    224	000470	000167 	000000G		ERR:	JMP	$ERMSG		;FATAL ERROR EXIT
    225
    226
    227					;+
    228					;
LBRCD	MACRO M1108  05-DEC-77 22:23  PAGE 2-4


    229					; THIS ROUTINE CONVERTS A LIST OF 6 CHARACTER NAMES INTO
    230					; RADIX 50 AND STORES THEM IN A PRE-ALLOCATED TABLE.
    231					;
    232					; INPUTS:
    233					;
    234					;	R0 = ADDRESS OF PARAMETER BLOCK
    235					;	WHERE THE PARAMETER BLOCK FORMAT IS:
    236					;		.WORD	END-OF-STORAGE-TABLE
    237					;		.WORD	START-OF-NAME-LIST
    238					;		.WORD	START-OF-STORAGE-TABLE
    239					;
    240					; OUTPUTS:
    241					;
    242					;	R0 = NEXT WORD IN STORAGE TABLE
    243					;
    244					;-
    245
    246	000474				CSTOR:	SAVRG			;SAVE R3-R5
    247	000500	012003 				MOV	(R0)+,R3	;GET NUMBER OF NAMES
    248	000502	012004 				MOV	(R0)+,R4	;GET START OF ASCII LIST
    249	000504	011005 				MOV	(R0),R5		;GET START OF STORAGE LIST
    250
    251	000506	010400 			10$:	MOV	R4,R0		;GET STRING ADDRESS
    252	000510	010601 				MOV	SP,R1		;NON-ZERO PERMITS "." AND "$"
    253	000512					CALL	$CAT5		;CONVERT STRING TO RAD50
    254	000516	010125 				MOV	R1,(R5)+	;STORE FIRST THREE CHARS IN RAD50
    255	000520	001417 				BEQ	30$		;EXIT IF END OF LIST
    256	000522					CALL	$CAT5		;CONVERT REST OF STRING
    257	000526	103006 				BCC	20$		;BRANCH IF ALL SIX CHARS CONVERTED
    258	000530	005702 				TST	R2		;CHECK TERMINAL CHARACTER
    259	000532	001404 				BEQ	20$		;NULL IS ONLY LEGAL TERMINAL
    260	000534	010402 				MOV	R4,R2
    261	000536	012701 				MOV	(PC)+,R1	;INDICATE BAD NAME ERROR
    262	000540	   000G	   000G			.BYTE	E$R19,S$V2
    263	000542	000752 				BR	ERR
    264
    265	000544	010125 			20$:	MOV	R1,(R5)+	;STORE VALUE (CHARS 3-6)
    266	000546	062704 	000006 			ADD	#6,R4		;GET NEXT NAME
    267	000552	020305 				CMP	R3,R5		;REACHED END OF TABLE?
    268	000554	101354 				BHI	10$		;LOOP IF NOT
    269	000556	005025 				CLR	(R5)+
    270	000560	010500 			30$:	MOV	R5,R0
    271	000562				EXIT:	RETURN
    272
    273
    274					;
    275		000001 				.END
LBRCD	MACRO M1108  05-DEC-77 22:23  PAGE 2-5
SYMBOL TABLE

CO$SW = ****** GX	FD.DIR= 000010   	F.DVNM= 000134   	IN$SW = ****** GX	S$V2  = ****** GX
CREATE  000440R  	FD.FTN= 000001   	F.EFBK= 000010   	LBRNAM= ****** GX	S$$LIB= 000000
CR$SW = ****** GX	FD.INS= 000010   	F.EFN = 000050   	LBRTAB= ****** GX	S.FATT= 000016
CSTOR   000474R  	FD.PLC= 000004   	F.EOBB= 000032   	L$BUF = ****** GX	S.FDB = 000140
DDBLK   000000R  	FD.RAH= 000001   	F.ERR = 000052   	NB.DEV= 000200   	S.FNAM= 000006
DFESIZ= 000012   	FD.RAN= 000002   	F.FACC= 000043   	NB.DIR= 000100   	S.FNB = 000036
DFTAB   000014R  	FD.REC= 000001   	F.FFBY= 000014   	NB.NAM= 000004   	S.FNBW= 000017
DF$SW = ****** GX	FD.RWM= 000001   	F.FNAM= 000110   	NB.SD1= 000400   	S.FNTY= 000004
DF$TYP= ****** GX	FD.SDI= 000020   	F.FNB = 000102   	NB.SD2= 001000   	S.FTYP= 000002
DGBLK   000006R  	FD.SQD= 000040   	F.FTYP= 000116   	NB.SNM= 000040   	S.NFEN= 000020
DGSTRT  000012R  	FD.TTY= 000004   	F.FVER= 000120   	NB.STP= 000020   	TY$MAC= ****** GX
DL$SW = ****** GX	FD.WBH= 000002   	F.HIBK= 000004   	NB.SVR= 000010   	TY$OBJ= ****** GX
ERR     000470R  	FO.APD= 000106   	F.LUN = 000042   	NB.TYP= 000002   	XC$SW = ****** GX
EXIT    000562R  	FO.MFY= 000002   	F.MBCT= 000054   	NB.VER= 000001   	$CAT5 = ****** GX
E$R11 = ****** GX	FO.RD = 000001   	F.MBC1= 000055   	N.DID = 000024   	$DBLK = ****** GX
E$R19 = ****** GX	FO.UPD= 000006   	F.MBFG= 000056   	N.DVNM= 000032   	$DECD   000042RG
E$R20 = ****** GX	FO.WRT= 000016   	F.NRBD= 000024   	N.FID = 000000   	$DEND = ****** GX
E$R21 = ****** GX	F.ALOC= 000040   	F.NREC= 000030   	N.FNAM= 000006   	$DGBLK= ****** GX
E$R5  = ****** GX	F.BBFS= 000062   	F.OVBS= 000030   	N.FTYP= 000014   	$DGEND= ****** GX
FA.APD= 000100   	F.BDB = 000070   	F.RACC= 000016   	N.FVER= 000016   	$DMN  = ****** GX
FA.CRE= 000010   	F.BGBC= 000057   	F.RATT= 000001   	N.NEXT= 000022   	$ERMSG= ****** GX
FA.EXT= 000004   	F.BKDN= 000026   	F.RCNM= 000034   	N.STAT= 000020   	$LBRPT= ****** GX
FA.NSP= 000100   	F.BKDS= 000020   	F.RCTL= 000017   	N.UNIT= 000034   	$OPEN = ****** GX
FA.RD = 000001   	F.BKEF= 000050   	F.RSIZ= 000002   	OERR    000460R  	$SAVRG= ****** GX
FA.SHR= 000040   	F.BKP1= 000051   	F.RTYP= 000000   	Q$$CMO= 000000   	$SCANO= ****** GX
FA.TMP= 000020   	F.BKST= 000024   	F.STBK= 000036   	R$NAME= ****** GX	$SIZ  = ****** GX
FA.WRT= 000002   	F.BKVB= 000064   	F.UNIT= 000136   	R$$11M= 000000   	$$    = 000067
FD.BLK= 000010   	F.CNTG= 000034   	F.URBD= 000020   	R.FIX = 000001   	...GBL= 000000
FD.CCL= 000002   	F.DFNB= 000046   	F.VBN = 000064   	R.VAR = 000002   	...TPC= 000140
FD.CR = 000002   	F.DSPT= 000044   	F.VBSZ= 000060

. ABS.	000000	   000
      	000564	   001
DFTYP 	000004	   002
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  2073 WORDS  ( 9 PAGES)
DYNAMIC MEMORY:  3104 WORDS  ( 11 PAGES)
ELAPSED TIME:  00:00:19
[42,10]LBRCD,[42,20]LBRCD/-SP=[42,30]LBRPRF,LBRCD
LBRCM	MACRO M1108  05-DEC-77 22:24  PAGE 2


      1						.TITLE	LBRCM
      2						.IDENT	/X03.3/
      3
      4					;
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      6					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      7					;
      8					;	DEC ASSUMES NO RESPONSIBLIITY FOR THE USE
      9					;	OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT
     10					;	WHICH IS NOT SUPPLIED BY DEC.
     11					;
     12					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     13					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     14					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     15					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     16					;
     17					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     18					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     19					; EQUIPMENT CORPORATION.
     20					;
     21					; VERSION X03.3
     22					;
     23					; WRITTEN BY:
     24					;	GEORGE W. BERRY
     25					;
     26					; MODIFIED BY:
     27					;	C.A. D'ELIA	16-JUN-74
     28					;	C.A. D'ELIA	30-JUN-74  (VIRTUAL TABLES)
     29					;	C.A. D'ELIA	01-AUG-74
     30					;	THOMAS J. MILLER 07-NOV-74
     31					;			12-NOV-74
     32					;			18-MAR-75
     33					;
     34					;
     35
     36					;
     37					; MACRO LIBRARY CALLS
     38					;
     39
     40						.MCALL	FDOFF$
     41	000000					FDOFF$	DEF$L
     42						.MCALL	IOERR$
     43	000000					IOERR$
     44
     45
     46						.IF NDF	S$$LIB
     47
     48
     49						.MCALL	OPEN$R,OPEN$W,CLOSE$,GET$,PUT$
     50
     51						.IFF
     52
     53						.MCALL	FCSBT$
     54	000000					FCSBT$
     55						.MCALL	CLOSE$,GET$S,PUT$
     56
     57
LBRCM	MACRO M1108  05-DEC-77 22:24  PAGE 2-1


     58						.ENDC
     59
     60
     61					;
     62					; FILE POINTERS FOR COMPRESS
     63					;
     64
     65	000000				IPOINT:	.BLKW	2
     66	000004				OPOINT:	.BLKW	2
     67
     68					;
     69					; INPUT BUFFER FOR COMPRESS
     70					;
     71		000200 			BUFIZ	=128.			;BUFFER SIZE IN BYTES
     72
     73	000010				RECBUF:	.BLKB	BUFIZ
     74
     75					;+
     76					;
     77					; **-$CMP-COMPRESS OPTION
     78					;
     79					; THE COMPRESS OPTION REMOVES LOGICALLY DELETED SPACE FROM A LIBRARY FILE
     80					; BY COPYING IT ONTO A NEW LIBRARY FILE.  DURING THE COPY
     81					; OPERATION THE SPACE ALLOCATED TO THE MNT AND EPT MAY BE CHANGED.
     82					;
     83					; INPUTS:
     84					;
     85					;	$LBRPT	=NEW LIBRARY FILE FDB, ETC
     86					;
     87					; OUTPUTS:
     88					;
     89					;	NONE
     90					;
     91					;-
     92
     93	000210				$CMP::	SAVRG			;SAVE R3-R5
     94	000214	012704 	000000G			MOV	#$CMPPT,R4	;POINT R4 TO COMPRESS FDB, ETC
     95	000220	012714 	000000G			MOV	#CMPPT,(R4)	;RESTORE PROPER ADDRESS
     96	000224	011400 				MOV	(R4),R0		;GET INPUT FDB ADDR FOR COMPRESS
     97	000226	012701 	000000G			MOV	#$CSIBK,R1	;PUT ADDR OF CSI BLOCK IN R1
     98	000232					CALL	$SCANI		;GET INPUT FILE SPECIFICATION
     99	000236	103004 				BCC	20$		;BRANCH IF FILE WAS PRESENT
    100	000240	012701 			10$:	MOV	(PC)+,R1	;INPUT FILE ERROR WITH /CO??
    101	000242	   000G	   000G			.BYTE	E$R26,S$V2
    102	000244	000167 	000000G			JMP	$ERMSG		;FATAL ERROR EXIT
    103	000250	005700 			20$:	TST	R0		;INSURE ONLY ONE INPUT FILE
    104	000252	001772 				BEQ	10$		;ERROR IF NOT
    105	000254	016746 	000000G			MOV	$LBRPT,-(SP)	;EXCHANGE $LBRPT AND $CMPPT
    106	000260	011467 	000000G			MOV	(R4),$LBRPT
    107	000264	012701 	000001 			MOV	#FO.RD,R1	;SPECIFY OPEN FOR READ
    108	000270	016767 	000014G	000014G		MOV	LBRNAM+N.FTYP,CMPNAM+N.FTYP ;COPY DEFAULT EXTENSION
    109	000276					CALL	$RDLHD		;READ LBR HEADER
    110	000302	116700 	000000G			MOVB	L$TYP,R0	;PICK UP LBR TYPE FROM HEADER
    111	000306	006300 				ASL	R0		;CONVERT TO WORD OFFSET
    112	000310	016067 	000000G	000014G		MOV	LBRTAB(R0),LBRNAM+N.FTYP ;SET DEFAULT OUTPUT EXTENSION
    113	000316	012600 				MOV	(SP)+,R0	;OUTPUT FDB PTR TO R0
    114	000320	010014 				MOV	R0,(R4)		;AND TO $CMPPT
LBRCM	MACRO M1108  05-DEC-77 22:24  PAGE 2-2


    115	000322	005767 	000000G			TST	$SIZ		;USE DEFAULT SIZE?
    116	000326	001003 				BNE	CREATE		;BRANCH IF NOT
    117	000330	016767 	000006G	000000G		MOV	CMPPT+F.HIBK+2,$SIZ ;SET UP DEFAULT SIZE
    118	000336	016760 	000000G	000034 	CREATE:	MOV	$SIZ,F.CNTG(R0)	;SET FILE SIZE (CONTIGUOUS)
    119
    120
    121						.IF NDF	S$$LIB
    122
    123
    124						OPEN$W	R0		;CREATE NEW LIBRARY FILE
    125
    126						.IFF
    127
    128	000344	012701 	000016 			MOV	#FO.WRT,R1	;SPECIFY OPEN FOR WRITE
    129	000350					CALL	$OPEN		;PARSE FILENAME AND OPEN FILE
    130
    131
    132						.ENDC
    133
    134
    135	000354	103004 				BCC	READLH		;BRANCH IF OPEN SUCCEEDED
    136	000356	012701 			OERR:	MOV	(PC)+,R1	;FILE OPEN FAILURE
    137	000360	   000G	   000G			.BYTE	E$R11,S$V2
    138	000362	000167 	000626 		JMPERR:	JMP	ERRNM		;BRANCH TO COMMON ERROR EXIT
    139
    140	000366	010067 	000000G		READLH:	MOV	R0,$OPNFL	;INDICATE FILE OPEN ON 'CMPPT'
    141	000372	012700 	000000G			MOV	#L$MS,R0	;POINT R0 TO SIZE OF MNT ENTRIES
    142	000376	112003 				MOVB	(R0)+,R3	;PUT MNT ENTRY SIZE IN R3
    143	000400	005200 				INC	R0		;SKIP UNUSED BYTE
    144	000402	012002 				MOV	(R0)+,R2	;GET START VBN OF MNT  (L$MT)
    145	000404					MUL	(R0),R3		;COMPUTE SIZE OF MNT IN BYTES  (* L$MI)
    146	000412	005303 				DEC	R3
    147	000414	052703 	000777 			BIS	#777,R3
    148	000420	005203 				INC	R3		;GET NEXT HIGHER MULTIPLE OF 512. BYTES
    149	000422	000303 				SWAB	R3
    150	000424	006203 				ASR	R3		;DIVIDE BY 512.
    151	000426	060203 				ADD	R2,R3		;CALC FIRST MODULE VBN OF CURRENT LIBRARY
    152	000430	010367 	177344 			MOV	R3,IPOINT	;STORE IN POINTER BLOCK
    153	000434	005067 	177342 			CLR	IPOINT+2	;CLEAR BYTE-IN-BLOCK
    154	000440	016700 	000000G			MOV	$EPT,R0		;GET NEW # OF EPT ENTRIES TO ALLOCATE
    155	000444	012702 	000000G			MOV	#L$ES,R2	;POINT R2 TO SIZE OF EPT ENTRIES
    156	000450					CALL	COMP		;COMPUTE NEW L$EI AND L$EA
    157	000454	010546 				MOV	R5,-(SP)	;SAVE VBN OF NEW MNT
    158	000456					CALL	$RDEP		;READ THE EPT INTO VIRTUAL MEMORY
    159	000462	016700 	000000G			MOV	$MNT,R0		;GET NEW NUMBER OF MNT ENTRIES TO ALLOC
    160	000466	012702 	000000G			MOV	#L$MT,R2	;PNT R2 TO CURRENT START VBN OF MNT
    161	000472	011246 				MOV	(R2),-(SP)	;SAVE CURRENT MNT VBN
    162	000474	016612 	000002 			MOV	2(SP),(R2)	;SET L$MT TO NEW MNT VBN
    163	000500	005742 				TST	-(R2)		;POINT R2 TO SIZE OF MNT ENTRIES  (L$MS)
    164	000502					CALL	COMP		;COMPUTE NEW L$MI AND L$MA
    165	000506	012667 	000000G			MOV	(SP)+,L$MT	;RESTORE L$MT TO READ OLD MNT
    166	000512					CALL	$RDMN		;READ THE MNT INTO VIRTUAL MEMORY
    167	000516	012667 	000000G			MOV	(SP)+,L$MT	;RESTORE L$MT TO NEW START VBN OF MNT
    168	000522	010567 	177256 			MOV	R5,OPOINT	;STORE VBN OF FIRST MODULE HEADER
    169	000526	005067 	177254 			CLR	OPOINT+2	;CLEAR BYTE-IN-BLOCK OFFSET
    170	000532	010502 				MOV	R5,R2		;GET VBN FOR POINT
    171	000534	016700 	000000G			MOV	$CMPPT,R0	;GET ADDR OF COMPRESS FDB IN R0
LBRCM	MACRO M1108  05-DEC-77 22:24  PAGE 2-3


    172	000540	005001 				CLR	R1		;HIGH VBN=0
    173	000542	005003 				CLR	R3		;BYTE IN BLOCK=0
    174	000544					CALL	.POINT		;POINT TO FIRST MODULE IN OUTPUT FILE
    175	000550	103006 				BCC	2$		;BRANCH IF .POINT IS OK
    176	000552	122760 	177766 	000052 		CMPB	#IE.EOF,F.ERR(R0) ;IGNORE EXPECTED EOF ERROR
    177	000560	001402 				BEQ	2$
    178	000562	000167 	000400 			JMP	PERR		;BRANCH IF OTHER ERROR
    179	000566	112760 	000002 	000000 	2$:	MOVB	#R.VAR,F.RTYP(R0)  ;VARIABLE LENGTH WRITES
    180					;
    181					; MAIN LOOP OF COMPRESS
    182					;
    183	000574	012701 	000000'		10$:	MOV	#IPOINT,R1	;GET CURRENT INPUT RECORD ADDR
    184	000600	010105 				MOV	R1,R5		;SAVE R1
    185	000602	021167 	000000G			CMP	(R1),L$NX	;END-OF-FILE?
    186	000606	103406 				BLO	11$		;NO...
    187	000610	101174 				BHI	CERR		;FATAL COMPRESS ERROR
    188	000612	026167 	000002 	000002G		CMP	2(R1),L$NX+2
    189	000620	001525 				BEQ	DONE		;END-OF-FILE REACHED
    190	000622	101167 				BHI	CERR		;FATAL COMPRESS ERROR
    191	000624				11$:	CALL	$RDMH		;READ MODULE HEADER
    192	000630	103567 				BCS	RERR		;FATAL READ ERROR
    193	000632	105767 	000000G			TSTB	$MHST		;IS THIS A DELETED MODULE?
    194	000636	001010 				BNE	12$		;YES, SKIP TABLE FIXUP
    195	000640	012702 	000000G			MOV	#$EPBLK,R2
    196	000644					CALL	FIXTAB		;FIX EPT
    197	000650	012702 	000000G			MOV	#$MNBLK,R2
    198	000654					CALL	FIXTAB		;FIX MNT
    199	000660	012501 			12$:	MOV	(R5)+,R1	;GET VBN
    200	000662	011502 				MOV	(R5),R2		;GET BYTE-IN-BLOCK
    201	000664					CALL	$NEXT		;COMPUTE NEXT MODULE HEADER
    202	000670	010215 				MOV	R2,(R5)		;SAVE NEXT MODULE HEADER ADDRESS
    203	000672	010145 				MOV	R1,-(R5)
    204	000674	105767 	000000G			TSTB	$MHST		;DELETED MODULE?
    205	000700	001335 				BNE	10$		;YES, PROCEED WITH COMPRESS
    206	000702	016701 	000000G			MOV	$LBRPT,R1	;GET INPUT FDB
    207	000706	016700 	000000G			MOV	$CMPPT,R0
    208	000712					PUT$	R0,#$MHBUF,F.NRBD(R1)  ;WRITE OUT MODULE HEADER
    209	000732	103455 				BCS	WERR
    210	000734				20$:	CALL	.MARK		;COMPUTE OUTPUT FILE POINTER
    211	000740	010267 	177040 			MOV	R2,OPOINT	;SAVE (LO) VBN
    212	000744	010367 	177036 			MOV	R3,OPOINT+2	;AND BYTE-IN-BLOCK OF NEXT RECORD
    213	000750	016700 	000000G			MOV	$LBRPT,R0	;GET INPUT FDB
    214	000754					CALL	.MARK		;GET INPUT FILE POINTER (CURRENT)
    215	000760	020327 	001000 			CMP	R3,#1000	;TEST FOR EXACT END OF BLOCK
    216	000764	001002 				BNE	25$		;BRANCH IF IT DOES NOT APPLY
    217	000766	005003 				CLR	R3		;ELSE, CONVERT POINTER TO START ...
    218	000770	005202 				INC	R2		;... OF NEXT BLOCK
    219	000772	020267 	177002 		25$:	CMP	R2,IPOINT	;CHECK FOR END-OF-MODULE
    220	000776	103405 				BLO	27$		;NOT THERE YET
    221	001000	101100 				BHI	CERR		;PAST EOM--FATAL ERROR
    222	001002	020367 	176774 			CMP	R3,IPOINT+2
    223	001006	001672 				BEQ	10$		;AT EOM--GO BACK TO MAIN LOOP
    224	001010	101074 				BHI	CERR		;PAST EOM--FATAL ERROR
    225	001012				27$:
    226
    227
    228						.IF NDF	S$$LIB
LBRCM	MACRO M1108  05-DEC-77 22:24  PAGE 2-4


    229
    230
    231						GET$	R0,#RECBUF,#BUFIZ  ;READ RECORD
    232
    233						.IFF
    234
    235	001012					GET$S	R0,#RECBUF,#BUFIZ  ;READ RECORD
    236
    237
    238						.ENDC
    239
    240
    241	001032	103466 				BCS	RERR		;READ ERROR
    242	001034	016701 	000000G			MOV	$LBRPT,R1
    243	001040					PUT$	$CMPPT,#RECBUF,F.NRBD(R1)  ;WRITE RECORD
    244	001064	103323 				BCC	20$
    245	001066	012701 			WERR:	MOV	(PC)+,R1	;FATAL OUTPUT ERROR
    246	001070	   000G	   000G			.BYTE	E$R02,S$V2
    247	001072	000450 				BR	ERRNM		;INDICATE FILE NAME
    248					;
    249					; COMPRESS EXIT
    250					;
    251	001074	016700 	000000G		DONE:	MOV	$LBRPT,R0
    252	001100	112760 	000001 	000000 		MOVB	#R.FIX,F.RTYP(R0)  ;REST OLD LIB TO FIXED LENGTH RECORD
    253	001106					CLOSE$	R0		;CLOSE OLD LIBRARY FILE
    254	001112	016767 	000000G	000000G		MOV	$CMPPT,$LBRPT	;SWITCH TO NEW LIBRARY FILE
    255	001120	005067 	000000G			CLR	$OPNFL		;INDICATE LIBRARY IS ONLY OPEN FILE
    256	001124	016767 	176654 	000000G		MOV	OPOINT,L$NX	;UPDATE NEXT MODULE INSERT ADDR (L$NX)
    257	001132	016767 	176650 	000002G		MOV	OPOINT+2,L$NX+2
    258	001140	005067 	000000G			CLR	L$LD		;CLEAR RECOVERABLE DELETED SPACE (L$LD)
    259	001144	005067 	000002G			CLR	L$LD+2
    260	001150					CALL	$FIXLA		;RECOMPUTE FILE SPACE AVAILABLE (L$LA)
    261	001154	052767 	000000C	000002G		BIS	#IN$COR!LB$DTY,$SWTCH+2 ;SET IN-CORE AND DIRTY FLAGS
    262	001162	000167 	000000G			JMP	$WTHD		;WRITE OUT HEADER, EPT, AND MNT
    263									;AND EXIT (THROUGH $WTHD)
    264
    265
    266					;
    267					; COMPRESS ERRORS
    268					;
    269	001166	012701 			PERR:	MOV	(PC)+,R1	;ERROR FROM .POINT
    270	001170	   000G	   000G			.BYTE	E$R14,S$V2
    271	001172	000410 				BR	ERRNM
    272
    273	001174	012701 			ZERR:	MOV	(PC)+,R1	;NOT ENOUGH EPT OR MNT SPACE
    274	001176	   000G	   000G			.BYTE	E$R28,S$V2
    275	001200	000407 				BR	ERR
    276
    277	001202	012701 			CERR:	MOV	(PC)+,R1	;FATAL COMPRESS ERROR
    278	001204	   000G	   000G			.BYTE	E$R27,S$V2
    279	001206	000404 				BR	ERR
    280
    281	001210	012701 			RERR:	MOV	(PC)+,R1	;READ ERROR
    282	001212	   000G	   000G			.BYTE	E$R01,S$V2
    283	001214	016002 	000000G		ERRNM:	MOV	R$NAME(R0),R2	;GET FILE NAME
    284	001220	000167 	000000G		ERR:	JMP	$ERMSG		;FATAL ERROR EXIT
    285
LBRCM	MACRO M1108  05-DEC-77 22:24  PAGE 2-5


    286
    287					;+
    288					;
    289					; THIS ROUTINE COMPUTES THE SIZE OF THE NEW EPT
    290					; OR MNT.
    291					;
    292					; INPUTS:
    293					;
    294					;	R0 = REQUESTED NEW SIZE (0 IF NO CHANGE)
    295					;	R2 = ADDRESS OF L$ES OR L$MS
    296					;
    297					; OUTPUTS:
    298					;
    299					;	R5 CONTAINS THE START VBN OF TABLE + LENGTH OF TABLE IN BLOCKS
    300					;
    301					;-
    302	001224	112203 			COMP:	MOVB	(R2)+,R3	;GET ENTRY SIZE IN R3  (L$?S)
    303	001226	005202 				INC	R2		;SKIP UNUSED BYTE
    304	001230	012246 				MOV	(R2)+,-(SP)	;SAVE START BLOCK  (L$?T)
    305	001232	005700 				TST	R0		;ANY CHANGE NEEDED
    306	001234	001001 				BNE	1$		;BRANCH IF CHANGING TABLE SIZE
    307	001236	011200 				MOV	(R2),R0		;NO CHANGE...USE CURRENT SIZE  (L$?I)
    308	001240	010004 			1$:	MOV	R0,R4		;COMPUTE ACTUAL # OF ENTRIES TO ALLOCATE
    309	001242	010300 				MOV	R3,R0		;COPY ENTRY SIZE INTO R0
    310	001244					MUL	R0,R4		;BY FILL OUT TO A FULL BLOCK
    311	001250	103751 				BCS	ZERR		;TABLE SIZE TOO LARGE ERROR
    312	001252	005305 				DEC	R5		;ROUND TO NEAREST 512 BYTES
    313	001254	052705 	000777 			BIS	#777,R5
    314	001260	005205 				INC	R5
    315	001262	010546 				MOV	R5,-(SP)	;SAVE NEW TABLE LENGTH IN BYTES
    316	001264	001411 				BEQ	5$		;BRANCH IF ZERO TABLE SIZE
    317	001266					DIV	R0,R4		;COMPUTE ACTUAL ENTRIES TO ALLOCATE
    318	001272	161204 				SUB	(R2),R4		;COMPUTE DIFFERENCE IN SIZES  (- L$?I)
    319	001274	103005 				BHIS	5$		;BRANCH IF NOT MAKING THE TABLE SMALLER
    320	001276	005404 				NEG	R4
    321	001300	020462 	000002 			CMP	R4,2(R2)	;CHECK FOR ROOM IN TABLE  (L$?A)
    322	001304	101333 				BHI	ZERR		;BRANCH IF NO ROOM
    323	001306	005404 				NEG	R4
    324	001310	060462 	000002 		5$:	ADD	R4,2(R2)	;UPDATE ENTRIES AVAILABLE  (L$?A)
    325	001314	060412 				ADD	R4,(R2)	;UPDATE ENTRIES ALLOCATED (L$?I)
    326	001316	012605 				MOV	(SP)+,R5	;PUT NEW TABLE LENGTH (BYTES) IN R5
    327
    328
    329						.IF DF	R$$EIS
    330
    331
    332						ASH	#-9.,R5		;COMPUTE NEW LENGTH IN BLOCKS
    333
    334						.IFF
    335
    336	001320	000305 				SWAB	R5		;SWAP BYTES OF R5
    337	001322	106205 				ASRB	R5		;SHIFT RIGHT ONE MORE BIT
    338	001324	110505 				MOVB	R5,R5		;PROPAGATE SIGN OF LOW BYTE
    339
    340
    341						.ENDC
    342
LBRCM	MACRO M1108  05-DEC-77 22:24  PAGE 2-6


    343
    344	001326	062605 				ADD	(SP)+,R5	;PLUS OLD START BLOCK
    345	001330					RETURN
    346
    347
    348					;+
    349					; SUBROUTINE TO FIX EPT & MNT TABLES.  ALL REFERENCES
    350					; TO A MODULE ARE LOCATED IN THE TABLE AND ARE
    351					; MODIFIED AS NEEDED.
    352					;
    353					; INPUTS:
    354					;
    355					;	R2 = TABLE DESCRIPTOR
    356					;
    357					; OUTPUTS:
    358					;
    359					;	R0,R1,R2  ARE LOST
    360					;-
    361	001332	016700 	176442 		FIXTAB:	MOV	IPOINT,R0	;PUT INPUT LIBRARY VBN IN R0
    362	001336	016701 	176440 			MOV	IPOINT+2,R1	;AND BYTE-IN-BLOCK OFFSET IN R1
    363	001342	020067 	176436 			CMP	R0,OPOINT	;IF THAT INFORMATION EXACTLY MATCHES ...
    364	001346	001003 				BNE	10$		;... THE OUTPUT LIBRARY FILE ...
    365	001350	020167 	176432 			CMP	R1,OPOINT+2	;... INFORMATION, THEN BYPASS ...
    366	001354	001420 				BEQ	25$		;... THE TABLE FIXUP
    367	001356				10$:	CALL	$FINDC		;ELSE, FIND A MATCHING ENTRY
    368	001362	103415 				BCS	25$		;EXIT IF NONE FOUND
    369	001364	016760 	176414 	000006 	20$:	MOV	OPOINT,6(R0)	;AND UPDATE IT
    370	001372	016760 	176410 	000010 		MOV	OPOINT+2,8.(R0)
    371	001400	005460 	000010 			NEG	8.(R0)		;NEGATE BYTE IN BLOCK POINTER TO MAKE UNIQUE
    372									;   FROM OLD POINTERS
    373	001404					CALL	$WRMPG		;MARK PAGE DIRTY
    374	001410					CALL	$FINDN		;FIND NEXT ONE
    375	001414	103363 				BCC	20$		;CONTINUE UNTIL DONE
    376	001416				25$:	RETURN 			;ALL DONE
    377
    378
    379					;
    380		000001 				.END
LBRCM	MACRO M1108  05-DEC-77 22:24  PAGE 2-7
SYMBOL TABLE

BUFIZ = 000200   	F.BKP1= 000051   	IE.CON= 177752   	IE.WLK= 177764   	S$V2  = ****** GX
CERR    001202R  	F.BKST= 000024   	IE.DAA= 177770   	IE.2DV= 177720   	S$$LIB= 000000
CMPNAM= ****** GX	F.BKVB= 000064   	IE.DAO= 177763   	IN$COR= ****** GX	S.FATT= 000016
CMPPT = ****** GX	F.CNTG= 000034   	IE.DFU= 177750   	IPOINT  000000R  	S.FDB = 000140
COMP    001224R  	F.DFNB= 000046   	IE.DNA= 177771   	IS.BV = 000005   	S.FNAM= 000006
CREATE  000336R  	F.DSPT= 000044   	IE.DNR= 177775   	IS.CR = 006401   	S.FNB = 000036
DONE    001074R  	F.DVNM= 000134   	IE.DUN= 177767   	IS.ESC= 015401   	S.FNBW= 000017
ERR     001220R  	F.EFBK= 000010   	IE.DUP= 177707   	IS.PND= 000000   	S.FNTY= 000004
ERRNM   001214R  	F.EFN = 000050   	IE.EBX= 177776   	IS.RDD= 000002   	S.FTYP= 000002
E$R01 = ****** GX	F.EOBB= 000032   	IE.EOF= 177766   	IS.SUC= 000001   	S.NFEN= 000020
E$R02 = ****** GX	F.ERR = 000052   	IE.EOT= 177702   	JMPERR  000362R  	WERR    001066R
E$R11 = ****** GX	F.FACC= 000043   	IE.EOV= 177765   	LBRNAM= ****** GX	ZERR    001174R
E$R14 = ****** GX	F.FFBY= 000014   	IE.EXP= 177676   	LBRTAB= ****** GX	$CMP    000210RG
E$R26 = ****** GX	F.FNAM= 000110   	IE.FEX= 177717   	LB$DTY= ****** GX	$CMPPT= ****** GX
E$R27 = ****** GX	F.FNB = 000102   	IE.FHE= 177705   	L$ES  = ****** GX	$CSIBK= ****** GX
E$R28 = ****** GX	F.FTYP= 000116   	IE.FOP= 177713   	L$LD  = ****** GX	$EPBLK= ****** GX
FA.APD= 000100   	F.FVER= 000120   	IE.HFU= 177744   	L$MS  = ****** GX	$EPT  = ****** GX
FA.CRE= 000010   	F.HIBK= 000004   	IE.IFC= 177776   	L$MT  = ****** GX	$ERMSG= ****** GX
FA.EXT= 000004   	F.LUN = 000042   	IE.IFU= 177747   	L$NX  = ****** GX	$FINDC= ****** GX
FA.NSP= 000100   	F.MBCT= 000054   	IE.ILL= 177726   	L$TYP = ****** GX	$FINDN= ****** GX
FA.RD = 000001   	F.MBC1= 000055   	IE.ISQ= 177703   	NB.DEV= 000200   	$FIXLA= ****** GX
FA.SHR= 000040   	F.MBFG= 000056   	IE.LCK= 177745   	NB.DIR= 000100   	$LBRPT= ****** GX
FA.TMP= 000020   	F.NRBD= 000024   	IE.MBK= 177721   	NB.NAM= 000004   	$LDIV = ****** GX
FA.WRT= 000002   	F.NREC= 000030   	IE.MOD= 177753   	NB.SD1= 000400   	$LMUL1= ****** GX
FD.BLK= 000010   	F.OVBS= 000030   	IE.NBF= 177731   	NB.SD2= 001000   	$LMUL2= ****** GX
FD.CCL= 000002   	F.RACC= 000016   	IE.NBK= 177727   	NB.SNM= 000040   	$MHBUF= ****** GX
FD.CR = 000002   	F.RATT= 000001   	IE.NFI= 177704   	NB.STP= 000020   	$MHST = ****** GX
FD.DIR= 000010   	F.RCNM= 000034   	IE.NLN= 177733   	NB.SVR= 000010   	$MNBLK= ****** GX
FD.FTN= 000001   	F.RCTL= 000017   	IE.NNC= 177674   	NB.TYP= 000002   	$MNT  = ****** GX
FD.INS= 000010   	F.RSIZ= 000002   	IE.NOD= 177751   	NB.VER= 000001   	$NEXT = ****** GX
FD.PLC= 000004   	F.RTYP= 000000   	IE.NSF= 177746   	N.DID = 000024   	$OPEN = ****** GX
FD.RAH= 000001   	F.STBK= 000036   	IE.OFL= 177677   	N.DVNM= 000032   	$OPNFL= ****** GX
FD.RAN= 000002   	F.UNIT= 000136   	IE.ONP= 177773   	N.FID = 000000   	$RDEP = ****** GX
FD.REC= 000001   	F.URBD= 000020   	IE.OVR= 177756   	N.FNAM= 000006   	$RDLHD= ****** GX
FD.RWM= 000001   	F.VBN = 000064   	IE.PRI= 177760   	N.FTYP= 000014   	$RDMH = ****** GX
FD.SDI= 000020   	F.VBSZ= 000060   	IE.RAC= 177724   	N.FVER= 000016   	$RDMN = ****** GX
FD.SQD= 000040   	IE.ABO= 177761   	IE.RAT= 177723   	N.NEXT= 000022   	$SAVRG= ****** GX
FD.TTY= 000004   	IE.ALN= 177736   	IE.RBG= 177730   	N.STAT= 000020   	$SCANI= ****** GX
FD.WBH= 000002   	IE.BAD= 177777   	IE.RCN= 177722   	N.UNIT= 000034   	$SIZ  = ****** GX
FIXTAB  001332R  	IE.BBE= 177710   	IE.RER= 177740   	OERR    000356R  	$SWTCH= ****** GX
FO.APD= 000106   	IE.BDI= 177714   	IE.RNM= 177715   	OPOINT  000004R  	$WRMPG= ****** GX
FO.MFY= 000002   	IE.BDR= 177716   	IE.RSU= 177757   	PAR$$$= 000000   	$WTHD = ****** GX
FO.RD = 000001   	IE.BDV= 177711   	IE.SNC= 177735   	PERR    001166R  	$$    = 000067
FO.UPD= 000006   	IE.BHD= 177700   	IE.SPC= 177772   	Q$$CMO= 000000   	$$MSG = 000000
FO.WRT= 000016   	IE.BLK= 177754   	IE.SQC= 177734   	READLH  000366R  	.CLOSE= ****** G
F.ALOC= 000040   	IE.BNM= 177712   	IE.SRE= 177762   	RECBUF  000010R  	.GETSQ= ****** G
F.BBFS= 000062   	IE.BTF= 177675   	IE.STK= 177706   	RERR    001210R  	.MARK = ****** GX
F.BDB = 000070   	IE.BTP= 177725   	IE.VER= 177774   	R$NAME= ****** GX	.POINT= ****** GX
F.BGBC= 000057   	IE.BVR= 177701   	IE.WAC= 177743   	R$$11M= 000000   	.PUT  = ****** G
F.BKDN= 000026   	IE.BYT= 177755   	IE.WAT= 177741   	R.FIX = 000001   	...GBL= 000000
F.BKDS= 000020   	IE.CKS= 177742   	IE.WER= 177737   	R.VAR = 000002   	...TPC= 000140
F.BKEF= 000050   	IE.CLO= 177732

. ABS.	000000	   000
      	001420	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  4146 WORDS  ( 17 PAGES)
LBRCM	MACRO M1108  05-DEC-77 22:24  PAGE 2-8
SYMBOL TABLE

DYNAMIC MEMORY:  5216 WORDS  ( 20 PAGES)
ELAPSED TIME:  00:00:38
[42,10]LBRCM,[42,20]LBRCM/-SP=[42,30]LBRPRF,LBRCM
LBRCR	MACRO M1108  05-DEC-77 22:24  PAGE 2


      1						.TITLE	LBRCR
      2						.IDENT	/XO3.2/
      3
      4					;
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      6					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      7					;
      8					;	DEC ASSUMES NO RESPONSIBLIITY FOR THE USE
      9					;	OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT
     10					;	WHICH IS NOT SUPPLIED BY DEC.
     11					;
     12					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     13					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     14					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     15					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     16					;
     17					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     18					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     19					; EQUIPMENT CORPORATION.
     20					;
     21					; VERSION X03.2
     22					;
     23					; WRITTEN BY:
     24					;	GEORGE W. BERRY
     25					;
     26					; MODIFIED BY:
     27					;	C.A. D'ELIA	10-JUN-74
     28					;	C.A. D'ELIA	02-JUL-74  (VIRTUAL TABLES)
     29					;	THOMAS J. MILLER 01-NOV-74
     30					;
     31
     32					;
     33					; MACRO LIBRARY CALLS
     34					;
     35
     36						.MCALL	GTIM$S
     37
     38					;
     39					; LOCAL DATA
     40					;
     41
     42	000000				TIME:	.BLKW	8.		;DATE AND TIME VALUES
     43
     44
     45					;+
     46					; **-$CRE-CREATE LIBRARY OUTPUT FILE
     47					;
     48					; THIS ROUTINE ALLOCATES THE INITIAL BLANK EPT, MNT AND
     49					; LIBRARY HEADER RECORDS.
     50					;
     51					;
     52					; INPUT:
     53					;
     54					;	$SIZ=SIZE OF .LBR FILE IN BLOCKS (HIGHEST RELATIVE BLOCK+1)
     55					;	$EPT=EPT ENTRIES ALLOCATED
     56					;	$MNT=MNT ENTRIES ALLOCATED
     57					;	$TYP=TYPE OF LIBRARY
LBRCR	MACRO M1108  05-DEC-77 22:24  PAGE 2-1


     58					;	$VRSN=VERSION IDENTIFIER OF LIBRARIAN (2 WORDS)
     59					;
     60					; OUTPUTS:
     61					;
     62					;	NONE
     63					;
     64					;
     65					;-
     66	000020				$CRE::	SAVRG			;SAVE R3-R5
     67	000024	004567 	000000G			JSR	R5,$CLEAR	;CLEAR FIRST 256 WORDS OF L$BUF
     68	000030	000000G				.WORD	L$BUF
     69	000032	000400 				.WORD	256.
     70	000034	016705 	000000G			MOV	$TYP,R5		;GET FILE TYPE
     71					; LOAD TYPE DEPENDENT INFORMATION
     72	000040	110567 	000000G			MOVB	R5,L$TYP	;LOAD TYPE
     73	000044	116567 	000000G	000000G		MOVB	TY$ES(R5),L$ES	;LOAD EPT ENTRY SIZE
     74	000052	116567 	000000G	000000G		MOVB	TY$MS(R5),L$MS	;LOAD MNT ENTRY SIZE
     75	000060	012767 	000000G	000000G		MOV	#EPTBLK,L$ET	;LOAD EPT STARTING BLOCK
     76
     77	000066	112767 	000000G	000000G		MOVB	#ID$,L$ID	;LOAD ID BYTE
     78	000074	016767 	000000G	000000G		MOV	$VRSN,L$VER	;LOAD VERSION IDENTIFICATION
     79	000102	016767 	000002G	000002G		MOV	$VRSN+2,L$VER+2
     80	000110	012704 	000000'			MOV	#TIME,R4
     81	000114					GTIM$S	R4		;GENERATE TIME
     82	000124	103446 				BCS	60$		;OUTPUT TIME ERROR
     83
     84	000126	012705 	000000G		75$:	MOV	#L$DAT,R5	;STORE AT L$DAT
     85	000132	012703 	000006 			MOV	#6,R3		;6 WORDS
     86
     87	000136	012425 			55$:	MOV	(R4)+,(R5)+
     88	000140					SOB	R3,55$
     89	000144	012701 	000000G			MOV	#$EPBLK,R1	;POINT TO $EPBLK TO SET IT UP
     90	000150	016703 	000000G			MOV	$EPT,R3		;GET NUMBER OF ENTRIES REQUESTED
     91	000154					CALL	COMP		;COMPUTE NUMBER TO ACTUALLY ALLOCATE
     92	000160	012767 	000000G	000000G		MOV	#$EPTHL,$EPADR	;SET ADDR OF EPT PARTITION LIST HEADS
     93	000166	066703 	000000G			ADD	L$ET,R3		;COMPUTE MNT START BLOCK
     94	000172	010367 	000000G			MOV	R3,L$MT		;AND STORE IN LIBRARY HEADER
     95	000176	012701 	000000G			MOV	#$MNBLK,R1	;POINT TO $MNBLK TO SET IT UP
     96	000202	016703 	000000G			MOV	$MNT,R3		;GET NUMBER OF ENTRIES REQUESTED
     97	000206					CALL	COMP		;COMPUTE NUMBER TO ACTUALLY ALLOCATE
     98	000212	012767 	000000G	000000G		MOV	#$MNTHL,$MNADR	;SET ADDR OF MNT PARTITION LIST HEADS
     99	000220	066703 	000000G			ADD	L$MT,R3		;COMPUTE FIRST ACTUAL BLOCK OF FILE
    100
    101	000224	010367 	000000G			MOV	R3,L$NX		;SET BLOCK FOR FIRST MODULE INSERT
    102
    103	000230	052767 	000000C	000002G		BIS	#IN$COR!LB$DTY,$SWTCH+2 ;INDICATE THAT THE HEADER, MNT AND EPT
    104									;ARE SET UP.  WE WILL LET $INS WRITE THEM OUT
    105									;NOTE-$WTHD ALSO COMPUTES L$LA!
    106	000236					CALLR	$WTHD		;WRITE HEADER EPT AND MNT AND EXIT
    107
    108	000242	012701 			60$:	MOV	(PC)+,R1	;GTIM$S FAILED
    109	000244	   000G	   000G			.BYTE	E$R17,S$V2
    110	000246	000167 	000000G		ERROR:	JMP	$ERMSG		;FATAL ERROR EXIT
    111
    112	000252	012701 			ZERR:	MOV	(PC)+,R1	;SIZE ERROR
    113	000254	   000G	   000G			.BYTE	E$R13,S$V2
    114	000256	000773 				BR	ERROR		;FATAL ERROR EXIT
LBRCR	MACRO M1108  05-DEC-77 22:24  PAGE 2-2


    115
    116
    117
    118
    119
    120					;+
    121					; THIS ROUTINE COMPUTES THE NUMBER OF EPT OR MNT ENTRIES
    122					; TO ACTUALLY ALLOCATE (IT FILLS OUT THE TABLE TO THE NEXT
    123					; HIGHEST EVEN BLOCK BOUNDARY).
    124					;
    125					; INPUTS:
    126					;
    127					;	R1 = ADDRESS OF $EPBLK OR $MNBLK
    128					;	R3 = # OF ENTRIES REQUESTED
    129					;	R5 = ADDRESS OF ENTRY SIZE IN L$BUF
    130					;
    131					; OUTPUTS:
    132					;
    133					;	R5 = R5+8.
    134					;	R3 = # OF 256. WORD BLOCKS USED
    135					;	$EPBLK OR $MNBLK IS SET UP PROPERLY
    136					;
    137					;-
    138
    139	000260	005004 			COMP:	CLR	R4		;INITIALIZE R4
    140	000262	111500 				MOVB	(R5),R0		;GET ENTRY SIZE (L$?S)
    141	000264	010021 				MOV	R0,(R1)+	;SAVE ENTRY SIZE IN DESCRIPTOR BLOCK
    142	000266	005721 				TST	(R1)+		;SKIP ADDR OF PARTITION LIST HEADS
    143	000270					MUL	R0,R3		;CALC # OF WORDS REQUIRED
    144	000274	103766 				BCS	ZERR		;ERROR IF OUT OF RANGE (>= 32768.)
    145	000276	005703 				TST	R3		;NO DESCRIPTOR BLOCKS TO BE ALLOCATED?
    146	000300	001411 				BEQ	10$		;SKIP TO FILL IN ENTRIES IF SO
    147	000302	005303 				DEC	R3		;ROUND UP TO NEAREST 256 WORD BLOCK
    148	000304	052703 	000777 			BIS	#777,R3		;ROUND TO NEXT HIGHER BLOCK
    149	000310	005203 				INC	R3
    150
    151	000312	010546 				MOV	R5,-(SP)	;SAVE R5
    152	000314	010305 				MOV	R3,R5		;PUT LOW ORDER DIVIDEND IN R5
    153	000316					DIV	R0,R4		;COMPUTE # OF ENTRIES
    154	000322	012605 				MOV	(SP)+,R5	;RESTORE R5
    155	000324	062705 	000004 		10$:	ADD	#4,R5
    156	000330	010425 				MOV	R4,(R5)+	;STORE ENTRIES ALLOCATED (L$?I)
    157	000332	010425 				MOV	R4,(R5)+	;STORE ENTRIES AVAILABLE (L$?A)
    158	000334	010411 				MOV	R4,(R1)		;SAVE TABLE ALLOCN IN DESCRIPTOR BLOCK
    159	000336	000303 				SWAB	R3
    160	000340	006203 				ASR	R3		;R3/512. = # OF DISK BLOCKS NEEDED
    161	000342					RETURN
    162
    163
    164					;
    165		000001 				.END
LBRCR	MACRO M1108  05-DEC-77 22:24  PAGE 2-3
SYMBOL TABLE

COMP    000260R  	G.TISC= 000012   	L$MT  = ****** GX	ZERR    000252R  	$MNBLK= ****** GX
EPTBLK= ****** GX	G.TIYR= 000000   	L$NX  = ****** GX	$CLEAR= ****** GX	$MNT  = ****** GX
ERROR   000246R  	ID$   = ****** GX	L$TYP = ****** GX	$CRE    000020RG 	$MNTHL= ****** GX
E$R13 = ****** GX	IN$COR= ****** GX	L$VER = ****** GX	$EPADR= ****** GX	$SAVRG= ****** GX
E$R17 = ****** GX	LB$DTY= ****** GX	Q$$CMO= 000000   	$EPBLK= ****** GX	$SWTCH= ****** GX
G.TICP= 000016   	L$BUF = ****** GX	R$$11M= 000000   	$EPT  = ****** GX	$TYP  = ****** GX
G.TICT= 000014   	L$DAT = ****** GX	S$V2  = ****** GX	$EPTHL= ****** GX	$VRSN = ****** GX
G.TIDA= 000004   	L$ES  = ****** GX	S$$LIB= 000000   	$ERMSG= ****** GX	$WTHD = ****** GX
G.TIHR= 000006   	L$ET  = ****** GX	TIME    000000R  	$LDIV = ****** GX	$$    = 000067
G.TIMI= 000010   	L$ID  = ****** GX	TY$ES = ****** GX	$LMUL1= ****** GX	$$$OST= 000020
G.TIMO= 000002   	L$MS  = ****** GX	TY$MS = ****** GX	$MNADR= ****** GX

. ABS.	000000	   000
      	000344	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  1295 WORDS  ( 6 PAGES)
DYNAMIC MEMORY:  3104 WORDS  ( 11 PAGES)
ELAPSED TIME:  00:00:11
[42,10]LBRCR,[42,20]LBRCR/-SP=[42,30]LBRPRF,LBRCR
LBRDF	MACRO M1108  05-DEC-77 22:25  PAGE 2


      1						.TITLE	LBRDF
      2						.IDENT	/X03.3/
      3
      4					;
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      6					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      7					;
      8					;	DEC ASSUMES NO RESPONSIBLIITY FOR THE USE
      9					;	OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT
     10					;	WHICH IS NOT SUPPLIED BY DEC.
     11					;
     12					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     13					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     14					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     15					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     16					;
     17					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     18					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     19					; EQUIPMENT CORPORATION.
     20					;
     21					; VERSION X03.3
     22					;
     23					; WRITTEN BY:
     24					;	GEORGE W. BERRY
     25					;
     26					; MODIFIED BY:
     27					;	C.A. D'ELIA	22-MAY-74
     28					;	C.A. D'ELIA	02-JUL-74  (VIRTUAL TABLES)
     29					;	C.A. D'ELIA	05-SEP-74
     30					;	THOMAS J. MILLER 01-NOV-74
     31					;
     32					;
     33
     34					;
     35					; MONITOR DEPENDENT I/O DATA BASE
     36					;
     37					; EQUATED SYMBOLS
     38					;
     39		000006 			F$DEVL==6.			;MAX LENGTH OF DEVICE NAME
     40		000015 			F$DIRL==13.			;MAX LENGTH OF DIRECTORY NAME
     41		000021 			F$FILL==17.			;MAX LENGTH OF FILENAME
     42
     43
     44					;
     45					; MACRO LIBRARY CALLS
     46					;
     47
     48						.MCALL	CSI$
     49	000000					CSI$
     50						.MCALL	FDOFF$
     51	000000					FDOFF$	DEF$L
     52						.MCALL	GCMLD$
     53	000000					GCMLD$
     54						.MCALL	FCSBT$
     55	000000					FCSBT$
     56
     57						.MCALL	CSI$ND,CSI$SV,CSI$SW,FDAT$A,FDBDF$,FDOP$A
LBRDF	MACRO M1108  05-DEC-77 22:25  PAGE 2-1


     58						.MCALL	FDRC$A,FSRSZ$,GCMLB$,NMBLK$
     59
     60
     61
     62					;
     63					; LOCAL MACROS
     64					;
     65					; CLOSE SWITCH P-SECTION
     66					;
     67					; CLOSCT A
     68					;
     69					;	A=FIRST THREE CHARACTERS OF BLOCK NAME.
     70					;
     71
     72						.MACRO	CLOSCT A
     73						.PSECT	A'SWT,D,GBL
     74						.WORD	0
     75						.PSECT
     76						.ENDM
     77
     78					;
     79					; GENERATE CONTROL BLOCK
     80					;
     81					; GENBLK A,B,C,DD,E,F,G,H,I,J,K
     82					;
     83					; WHERE:
     84					;
     85					;	A=FIRST THREE CHARACTERS OF BLOCK NAME.
     86					;	B=RECORD TYPE.
     87					;	C=RECORD ATTRIBUTES.
     88					;	DD=RECORD SIZE.
     89					;	E=RECORD ACCESS.
     90					;	F=RECORD BUFFER SIZE.
     91					;	G=LOGICAL UNIT.
     92					;	H=FILE POINTER SWITCH.
     93					;	I=DEFAULT FILE TYPE.
     94					;	J=DEFAULT DEVICE NAME.
     95					;	K=DEFAULT DEVICE UNIT.
     96					;
     97
     98						.MACRO	GENBLK A,B,C,DD,E,F,G,H,I,J,K
     99						.PSECT	A'PT,D,GBL
    100					$'A'PT::.WORD	A'PT
    101					A'PT::	FDBDF$
    102						FDAT$A	B,C,DD
    103					$$=0
    104						.IF NB	F
    105						.PSECT	A'BUF,D,GBL
    106					$$=.
    107						.BLKB	F
    108						.PSECT	A'PT,D,GBL
    109						.ENDC
    110						FDRC$A	E,$$,F
    111						.PSECT	A'NAM,D,GBL
    112					$$=.
    113					A'NAM::
    114						NMBLK$	,I,,J,K
LBRDF	MACRO M1108  05-DEC-77 22:25  PAGE 2-2


    115					$$0=0
    116						.IF NB	H
    117						.PSECT	A'DV,D,GBL
    118					$$1=.
    119						.BLKB	F$DEVL
    120						.PSECT	A'DR,D,GBL
    121					$$2=.
    122						.BLKB	F$DIRL
    123						.PSECT	A'FL,D,GBL
    124					$$3=.
    125						.BLKB	F$FILL
    126						.PSECT	A'FP,D,GBL
    127					$$0=.
    128						.BLKW	1
    129						.WORD	$$1
    130						.BLKW	1
    131						.WORD	$$2
    132						.BLKW	1
    133						.WORD	$$3
    134						.ENDC
    135						.PSECT	A'PT,D,GBL
    136						FDOP$A	G,$$0,$$
    137					R$NAME==.-A'PT
    138						.WORD	A'PT+F.FNB+N.FNAM
    139					R$SWTH==.-A'PT
    140						.BLKW	1
    141					R$SWBK==.-A'PT
    142						.WORD	A'SW
    143						.PSECT	A'SWT,D,GBL
    144					A'SW:
    145						.PSECT
    146						.ENDM
    147
    148
    149					;
    150					; GENERATE SWITCH CONTROL BLOCK
    151					;
    152					; GENSWT A,B,C,D,E,F,G
    153					;
    154					;	A=FIRST THREE CHARACTERS OF RECORD BLOCK NAME.
    155					;	B=A 2 CHARACTER SWITCH NAME.
    156					;	C=SWITCH MASK.
    157					;	DD=ADDRESS OF SWITCH WORD.
    158					;	E=SWITCH MASK DISPOSITION.
    159					;	F=NEGATE ENABLE.
    160					;	G=ADDRESS OF SWITCH VALUE TABLE.
    161					;
    162
    163						.MACRO	GENSWT	A,B,C,DD,E,F,G
    164						.PSECT	A'SWT,D,GBL
    165						CSI$SW	B,C,DD,E,F,G
    166						.PSECT
    167						.ENDM
    168
    169
    170					;
    171					; GET COMMAND INPUT CONTROL BLOCK
LBRDF	MACRO M1108  05-DEC-77 22:25  PAGE 2-3


    172					;
    173
    174	000000					.PSECT	CMIPT,D,GBL
    175	000000	000002'			$CMIPT::.WORD	CMIPT		;POINTER TO CONTROL BLOCK
    176
    177		000003 			ILVL=3				;MAX LEVEL OF 3 INDIRECT FILES
    178
    179	000002				CMIPT:	GCMLB$	ILVL,LBR,$LNBUF
    180
    181
    182					;
    183					; FILE CONTROL BLOCKS
    184					;
    185
    186		000002 			$CMOLN==2			;LUN USED FOR COMMAND OUTPUT
    187
    188						.IF NDF	Q$$CMO
    189						GENBLK	CMO,R.VAR,,80.,,,$CMOLN  ;COMMAND OUTPUT ($CMOPT)
    190						.ENDC
    191
    192
    193	000326					GENBLK	INP,,,,4,132.,3,1,,SY  ;INPUT ($INPPT)
    194	000000					GENBLK	LIS,R.VAR,,74.,,,4,1,LST,SY  ;LISTING ($LISPT)
    195	000000					GENBLK	LBR,R.FIX,,512.,10,,5,1,,SY  ;LIBRARY ($LBRPT)
    196	000000					GENBLK	CMP,R.FIX,,512.,10,,6,1,,SY  ;COMPRESS ($CMPPT)
    197
    198
    199
    200					;
    201					; OTHER WORK FILE RELATED DATA
    202					;
    203
    204	000000				$FRHD::	.BLKW	2		;FREE MEMORY LIST HEAD
    205
    206
    207
    208					;
    209					; SPECIFY ACTIVE FILE REQUIREMENTS
    210					;
    211
    212		000003 			AFILES=3			;3 ACTIVE FILES ARE REQUIRED
    213
    214		000002 				.IIF DF	Q$$CMO,AFILES=AFILES-1  ;ONE LESS IF Q I/O TO CMD OUTPUT
    215
    216	000004					FSRSZ$	AFILES
LBRDF	MACRO M1108  05-DEC-77 22:25  PAGE 3


    218					;+
    219					;
    220					; LIBRARIAN DATA BASE:
    221					;	LIBRARY HEADER BLOCK
    222					;	ENTRY POINT TABLE
    223					;	MODULE NAME TABLE
    224					;
    225					;-
    226
    227	000000					.PSECT	BUFFER
    228
    229					;
    230					; DEFINE THE LIBRARY HEADER
    231
    232					;	(ORDERED DATA)
    233					;
    234	000000				L$BUF::
    235
    236	000000				L$TYP::	.BLKB	1		;LIBRARY TYPE (OBJ, ETC)
    237	000001				L$ID::	.BLKB	1		;LIBRARY FILE ID
    238	000002				L$VER::	.BLKW	2		;CREATED BY LBR VERSION V-RRRRRR
    239	000006				L$DAT::	.BLKW	6		;DATE OF LAST MODULE INSERTION
    240	000022				L$ES::	.BLKB	1		;SIZE OF LIBRARY EPT ENTRIES
    241						.BLKB	1		;UNUSED BYTE
    242	000024				L$ET::	.BLKW	1		;LOW-ORDER VBN OF START OF EPT IN FILE
    243	000026				L$EI::	.BLKW	1		;NUMBER OF EPT ENTRIES ALLOCATED
    244	000030				L$EA::	.BLKW	1		;NUMBER OF EPT ENTRIES AVAILABLE
    245	000032				L$MS::	.BLKB	1		;SIZE OF LIBRARY MNT ENTRIES
    246						.BLKB	1		;UNUSED BYTE
    247	000034				L$MT::	.BLKW	1		;LOW-ORDER VBN OF START OF MNT IN FILE
    248	000036				L$MI::	.BLKW	1		;NUMBER OF MNT ENTRIES ALLOCATED
    249	000040				L$MA::	.BLKW	1		;NUMBER OF MNT ENTIRES AVAILABLE
    250	000042				L$LD::	.BLKW	2		;LOGICALLY DELETED MODULE SPACE (BYTES)
    251	000046				L$LA::	.BLKW	2		;BYTES AVAILABLE FOR MODULE INSERTS
    252	000052				L$NX::	.BLKW	2		;ADDR (VBN+OFFSET) OF NEXT MODULE INSERT
    253
    254
    255		001000'			.=L$BUF+512.			;MUST USE 256. WORD BLK FOR LIBRARY HDR
    256
    257
    258					;
    259					; THIS BUFFER IS EXPANDED AS NEEDED AT LINK TIME.  THE FOLLOWING
    260					; .PSECT ENABLES THE RUNNING LIBRARIAN TO DETERMINE THE SIZE OF THIS
    261					; BUFFER.
    262					;
    263					; NOTE: WHEN RUNNING ON RSX-11M SYSTEM, THE AMOUNT OF DYNAMIC BUFFER
    264					; MEMORY IS DETERMINED AT RUN TIME BY OBTAINING INFORMATION ABOUT
    265					; ITS PARTITION'S AND ITS OWN ADDRESS LIMITS.
    266					;
    267
    268	000000					.PSECT	BUFFES
    269
    270	000000				$LBEND::			;REF LABEL TO END OF BUFFER
    271
    272	000004					.PSECT
LBRDF	MACRO M1108  05-DEC-77 22:25  PAGE 4


    274					;
    275					; LBR FILE ID (INSURES ITS A LIBRARY FILE)
    276					;
    277
    278		000002 			ID$==2
    279
    280
    281					;
    282					; ENTRY POINT TABLE (EPT)
    283					;
    284
    285		000002 			EPTBLK	==2			;STARTING DISK BLOCK OF EPT
    286
    287
    288					;
    289					; MODULE HEADER RECORD
    290					;
    291
    292		000020 			MHSIZE==20			;MAXIMUM SIZE OF THE MODULE HEADER
    293
    294
    295					;
    296					; MODULE HEADER READ/WRITE BUFFER
    297					;
    298
    299	000004				$MHBUF::.BLKB	MHSIZE		;MODULE HEADER BUFFER
    300
    301		000004'			$MHST	==$MHBUF		;HEADER STATUS
    302		000005'			$MHAT	==$MHBUF+1		;MODULE ATTRIBUTES (SEL-SRCH, ETC)
    303		000006'			$MOSZ	==$MHBUF+2		;SIZE OF MODULE IN BYTES
    304		000012'			$MHDA	==$MHBUF+6		;DATE MODULE INSERTED
    305		000020'			$MHID	==$MHBUF+14		;ADDITIONAL TYPE DEPENDENT ENTRIES
    306
    307
    308					;
    309					; TYPE DEPENDENT INFORMATION
    310					;
    311
    312		000001 			TY$	==1			;HIGHEST LEGAL MODULE TYPE CODE
    313
    314					; OBJECT MODULE TYPE
    315
    316		000000 			TY$OBJ	==0			;DEFINES OBJ MODULE TYPE
    317		000010 			E$OBJ	==10			;EPT ENTRY SIZE
    318		000010 			M$OBJ	==10			;MNT ENTRY SIZE
    319		000020 			HS$OBJ	==20			;MODULE HEADER SIZE
    320
    321					; MACRO DEFINITION MODULE TYPE
    322		000001 			TY$MAC	==1			;DEFINES MACRO DEF MODULE TYPE
    323		000000 			E$MAC	==0			;NO EPT IN MACRO DEF TYPE
    324		000010 			M$MAC	==10			;MNT ENTRY SIZE
    325		000020 			HS$MAC	==20			;MODULE HEADER SIZE
    326
    327
    328					;
    329					; EPT/MNT PARTITION DESCRIPTOR LIST
    330					;
LBRDF	MACRO M1108  05-DEC-77 22:25  PAGE 4-1


    331
    332	000024				$PARTD::
    333	000024	022577 				.RAD50	/E99/		;A  -  E
    334	000026	045377 				.RAD50	/K99/		;F  -  K
    335	000030	076377 				.RAD50	/S99/		;L  -  S
    336	000032	124277 				.RAD50	/Z99/		;T  -  Z
    337	000034	125307 				.RAD50	/$L9/		;$  -  $L
    338	000036	127377 				.RAD50	/$99/		;$M -  $9
    339	000040	130407 				.RAD50	/.L9/		;.  -  .L
    340	000042	174777 				.RAD50	/999/		;.M -  999
    341
    342		000010 			NU$PAR == <.-$PARTD>/2		;NUMBER OF TABLE PARTITIONS
LBRDF	MACRO M1108  05-DEC-77 22:25  PAGE 5


    344					;+
    345					;
    346					; IMPURE DATA BASE AREA
    347					;
    348					; THE AREA BETWEEN 'DBASE' AND 'DBEND' IS ZEROED INITIALLY.
    349					;
    350					;-
    351		000044'			DBASE	==.
    352
    353					;
    354					; PARTITION LIST HEADS FOR THE EPT AND MNT
    355					;
    356
    357	000044				$EPTHL::.BLKW	NU$PAR		;EPT LIST HEADS
    358	000064				$MNTHL::.BLKW	NU$PAR		;MNT LIST HEADS
    359
    360	000104				$HDLST::.BLKW	1		;POINTER TO LIST HEADS IN USE
    361
    362
    363					;
    364					; POINTER TO FDB OF FILE CURRENTLY OPEN (OTHER THAN LIBRARY FILE)
    365					;
    366
    367	000106				$OPNFL::.BLKW	1
    368
    369
    370					;
    371					; TELETYPE ATTACHED INFORMATION (FOR LIBRARY LISTING)
    372					;
    373
    374	000110				$ATTFG::.BLKB	1		;TELETYPE ATTACHED FLAG
    375						.BLKB	1		;TELETYPE LUN
    376
    377
    378					;
    379					; SWITCH OPTION WORD AND LIBRARIAN STATUS WORD
    380					;
    381
    382	000112				$SWTCH::.BLKW	2
    383
    384
    385					;
    386					; MNT DESCRIPTOR BLOCK
    387					;
    388
    389	000116				$MNBLK::.BLKW	3
    390		000116'			$MNES	==$MNBLK		;MNT ENTRY SIZE
    391		000120'			$MNADR	==$MNBLK+2		;ADDRESS OF MNT LIST HEADS
    392		000122'			$MNSIZ	==$MNBLK+4		;NUMBER OF ENTRIES IN MNT
    393
    394
    395					;
    396					; EPT DESCRIPTOR BLOCK
    397					;
    398
    399	000124				$EPBLK::.BLKW	3
    400		000124'			$EPES	==$EPBLK		;EPT ENTRY SIZE
LBRDF	MACRO M1108  05-DEC-77 22:25  PAGE 5-1


    401		000126'			$EPADR	==$EPBLK+2		;ADDRESS OF EPT LIST HEADS
    402		000130'			$EPSIZ	==$EPBLK+4		;NUMBER OF ENTRIES IN EPT
    403
    404
    405					;
    406					; -- $DMN -- MODULE DELETION LIST (USED BY /DE AND /DG)
    407					;
    408					; THIS LIST CONTAINS THE NAMES (IN RADIX 50) OF THE
    409					; MODULES TO BE DELETED WITH /DE.
    410					;
    411		000036 			$DMSIZ	==30.			;NUMBER OF NAMES PERMITTED
    412
    413	000132				$DMN::	.BLKW	2*$DMSIZ+1
    414		000312'			$DEND	==.-12
    415		000322'			$DGEND	==.-2
    416
    417
    418					;
    419					; /CR PARAMETERS
    420					;
    421
    422	000324				PBLK:	.BLKW	4
    423		000324'			$SIZ	==PBLK			;SIZE OF NEW FILE IN BLOCKS
    424		000326'			$EPT	==PBLK+2		;EPT ENTRIES TO ALLOCATE
    425		000330'			$MNT	==PBLK+4		;MNT ENTRIES TO ALLOCATE
    426		000332'			$TYP	==PBLK+6		;TYPE OF LIBRARY FILE
    427
    428
    429					;
    430					; END OF IMPURE DATA BASE AREA
    431					;
    432
    433		000334'			DBEND=.
    434		000134 			DSIZE	==<DBEND-DBASE>/2
LBRDF	MACRO M1108  05-DEC-77 22:25  PAGE 6


    436					;
    437					; STORAGE REQURIED FOR 'GTCML' INTERFACE ROUTINE
    438					;
    439
    440	000334				$LNDES::.BLKW	2		;COMMAND LINE DESCRIPTOR
    441	000340				$LNBUF::.BLKW	42.		;COMMAND LINE BUFFER
    442
    443	000464	000000 			$CMFLG::.WORD	0		;NO SPECIAL PROMPT FROM $GTCML
    444
    445
    446					;
    447					; EPT ENTRY SIZE TABLE (INDEXED BY TYPE)
    448					;
    449
    450	000466				TY$ES::
    451	000466	   010 				.BYTE	E$OBJ		;SIZE OF OBJECT MODULE EPT ENTRIES
    452	000467	   000 				.BYTE	E$MAC		;SIZE OF MACRO DEF MODULE EPT ENTRIES
    453
    454
    455					;
    456					; MNT ENTRY SIZE TABLE (INDEXED BY TYPE)
    457					;
    458
    459	000470				TY$MS::
    460	000470	   010 				.BYTE	M$OBJ		;SIZE OF OBJECT MODULE MNT ENTRIES
    461	000471	   010 				.BYTE	M$MAC		;SIZE OF MACRO DEF MODULE MNT ENTRIES
    462
    463
    464						.EVEN
    465					;
    466					; CURRENT DEFAULT LIBRARY TYPE (INITIALLY OBJ)
    467					;
    468	000472	000000 			DF$TYP::.WORD	0
    469
    470
    471					;
    472					; REGISTER SAVE AREA FOR CONTINUOUS ASSOCIATIVE SEARCH
    473					;
    474
    475	000474				SR0::	.BLKW	5
    476
    477					;
    478					; THIS PSECT CONTAINS A ONE WORD ENTRY FOR EACH LIBRARY TYPE CONTAINING
    479					; THE DEFAULT LIBRARY EXTENSION FOR LIBRARY FILES OF THE TYPE.  THE
    480					; THE ENTRIES ARE IN THE MODULE LBRCD, BUT THEY ARE REFERENCED THROUGH
    481					; THE GLOBAL SYMBOL DEFINED HERE.  ALLOCATION FOR THE ENTRIES IS IN THE ROOT.
    482					;
    483
    484	000000					.PSECT	DFTYP,D,GBL,OVR
    485	000000				LBRTAB::
    486	000506					.PSECT
    487
    488
    489					;
    490					; MESSAGE OUTPUT BUFFER -- NOTE THE 'OVR' .PSECT ATTRIBUTE USED TO
    491					; SHARE THE ALLOCATED SPACE BETWEEN FOLLOWING MODULES:
    492					;	NORMAL MESSAGE OUTPUT ROUTINE ($OUT)
LBRDF	MACRO M1108  05-DEC-77 22:25  PAGE 6-1


    493					;	ERROR MESSAGE OUTPUT ROUTINE ($ERMSG)
    494					;	TABLE INPUT ROUTINES ($RDEP/$RDMN)
    495					;
    496
    497	000000					.PSECT	OUTBUF,D,GBL,OVR
    498
    499	000000				$OUTBF::.BLKB	128.
    500
    501	000506					.PSECT
LBRDF	MACRO M1108  05-DEC-77 22:25  PAGE 7


    503					;
    504					; CSI DEPENDENT DATA BASE
    505					;
    506
    507	000506				$CSIBK::.BLKB	C.SIZE		;CSI BLOCK
    508
    509
    510					;
    511					; SWITCHES DEFINED AS BITS IN $SWTCH
    512					;
    513
    514		100000 			CR$SW	==100000		;/CR (CREATE)
    515		040000 			IN$SW	==40000			;/IN (INSERT)
    516		020000 			DL$SW	==20000			;/DL (DELETE)
    517		010000 			RP$SW	==10000			;/RP (REPLACE)
    518		004000 			CO$SW	==4000			;/CO (COMPRESS)
    519		002000 			LI$SW	==2000			;/LI (LIST)
    520		001000 			LE$SW	==1000			;/LE (LIST MODULE ENTRY POINTS)
    521		000400 			FU$SW	==400			;/FU (LIST FULL MODULE ID)
    522		000200 			SP$SW	==200			;/SP (SPOOL OUTPUT)
    523		000100 			SS$SW	==100			;/SS (SELECTIVE SEARCH ATTRIBUTE)
    524		000040 			DF$SW	==40			;/DF (SET DEFAULT TYPE)
    525		000020 			SZ$SW	==20			;/SZ (SQUEEZE)
    526					;
    527					; STATUS BITS DEFINED IN $SWTCH+2
    528					;
    529		100000 			IN$COR	==100000		;LBR HEADER, EPT AND MNT IN CORE
    530		040000 			LB$DTY	==40000			;LBR HEADER, EPT OR MNT HAS BEEN MODIFIED
    531					;
    532					; THE FOLLOWING IS DEFINED FOR GTCML COMPATIBILITY BUT IS NOT USED
    533					;
    534		000000 			EN$DR	==0
    535
    536					; SWITCH COMBINATION DEFINITIONS
    537
    538		160020 			XC$SW	==CR$SW!IN$SW!DL$SW!SZ$SW ;ALL BUT /CO AND /LI
    539		024000 			CO$DL	==CO$SW!DL$SW		;CO$SW+DL$SW
    540		002400 			LI$FU	==LI$SW!FU$SW		;LI$SW+FU$SW
    541		003000 			LI$LE	==LI$SW!LE$SW		;LI$SW+LE$SW
    542
    543
    544					;
    545					; GENERATE SWITCH CONTROL BLOCKS
    546					;
    547
    548	000562					GENSWT	LBR,CR,CR$SW,$SWTCH,SET,,CRVAL
    549	000562					GENSWT	LBR,CO,CO$SW,$SWTCH,SET,,COVAL
    550	000562					GENSWT	LBR,IN,IN$SW,$SWTCH,SET
    551	000562					GENSWT	LBR,RP,RP$SW,$SWTCH,SET
    552	000562					GENSWT	LBR,SZ,SZ$SW,$SWTCH,SET
    553	000562					GENSWT	LBR,LI,LI$SW,$SWTCH,SET
    554	000562					GENSWT	LBR,FU,LI$FU,$SWTCH,SET
    555	000562					GENSWT	LBR,LE,LI$LE,$SWTCH,SET
    556	000562					GENSWT	LBR,DE,DL$SW,$SWTCH,SET,,DLVAL
    557	000562					GENSWT	LBR,DF,DF$SW,$SWTCH,SET,,DFVAL
    558	000562					GENSWT	LBR,DG,DL$SW,$SWTCH,SET,,DGVAL
    559
LBRDF	MACRO M1108  05-DEC-77 22:25  PAGE 7-1


    560	000562					GENSWT	LIS,LI,LI$SW,$SWTCH,SET
    561	000562					GENSWT	LIS,FU,FU$SW,$SWTCH,SET
    562	000562					GENSWT	LIS,LE,LE$SW,$SWTCH,SET
    563	000562					GENSWT	LIS,SP,SP$SW,$SWTCH,CLEAR,NEG
    564
    565	000562					GENSWT	INP,RP,RP$SW,INPPT+R$SWTH,SET,NEG
    566	000562					GENSWT	INP,SZ,SZ$SW,INPPT+R$SWTH,SET,NEG
    567	000562					GENSWT	INP,SS,SS$SW,INPPT+R$SWTH,SET,NEG
    568
    569
    570	000000					.PSECT	LBRVAL,D,GBL
    571
    572					;
    573					; VALUE BLOCK FOR /CR:SIZ:EPT:MNT:TYPE
    574					;
    575	000000				CRVAL:	CSI$SV	NUMERIC,$SIZ,2
    576	000004					CSI$SV	NUMERIC,$EPT,2
    577	000010					CSI$SV	NUMERIC,$MNT,2
    578	000014					CSI$SV	ASCII,L$BUF,3
    579
    580	000020					CSI$ND
    581
    582
    583					;
    584					; VALUE BLOCK FOR /CO:SIZ:EPT:MNT
    585					;
    586	000022				COVAL:	CSI$SV	NUMERIC,$SIZ,2
    587	000026					CSI$SV	NUMERIC,$EPT,2
    588	000032					CSI$SV	NUMERIC,$MNT,2
    589
    590	000036					CSI$ND
    591					;
    592					; VALUE BLOCK FOR /DF:TYP
    593					;
    594	000040				DFVAL:	CSI$SV	ASCII,L$BUF+3,3
    595
    596	000044					CSI$ND
    597
    598					;
    599					; VALUE BLOCK FOR /DE:NAME1:NAME2:...
    600					;
    601		000006'			$DBLK	==L$BUF+6		;ADDRESS TO STORE NAMES
    602		000000 			ZZZ=0
    603
    604	000046				DLVAL:
    605		000036 				.REPT	$DMSIZ
    606						CSI$SV	ASCII,$DBLK+ZZZ,6
    607						ZZZ=ZZZ+6
    608						.ENDR
    609
    610		000272'			$DGBLK	==$DBLK+ZZZ
    611
    612	000236					CSI$ND
    613
    614
    615					;
    616					; VALUE TABLE FOR /DG:NAME:NAME:...
LBRDF	MACRO M1108  05-DEC-77 22:25  PAGE 7-2


    617					;
    618		000000 			ZZZ=0
    619
    620	000240				DGVAL:
    621		000036 				.REPT	$DMSIZ
    622						CSI$SV	ASCII,$DGBLK+ZZZ,6
    623						ZZZ=ZZZ+6
    624						.ENDR
    625
    626	000430					CSI$ND
    627
    628	000562					.PSECT
    629
    630
    631					;
    632					; CLOSE SWITCH P-SECTIONS
    633					;
    634
    635	000562					CLOSCT	LBR
    636	000562					CLOSCT	LIS
    637	000562					CLOSCT	INP
    638	000562					CLOSCT	CMP
    639
    640
    641		000001 				.END
LBRDF	MACRO M1108  05-DEC-77 22:25  PAGE 7-3
SYMBOL TABLE

AFILES= 000002   	FD.PLC= 000004   	F.STBK= 000036   	L$TYP   000000RG    041	$CMFLG  000464RG
CMIPT   000002R     002	FD.RAH= 000001   	F.UNIT= 000136   	L$VER   000002RG    041	$CMIPT  000000RG    002
CMPNAM  000000RG    032	FD.RAN= 000002   	F.URBD= 000020   	MHSIZE= 000020 G 	$CMOLN= 000002 G
CMPPT   000002RG    031	FD.REC= 000001   	F.VBN = 000064   	M$MAC = 000010 G 	$CMPPT  000000RG    031
CMPSW   000000R     037	FD.RWM= 000001   	F.VBSZ= 000060   	M$OBJ = 000010 G 	$CSIBK  000506RG
COVAL   000022R     045	FD.SDI= 000020   	GE.BIF= 177775   	NB.DEV= 000200   	$DBLK = 000006RG    041
CO$DL = 024000 G 	FD.SQD= 000040   	GE.CLO= 000004   	NB.DIR= 000100   	$DEND = 000312RG
CO$SW = 004000 G 	FD.TTY= 000004   	GE.COM= 000001   	NB.NAM= 000004   	$DGBLK= 000272RG    041
CRVAL   000000R     045	FD.WBH= 000002   	GE.EOF= 177766   	NB.SD1= 000400   	$DGEND= 000322RG
CR$SW = 100000 G 	FO.APD= 000106   	GE.IND= 000002   	NB.SD2= 001000   	$DMN    000132RG
CS.DIF= 000002   	FO.MFY= 000002   	GE.IOR= 177777   	NB.SNM= 000040   	$DMSIZ= 000036 G
CS.DVF= 000004   	FO.RD = 000001   	GE.LC = 000010   	NB.STP= 000020   	$EPADR= 000126RG
CS.EQU= 000040   	FO.UPD= 000006   	GE.MDE= 177774   	NB.SVR= 000010   	$EPBLK  000124RG
CS.INP= 000001   	FO.WRT= 000016   	GE.OPR= 177776   	NB.TYP= 000002   	$EPES = 000124RG
CS.MOR= 000020   	FU$SW = 000400 G 	G.CMLD= 000146   	NB.VER= 000001   	$EPSIZ= 000130RG
CS.NMF= 000001   	F$DEVL= 000006 G 	G.DPRM= 000160   	NU$PAR= 000010 G 	$EPT  = 000326RG
CS.OUT= 000002   	F$DIRL= 000015 G 	G.ERR = 000140   	N.DID = 000024   	$EPTHL  000044RG
CS.WLD= 000010   	F$FILL= 000021 G 	G.ISIZ= 000020   	N.DVNM= 000032   	$FRHD   000000RG
C.CMLD= 000002   	F.ALOC= 000040   	G.LPDL= 000100   	N.FID = 000000   	$HDLST  000104RG
C.DEVD= 000006   	F.BBFS= 000062   	G.MODE= 000141   	N.FNAM= 000006   	$INPPT  000000RG    003
C.DIRD= 000012   	F.BDB = 000070   	G.PSDS= 000142   	N.FTYP= 000014   	$LBEND  000000RG    042
C.DSDS= 000006   	F.BGBC= 000057   	HS$MAC= 000020 G 	N.FVER= 000016   	$LBRPT  000000RG    022
C.FILD= 000016   	F.BKDN= 000026   	HS$OBJ= 000020 G 	N.NEXT= 000022   	$LISPT  000000RG    013
C.MKW1= 000024   	F.BKDS= 000020   	ID$   = 000002 G 	N.STAT= 000020   	$LNBUF  000340RG
C.MKW2= 000026   	F.BKEF= 000050   	ILVL  = 000003   	N.UNIT= 000034   	$LNDES  000334RG
C.SIZE= 000054   	F.BKP1= 000051   	INPNAM  000000RG    005	PBLK    000324R  	$MHAT = 000005RG
C.STAT= 000001   	F.BKST= 000024   	INPPT   000002RG    003	Q$$CMO= 000000   	$MHBUF  000004RG
C.SWAD= 000022   	F.BKVB= 000064   	INPSW   000000R     012	RP$SW = 010000 G 	$MHDA = 000012RG
C.TYPR= 000000   	F.CNTG= 000034   	IN$COR= 100000 G 	R$NAME= 000140 G 	$MHID = 000020RG
DBASE = 000044RG 	F.DFNB= 000046   	IN$SW = 040000 G 	R$SWBK= 000144 G 	$MHST = 000004RG
DBEND = 000334R  	F.DSPT= 000044   	LBRNAM  000000RG    023	R$SWTH= 000142 G 	$MNADR= 000120RG
DFVAL   000040R     045	F.DVNM= 000134   	LBRPT   000002RG    022	R$$11M= 000000   	$MNBLK  000116RG
DF$SW = 000040 G 	F.EFBK= 000010   	LBRSW   000000R     030	R.FIX = 000001   	$MNES = 000116RG
DF$TYP  000472RG 	F.EFN = 000050   	LBRTAB  000000RG    043	R.VAR = 000002   	$MNSIZ= 000122RG
DGVAL   000240R     045	F.EOBB= 000032   	LB$DTY= 040000 G 	SP$SW = 000200 G 	$MNT  = 000330RG
DLVAL   000046R     045	F.ERR = 000052   	LE$SW = 001000 G 	SR0     000474RG 	$MNTHL  000064RG
DL$SW = 020000 G 	F.FACC= 000043   	LISNAM  000000RG    014	SS$SW = 000100 G 	$MOSZ = 000006RG
DSIZE = 000134 G 	F.FFBY= 000014   	LISPT   000002RG    013	SZ$SW = 000020 G 	$OPNFL  000106RG
EN$DR = 000000 G 	F.FNAM= 000110   	LISSW   000000R     021	S$$LIB= 000000   	$OUTBF  000000RG    044
EPTBLK= 000002 G 	F.FNB = 000102   	LI$FU = 002400 G 	S.BFHD= 000020   	$PARTD  000024RG
E$MAC = 000000 G 	F.FTYP= 000116   	LI$LE = 003000 G 	S.FATT= 000016   	$SIZ  = 000324RG
E$OBJ = 000010 G 	F.FVER= 000120   	LI$SW = 002000 G 	S.FDB = 000140   	$SWTCH  000112RG
FA.APD= 000100   	F.HIBK= 000004   	L$BUF   000000RG    041	S.FNAM= 000006   	$TYP  = 000332RG
FA.CRE= 000010   	F.LUN = 000042   	L$DAT   000006RG    041	S.FNB = 000036   	$$    = 000001
FA.EXT= 000004   	F.MBCT= 000054   	L$EA    000030RG    041	S.FNBW= 000017   	$$$   = 000162R     002
FA.NSP= 000100   	F.MBC1= 000055   	L$EI    000026RG    041	S.FNTY= 000004   	$$0   = 000000R     036
FA.RD = 000001   	F.MBFG= 000056   	L$ES    000022RG    041	S.FTYP= 000002   	$$1   = 000000R     033
FA.SHR= 000040   	F.NRBD= 000024   	L$ET    000024RG    041	S.NFEN= 000020   	$$2   = 000000R     034
FA.TMP= 000020   	F.NREC= 000030   	L$ID    000001RG    041	TY$   = 000001 G 	$$3   = 000000R     035
FA.WRT= 000002   	F.OVBS= 000030   	L$LA    000046RG    041	TY$ES   000466RG 	.FSRCB= ****** G
FD.BLK= 000010   	F.RACC= 000016   	L$LD    000042RG    041	TY$MAC= 000001 G 	...GBL= 000000
FD.CCL= 000002   	F.RATT= 000001   	L$MA    000040RG    041	TY$MS   000470RG 	...PC1= 000002R     031
FD.CR = 000002   	F.RCNM= 000034   	L$MI    000036RG    041	TY$OBJ= 000000 G 	...PC2= 000142R     031
FD.DIR= 000010   	F.RCTL= 000017   	L$MS    000032RG    041	XC$SW = 160020 G 	...PC3= 000002R     031
FD.FTN= 000001   	F.RSIZ= 000002   	L$MT    000034RG    041	ZZZ   = 000264   	...TPC= 000020
FD.INS= 000010   	F.RTYP= 000000   	L$NX    000052RG    041	$ATTFG  000110RG
LBRDF	MACRO M1108  05-DEC-77 22:25  PAGE 7-4
SYMBOL TABLE

. ABS.	000000	   000
      	000562	   001
CMIPT 	000326	   002
INPPT 	000150	   003
INPBUF	000204	   004
INPNAM	000036	   005
INPDV 	000006	   006
INPDR 	000015	   007
INPFL 	000021	   010
INPFP 	000014	   011
INPSWT	000032	   012
LISPT 	000150	   013
LISNAM	000036	   014
LISDV 	000006	   015
LISDR 	000015	   016
LISFL 	000021	   017
LISFP 	000014	   020
LISSWT	000042	   021
LBRPT 	000150	   022
LBRNAM	000036	   023
LBRDV 	000006	   024
LBRDR 	000015	   025
LBRFL 	000021	   026
LBRFP 	000014	   027
LBRSWT	000132	   030
CMPPT 	000150	   031
CMPNAM	000036	   032
CMPDV 	000006	   033
CMPDR 	000015	   034
CMPFL 	000021	   035
CMPFP 	000014	   036
CMPSWT	000002	   037
$$FSR1	002040	   040
BUFFER	001000	   041
BUFFES	000000	   042
DFTYP 	000000	   043
OUTBUF	000200	   044
LBRVAL	000432	   045
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  4775 WORDS  ( 19 PAGES)
DYNAMIC MEMORY:  5216 WORDS  ( 20 PAGES)
ELAPSED TIME:  00:01:41
[42,10]LBRDF,[42,20]LBRDF/-SP=[42,30]LBRPRF,LBRDF
LBRDL	MACRO M1108  05-DEC-77 22:26  PAGE 2


      1						.TITLE	LBRDL
      2						.IDENT	/X03.1/
      3
      4					;
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      6					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      7					;
      8					;	DEC ASSUMES NO RESPONSIBLIITY FOR THE USE
      9					;	OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT
     10					;	WHICH IS NOT SUPPLIED BY DEC.
     11					;
     12					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     13					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     14					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     15					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     16					;
     17					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     18					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     19					; EQUIPMENT CORPORATION.
     20					;
     21					; VERSION X03.1
     22					;
     23					; WRITTEN BY:
     24					;	GEORGE W. BERRY
     25					;
     26					; MODIFIED BY:
     27					;	C.A. D'ELIA	08-MAY-74
     28					;	C.A. D'ELIA	20-JUN-74  (VIRTUAL TABLES)
     29					;	THOMAS J. MILLER 07-NOV-74
     30					;
     31					;
     32
     33
     34					;
     35					; MACRO LIBRARY CALLS
     36					;
     37
     38						.MCALL	PUT$
     39
     40					;
     41					; DELETION MESSAGE
     42					;
     43
     44	000000	   045 	   116 	   115 	DMD:	.ASCIZ	/%NMODULES DELETED:%N/
	000003	   117 	   104 	   125
	000006	   114 	   105 	   123
	000011	   040 	   104 	   105
	000014	   114 	   105 	   124
	000017	   105 	   104 	   072
	000022	   045 	   116 	   000
     45	000025	   045 	   116 	   105 	DGD:	.ASCIZ	/%NENTRY POINTS DELETED:%N/
	000030	   116 	   124 	   122
	000033	   131 	   040 	   120
	000036	   117 	   111 	   116
	000041	   124 	   123 	   040
	000044	   104 	   105 	   114
	000047	   105 	   124 	   105
LBRDL	MACRO M1108  05-DEC-77 22:26  PAGE 2-1


	000052	   104 	   072 	   045
	000055	   116 	   000
     46	000057	   045 	   062 	   122 	DNAME:	.ASCIZ	/%2R%N/
	000062	   045 	   116 	   000
     47						.EVEN
     48
     49
     50					;+
     51					;
     52					; **-$DEL- DELETE FUNCTION
     53					;
     54					; THIS ROUTINE DELETES NAMED MODULES FROM THE LIBRARY.
     55					;
     56					; INPUTS:
     57					;
     58					;	MODULE NAMES ARE STORED IN '$DMN' AS RADIX 50
     59					;	DOUBLE WORDS, TERMINATED BY A WORD OF ZERO.
     60					;
     61					; OUTPUTS:
     62					;
     63					;	NONE
     64					;
     65					;-
     66
     67	000066				$DEL::	SAVRG			;SAVE R3-R5
     68	000072	012705 	000000G			MOV	#$DMN,R5	;SET UP POINTER TO NAMES TO DELETE
     69	000076	012701 	000000G			MOV	#FO.UPD,R1	;SPECIFY OPEN FOR UPDATE
     70	000102					CALL	$RDHD		;READ HEADER, EPT AND MNT
     71
     72
     73						.IF NDF	Q$$CMO
     74
     75
     76						MOV	$CMOPT,R0	;OUTPUT ON CMO DEVICE
     77
     78						.IFF
     79
     80	000106	005000 				CLR	R0		;OUTPUT TO CMD OUTPUT
     81
     82
     83						.ENDC
     84
     85
     86	000110					CALL	$OUT		;INIT OUTPUT ROUTINE
     87	000114	005715 				TST	(R5)		;CHECK FOR ANY /DE
     88	000116	001405 				BEQ	10$		;BRANCH IF NONE
     89	000120	012701 	000000'			MOV	#DMD,R1		;SEND INITIAL MESSAGE
     90	000124	005002 				CLR	R2
     91	000126				5$:	CALL	$OUT1
     92	000132	012500 			10$:	MOV	(R5)+,R0	;GET FIRST WORD OF NAME
     93	000134	001441 				BEQ	DG		;EXIT IF END OF TABLE
     94	000136	012501 				MOV	(R5)+,R1
     95	000140	012702 	000000G			MOV	#$MNBLK,R2
     96	000144					CALL	$FINDA		;FIND THE NAMED MODULE
     97	000150	103003 				BCC	20$		;BRANCH IF MODULE FOUND
     98	000152	012701 				MOV	(PC)+,R1	;CAN'T FIND MODULE
     99	000154	   000G	   000G			.BYTE	E$R18,S$V2
LBRDL	MACRO M1108  05-DEC-77 22:26  PAGE 2-2


    100	000156	000473 				BR	ERR.0
    101
    102	000160	052767 	000000G	000002G	20$:	BIS	#LB$DTY,$SWTCH+2 ;INDICATE MODIFICATION
    103	000166	062700 	000010 			ADD	#8.,R0		;POINT R0 TO LAST WORD OF ENTRY
    104	000172	011046 				MOV	(R0),-(SP)	;SAVE BLOCK OFFSET POINTER ...
    105	000174	014046 				MOV	-(R0),-(SP)	;... AND VBN OF ASSOCIATED MODULE
    106	000176	010602 				MOV	SP,R2		;POINT R2 TO THE INFORMATION
    107	000200	005267 	000000G			INC	L$MA		;INCREMENT MNT'S AVAILABLE COUNT
    108	000204	005020 				CLR	(R0)+		;LOGICALLY DELETE THE MNT ENTRY ...
    109	000206	005010 				CLR	(R0)		;... BY CLEARING IT'S MODULE ADDRESS
    110	000210					CALL	$WRMPG		;MARK THE PAGE DIRTY
    111	000214					CALL	$DELM		;DELETE THE MODULE
    112	000220	022626 				CMP	(SP)+,(SP)+	;CLEAN THE STACK
    113	000222					CALL	$WTHD		;REWRITE FILE HEADER, EPT, MNT
    114	000226	012701 	000057'			MOV	#DNAME,R1	;GIVE NAME OF MODULE DELETED
    115	000232	010502 				MOV	R5,R2		;POINT R2 PAST MODULE NAME
    116	000234	024242 				CMP	-(R2),-(R2)	;SUBTRACT 4 FROM R2
    117	000236	000733 				BR	5$
    118
    119	000240	005715 			DG:	TST	(R5)		;ANY EP'S TO DELETE?
    120	000242	001445 				BEQ	EXIT		;BRANCH IF NONE
    121	000244	012701 	000025'			MOV	#DGD,R1
    122	000250	005002 				CLR	R2
    123	000252				5$:	CALL	$OUT1		;"ENTRY POINTS DELETED:"
    124	000256	012500 			10$:	MOV	(R5)+,R0	;GET ENTRY POINT NAME
    125	000260	001436 				BEQ	EXIT		;EXIT IF END OF LIST
    126	000262	012501 				MOV	(R5)+,R1
    127	000264	012702 	000000G			MOV	#$EPBLK,R2	;GET EPT DESCRIPTOR
    128	000270					CALL	$FINDA		;FIND ENTRY POINT
    129	000274	103422 				BCS	20$		;BRANCH IF NOT FOUND
    130
    131	000276	052767 	000000G	000002G		BIS	#LB$DTY,$SWTCH+2 ;INDICATE MODIFICATION
    132	000304	005060 	000006 			CLR	6(R0)		;LOGICALLY DELETE THE EPT ENTRY ...
    133	000310	005060 	000010 			CLR	8.(R0)		;... BY CLEARING ITS MODULE ADDRESS
    134	000314					CALL	$WRMPG		;MARK THE PAGE DIRTY
    135	000320	005267 	000000G			INC	L$EA		;ONE MORE EP SLOT AVAILABLE
    136	000324					CALL	$WTHD		;REWRITE FILE HEADER
    137	000330	012701 	000057'			MOV	#DNAME,R1	;PRINT NAME OF EP DELETED
    138	000334	010502 				MOV	R5,R2
    139	000336	024242 				CMP	-(R2),-(R2)
    140	000340	000744 				BR	5$		;CONTINUE DELETE
    141
    142	000342	012701 			20$:	MOV	(PC)+,R1
    143	000344	   000G	   000G			.BYTE	E$R22,S$V2
    144	000346	024545 			ERR.0:	CMP	-(R5),-(R5)
    145	000350	010502 				MOV	R5,R2
    146	000352	000167 	000000G		ERROR:	JMP	$ERMSG		;FATAL ERROR EXIT
    147
    148
    149	000356	052767 	000000G	000002G	EXIT:	BIS	#LB$DTY,$SWTCH+2 ;SET DIRTY FLAG TO INSURE HEADER WILL
    150									 ;BE REWRITTEN AFTER L$LA IS RECOMPUTED
    151	000364					RETURN
    152
    153
    154		000001 				.END
LBRDL	MACRO M1108  05-DEC-77 22:26  PAGE 2-3
SYMBOL TABLE

DG      000240R  	E$R18 = ****** GX	R$$11M= 000000   	$EPBLK= ****** GX	$RDHD = ****** GX
DGD     000025R  	E$R22 = ****** GX	S$V2  = ****** GX	$ERMSG= ****** GX	$SAVRG= ****** GX
DMD     000000R  	FO.UPD= ****** GX	S$$LIB= 000000   	$FINDA= ****** GX	$SWTCH= ****** GX
DNAME   000057R  	LB$DTY= ****** GX	$DEL    000066RG 	$MNBLK= ****** GX	$WRMPG= ****** GX
ERROR   000352R  	L$EA  = ****** GX	$DELM = ****** GX	$OUT  = ****** GX	$WTHD = ****** GX
ERR.0   000346R  	L$MA  = ****** GX	$DMN  = ****** GX	$OUT1 = ****** GX	$$    = 000067
EXIT    000356R  	Q$$CMO= 000000

. ABS.	000000	   000
      	000366	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  813 WORDS  ( 4 PAGES)
DYNAMIC MEMORY:  3104 WORDS  ( 11 PAGES)
ELAPSED TIME:  00:00:08
[42,10]LBRDL,[42,20]LBRDL/-SP=[42,30]LBRPRF,LBRDL
LBRDLM	MACRO M1108  05-DEC-77 22:26  PAGE 2


      1						.TITLE	LBRDLM
      2						.IDENT	/X02.1/
      3
      4					;
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      6					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      7					;
      8					;	DEC ASSUMES NO RESPONSIBLIITY FOR THE USE
      9					;	OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT
     10					;	WHICH IS NOT SUPPLIED BY DEC.
     11					;
     12					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     13					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     14					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     15					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     16					;
     17					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     18					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     19					; EQUIPMENT CORPORATION.
     20					;
     21					; VERSION X02.1
     22					;
     23					; WRITTEN BY:
     24					;	GEORGE W. BERRY
     25					;
     26					; MODIFIED BY:
     27					;	C.A. D'ELIA	08-MAY-74
     28					;	C.A. D'ELIA	24-JUN-74  (VIRTUAL TABLES)
     29					;	THOMAS J MILLER 24-JUN-75  (CHANGE TO UPDATE END OF FILE)
     30					;
     31					;
     32
     33					;
     34					; MACRO LIBRARY CALLS
     35					;
     36
     37						.MCALL	FDOFF$,PUT$
     38	000000					FDOFF$	DEF$L
     39
     40					;+
     41					;
     42					; **-$DELM- DELETE SPECIFIED MODULE
     43					;
     44					; THIS ROUTINE DELETES A MODULE AND ALL OF ITS
     45					; EPT ENTRIES.  THE ROUTINE IS CALLED BY $DEL
     46					; AND $INS (REPLACE).
     47					;
     48					; INPUTS:
     49					;
     50					;	R2 = MODULE HEADER ADDRESS POINTER
     51					;
     52					; OUTPUTS:
     53					;
     54					;	NONE
     55					;
     56					;-
     57	000000				$DELM::	SAVRG			;SAVE R3 - R5
LBRDLM	MACRO M1108  05-DEC-77 22:26  PAGE 2-1


     58	000004	010204 				MOV	R2,R4		;AND SAVE IT FOR NOW
     59	000006	012200 				MOV	(R2)+,R0	;SET UP KEY FOR ASSOCIATIVE SEARCH
     60	000010	011201 				MOV	(R2),R1
     61	000012	012702 	000000G			MOV	#$EPBLK,R2	;GET ADDRESS OF EPT DESCRIPTOR
     62	000016					CALL	$FINDC		;SEARCH FOR EPT ENTRIES
     63	000022	103413 				BCS	40$		;BRANCH IF NONE FOUND
     64
     65	000024	005060 	000006 		30$:	CLR	6(R0)		;LOGICALLY DELETE THE EPT ENTRY ...
     66	000030	005060 	000010 			CLR	8.(R0)		;... BY CLEARING ITS MODULE ADDRESS
     67	000034					CALL	$WRMPG		;MARK THE PAGE DIRTY
     68	000040	005267 	000000G			INC	L$EA		;ONE MORE EPT ENTRY AVAILABLE
     69	000044					CALL	$FINDN		;CONTINUE SEARCH
     70	000050	103365 				BCC	30$		;BRANCH IF ANOTHER ENTRY FOUND
     71
     72	000052	010401 			40$:	MOV	R4,R1		;GET ADDRESS OF MODULE HEADER
     73	000054					CALL	$RDMH		;READ MODULE HEADER
     74	000060	103003 				BCC	50$		;BRANCH IF READ OK
     75	000062	012701 				MOV	(PC)+,R1	;FATAL READ ERROR
     76	000064	   000G	   000G			.BYTE	E$R10,S$V2
     77	000066	000464 				BR	ERRNM
     78
     79	000070	105267 	000000G		50$:	INCB	$MHST		;MARK MODULE DELETED
     80	000074	011401 				MOV	(R4),R1		;GET VBN OF CURRENT MODULE HEADER
     81	000076	016402 	000002 			MOV	2(R4),R2	; " BYTE-IN-BLOCK " " " "
     82	000102					CALL	$NEXT		;COMPUTE ADDRESS OF NEXT HEADER
     83	000106	012703 	000000G			MOV	#L$NX,R3
     84	000112	020123 				CMP	R1,(R3)+	;ARE WE DELETING THE LAST MODULE IN FILE?
     85	000114	001013 				BNE	60$		;BRANCH IF NOT
     86	000116	020213 				CMP	R2,(R3)
     87	000120	001011 				BNE	60$		;BRANCH IF NOT
     88	000122	016413 	000002 			MOV	2(R4),(R3)	;FIX UP L$NX
     89	000126	011367 	000014G			MOV	(R3),LBRPT+F.FFBY ;UPDATE EOF
     90	000132	011443 				MOV	(R4),-(R3)
     91	000134	011367 	000012G			MOV	(R3),LBRPT+F.EFBK+2 ;UPDATE EOF
     92	000140	005004 				CLR	R4		;INDICATE REWRITE OF MODULE HEADER NOT REQUIRED
     93	000142	000402 				BR	65$		;AND ADD MODULE SIZE INTO L$LA
     94
     95	000144	012703 	000004G		60$:	MOV	#L$LD+4,R3	;ADD SIZE INTO LOGICALLY DELETED SPACE
     96
     97	000150	066743 	000002G		65$:	ADD	$MOSZ+2,-(R3)	;RECOMPUTES SIZE IN BYTES
     98	000154	005543 				ADC	-(R3)		;(DOUBLE PRECISION)
     99	000156	066713 	000000G			ADD	$MOSZ,(R3)
    100	000162	005704 				TST	R4		;REWRITE MODULE HEADER?
    101	000164	001417 				BEQ	70$		;IF EQ NO
    102
    103	000166	005001 				CLR	R1		;REWRITE MODULE HEADER
    104	000170	012402 				MOV	(R4)+,R2	;GET BLOCK #
    105	000172	011403 				MOV	(R4),R3		;GET BYTE IN BLOCK
    106	000174					CALL	.POINT		;POSITION FILE
    107	000200	103415 				BCS	PERR
    108	000202					PUT$	R0,#$MHST,F.NRBD(R0) ;WRITE OUT HEADER
    109	000222	103401 				BCS	WERR		;BRANCH IF WRITE ERROR
    110	000224				70$:	RETURN
    111
    112
    113					;
    114					; ERROR EXIT
LBRDLM	MACRO M1108  05-DEC-77 22:26  PAGE 2-2


    115					;
    116	000226	012701 			WERR:	MOV	(PC)+,R1	;FILE WRITE ERROR
    117	000230	   000G	   000G			.BYTE	E$R02,S$V2
    118	000232	000402 				BR	ERRNM
    119
    120	000234	012701 			PERR:	MOV	(PC)+,R1	;FILE POSITIONING ERROR
    121	000236	   000G	   000G			.BYTE	E$R14,S$V2
    122	000240	016002 	000000G		ERRNM:	MOV	R$NAME(R0),R2	;INDICATE FILE NAME
    123	000244	000167 	000000G		ERROR:	JMP	$ERMSG		;FATAL ERROR EXIT
    124
    125
    126		000001 				.END
LBRDLM	MACRO M1108  05-DEC-77 22:26  PAGE 2-3
SYMBOL TABLE

ERRNM   000240R  	F.EFBK= 000010   	F.RATT= 000001   	N.FTYP= 000014   	S.FTYP= 000002
ERROR   000244R  	F.EFN = 000050   	F.RCNM= 000034   	N.FVER= 000016   	S.NFEN= 000020
E$R02 = ****** GX	F.EOBB= 000032   	F.RCTL= 000017   	N.NEXT= 000022   	WERR    000226R
E$R10 = ****** GX	F.ERR = 000052   	F.RSIZ= 000002   	N.STAT= 000020   	$DELM   000000RG
E$R14 = ****** GX	F.FACC= 000043   	F.RTYP= 000000   	N.UNIT= 000034   	$EPBLK= ****** GX
F.ALOC= 000040   	F.FFBY= 000014   	F.STBK= 000036   	PAR$$$= 000000   	$ERMSG= ****** GX
F.BBFS= 000062   	F.FNAM= 000110   	F.UNIT= 000136   	PERR    000234R  	$FINDC= ****** GX
F.BDB = 000070   	F.FNB = 000102   	F.URBD= 000020   	Q$$CMO= 000000   	$FINDN= ****** GX
F.BGBC= 000057   	F.FTYP= 000116   	F.VBN = 000064   	R$NAME= ****** GX	$MHST = ****** GX
F.BKDN= 000026   	F.FVER= 000120   	F.VBSZ= 000060   	R$$11M= 000000   	$MOSZ = ****** GX
F.BKDS= 000020   	F.HIBK= 000004   	LBRPT = ****** GX	S$V2  = ****** GX	$NEXT = ****** GX
F.BKEF= 000050   	F.LUN = 000042   	L$EA  = ****** GX	S$$LIB= 000000   	$RDMH = ****** GX
F.BKP1= 000051   	F.MBCT= 000054   	L$LD  = ****** GX	S.FATT= 000016   	$SAVRG= ****** GX
F.BKST= 000024   	F.MBC1= 000055   	L$NX  = ****** GX	S.FDB = 000140   	$WRMPG= ****** GX
F.BKVB= 000064   	F.MBFG= 000056   	N.DID = 000024   	S.FNAM= 000006   	$$    = 000067
F.CNTG= 000034   	F.NRBD= 000024   	N.DVNM= 000032   	S.FNB = 000036   	.POINT= ****** GX
F.DFNB= 000046   	F.NREC= 000030   	N.FID = 000000   	S.FNBW= 000017   	.PUT  = ****** G
F.DSPT= 000044   	F.OVBS= 000030   	N.FNAM= 000006   	S.FNTY= 000004   	...TPC= 000140
F.DVNM= 000134   	F.RACC= 000016

. ABS.	000000	   000
      	000250	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  1802 WORDS  ( 8 PAGES)
DYNAMIC MEMORY:  3104 WORDS  ( 11 PAGES)
ELAPSED TIME:  00:00:13
[42,10]LBRDLM,[42,20]LBRDLM/-SP=[42,30]LBRPRF,LBRDLM
LBRER	MACRO M1108  05-DEC-77 22:27  PAGE 2


      1						.TITLE	LBRER
      2						.IDENT	/X04.1/
      3
      4					;
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS 01754
      6					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS 01754
      7					; COPYRIGHT 1972, DIGITAL EQUIPMENT CORP., MAYNARD, MASS 01754
      8					;
      9					;	DEC ASSUMES NO RESPONSILILITY FOR THE
     10					;	USE OR RELIABILITY OF ITS SOFTWARE ON
     11					;	EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
     12					;
     13					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     14					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     15					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     16					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     17					;
     18					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     19					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     20					; EQUIPMENT CORPORATION.
     21					;
     22					; VERSION X04.1
     23					;
     24					;
     25					; WRITTEN BY:
     26					;	GEORGE W. BERRY
     27					;
     28					; MODIFIED BY:
     29					;	C.A. D'ELIA	08-MAY-74
     30					;	C.A. D'ELIA	30-JUN-74  (VIRTUAL TABLES)
     31					;	THOMAS J. MILLER 07-NOV-74
     32					;
     33					;
     34					; ERROR MESSAGE ROUTINE
     35					;
     36
     37					;
     38					; EQUATED SYMBOLS
     39					;
     40
     41		000000 			S$V0==0				;SEV 0=DIAGNOSTIC MESSAGE
     42		000001 			S$V1==1				;SEV 1=DIAG IF TERM IN/FATAL IF NOT
     43		000002 			S$V2==2				;SEV 2=FATAL ERROR
     44
     45					;
     46					; LOCAL MACROS
     47					;
     48					; ERROR MESSAGE DEFINITION
     49					;
     50					; ERM NUM,FORMAT
     51					;
     52					; WHERE:
     53					;
     54					;	NUM=ERROR NUMBER.
     55					;	FORMAT=ERROR MESSAGE FORMAT STATEMENT.
     56					;
     57
LBRER	MACRO M1108  05-DEC-77 22:27  PAGE 2-1


     58						.MACRO	ERM NUM,FORMAT
     59						.RADIX	10
     60						ERN	E$R'NUM,\Z,<FORMAT>
     61						.RADIX	8
     62					Z = Z+1
     63						.ENDM
     64
     65
     66
     67						.MACRO	ERN	TAG,NUM,FORMAT
     68						.LIST
     69
     70
     71								TAG==NUM'.
     72						.NLIST
     73						.IF DF	R$$11M
     74						.PSECT	MSGTXT,D,GBL
     75						.LIST
     76								ERR'NUM':	.ASCIZ	\FORMAT\
     77						.NLIST
     78						.PSECT	MSGLST,D,GBL
     79						.WORD	ERR'NUM
     80						.ENDC
     81						.ENDM
     82
     83
     84
     85
     86					;
     87					; INITIALIZE FOR THE ERROR MESSAGE MACRO INVOCATIONS
     88					;
     89
     90		000000 			Z=0				;START NUMBERING AT ZERO
     91
     92						.IF DF	R$$11M
     93	000000					.PSECT	MSGLST,D,GBL
     94	000000				$MGLST::			;REF LABEL TO LIST OF FORMAT ADDRESSES
     95						.ENDC
     96
     97
     98					;+
     99					;
    100					; ERROR MESSAGES AND NUMBERS FOR THE LIBRARIAN
    101					;
    102					;-
    103
    104						.NLIST	MC
    105						.NLIST	BIN
    106

					E$R0==0.
	000000				ERR0:	.ASCIZ	\ILLEGAL GET COMMAND LINE ERROR CODE%N\
    107

					E$R01==1.
	000046				ERR1:	.ASCIZ	\INPUT ERROR ON %X%N\
    108
LBRER	MACRO M1108  05-DEC-77 22:27  PAGE 2-2



					E$R1==2.
	000072				ERR2:	.ASCIZ	\COMMAND SYNTAX ERROR%N%VA%N\
    109

					E$R02==3.
	000126				ERR3:	.ASCIZ	\OUTPUT ERROR ON %X%N\
    110

					E$R3==4.
	000153				ERR4:	.ASCIZ	\ILLEGAL SWITCH%N%VA%N\
    111

					E$R4==5.
	000201				ERR5:	.ASCIZ	\INSUFFICIENT DYNAMIC MEMORY TO CONTINUE%N\
    112

					E$R5==6.
	000253				ERR6:	.ASCIZ	\INVALID LIBRARY TYPE SPECIFIED%N\
    113

					E$R6==7.
	000314				ERR7:	.ASCIZ	\COMMAND I/O ERROR%N\
    114

					E$R7==8.
	000340				ERR8:	.ASCIZ	\INDIRECT FILE OPEN FAILURE%N%VA%N\
    115

					E$R8==9.
	000402				ERR9:	.ASCIZ	\INDIRECT COMMAND SYNTAX ERROR%N%VA%N\
    116

					E$R09==10.
	000447				ERR10:	.ASCIZ	\BAD LIBRARY HEADER%N\
    117

					E$R9==11.
	000474				ERR11:	.ASCIZ	\INDIRECT FILE DEPTH EXCEEDED%N%VA%N\
    118

					E$R10==12.
	000540				ERR12:	.ASCIZ	\I/O ERROR ON INPUT FILE %X%N\
    119

					E$R11==13.
	000575				ERR13:	.ASCIZ	\OPEN FAILURE ON FILE %X%N\
    120

					E$R13==14.
	000627				ERR14:	.ASCIZ	\INVALID EPT AND/OR MNT SPECIFICATION%N\
    121

					E$R14==15.
	000676				ERR15:	.ASCIZ	\POSITIONING ERROR ON %X%N\
    122
LBRER	MACRO M1108  05-DEC-77 22:27  PAGE 2-3


					E$R15==16.
	000730				ERR16:	.ASCIZ	\EPT OR MNT EXCEEDED IN %X%N\
    123

					E$R16==17.
	000764				ERR17:	.ASCIZ	\DUPLICATE MODULE NAME "%2R" IN %X%N\
    124

					E$R17==18.
	001030				ERR18:	.ASCIZ	\GET TIME FAILED%N\
    125

					E$R18==19.
	001052				ERR19:	.ASCIZ	\NO MODULE NAMED "%2R"%N\
    126

					E$R19==20.
	001102				ERR20:	.ASCIZ	\INVALID NAME -- "%6A"%N\
    127

					E$R20==21.
	001132				ERR21:	.ASCIZ	\LIBRARY FILE SPECIFICATION MISSING%N\
    128

					E$R21==22.
	001177				ERR22:	.ASCIZ	\ILLEGAL SWITCH COMBINATION%N\
    129

					E$R22==23.
	001234				ERR23:	.ASCIZ	\NO ENTRY POINT NAMED "%2R"%N\
    130

					E$R23==24.
	001271				ERR24:	.ASCIZ	\DUPLICATE ENTRY POINT NAME "%2R" IN %X%N\
    131

					E$R24==25.
	001342				ERR25:	.ASCIZ	\TOO MANY OUTPUT FILES SPECIFIED%N\
    132

					E$R26==26.
	001404				ERR26:	.ASCIZ	\EXACTLY ONE INPUT FILE MUST APPEAR WITH /CO%N\
    133

					E$R27==27.
	001462				ERR27:	.ASCIZ	\FATAL COMPRESS ERROR\
    134

					E$R28==28.
	001507				ERR28:	.ASCIZ	\EPT OR MNT SPACE EXCEEDED IN COMPRESS%N\
    135

					E$R29==29.
	001557				ERR29:	.ASCIZ	\ERROR IN LIBRARY TABLES, FILE %X%N\
    136

					E$R30==30.
LBRER	MACRO M1108  05-DEC-77 22:27  PAGE 2-4


	001622				ERR30:	.ASCIZ	\INVALID FORMAT, INPUT FILE %X%N\
    137

					E$R31==31.
	001662				ERR31:	.ASCIZ	\OPEN FAILURE ON LBR WORK FILE%N\
    138

					E$R32==32.
	001722				ERR32:	.ASCIZ	\MARK FOR DELETE FAILURE ON LBR WORK FILE%N\
    139

					E$R55==33.
	001775				ERR33:	.ASCIZ	\ILLEGAL FILENAME%N%VA%N\
    140

					E$R56==34.
	002025				ERR34:	.ASCIZ	\ILLEGAL DEVICE/VOLUME%N%VA%N\
    141

					E$R58==35.
	002062				ERR35:	.ASCIZ	\ILLEGAL DIRECTORY%N%VA%N\
    142

					E$R73==36.
	002113				ERR36:	.ASCIZ	\WORK FILE I/O ERROR%N\
    143

					E$R76==37.
	002141				ERR37:	.ASCIZ	\VIRTUAL STORAGE REQUIREMENT EXCEEDS 65536. WORDS%N\
    144
    145						.LIST	BIN
    146						.LIST	MC
    147
    148	000000					.PSECT
    149
    150
    151
    152					;+
    153					; **-$ERMSG-ERROR MESSAGE ROUTINE
    154					;
    155					; THIS ROUTINE IS CALLED TO OUTPUT AN ERROR MESSAGE. THE SEVERITY OF
    156					; THE ERROR IS USED TO SELECT A PREFIX THAT IS TO BE OUTPUT WITH THE
    157					; MESSAGE. THE ERROR NUMBER SPECIFIES AN ERROR FORMAT WHICH IS PASSED
    158					; TO '$FMTER' TO EDIT THE ERROR MESSAGE. THE RESULTANT ERROR MESSAGE IS
    159					; THEN OUTPUT USING THE ROUTINE '$EROUT'. IF THE SEVERITY OF THE ERROR
    160					; IS 2, AB$RT IS SET, OR THE SEVERITY OF THE ERROR IS 1 AND THE INPUT IS
    161					; NOT COMING FROM A TERMINAL, THEN THE CURRENT BUILD IS TERMINATED. ELSE
    162					; A RETURN TO THE CALLER IS EXECUTED.
    163					;
    164					; INPUTS:
    165					;
    166					;	R1=ERROR/SEVERITY NUMBERS.
    167					;	R2=ARGUMENT BLOCK ADDRESS.
    168					;
    169					; OUTPUTS:
    170					;
    171					;	IF THE SEVERITY OF THE ERROR IS FATAL OR AB$RT IS SET, THEN
LBRER	MACRO M1108  05-DEC-77 22:27  PAGE 2-5


    172					;	THE CURRENT BUILD IS TERMINATED BY CLOSING ALL OPEN FILES AND
    173					;	JUMPING TO THE RESTART ADDRESS IN THE ROOT SEGMENT.
    174					;-
    175
    176	000000				$ERMSG::SAVRG			;SAVE R3-R5
    177	000004					CALL	$FMTER		;FORMAT ERROR MESSAGE
    178	000010	000167 	000000G			JMP	$EROUT		;PRINT MESSAGE
    179
    180
    181		000001 				.END
LBRER	MACRO M1108  05-DEC-77 22:27  PAGE 2-6
SYMBOL TABLE

ERR0    000000R     003	ERR25   001342R     003	ERR8    000340R     003	E$R22 = 000027 G 	E$R73 = 000044 G
ERR1    000046R     003	ERR26   001404R     003	ERR9    000402R     003	E$R23 = 000030 G 	E$R76 = 000045 G
ERR10   000447R     003	ERR27   001462R     003	E$R0  = 000000 G 	E$R24 = 000031 G 	E$R8  = 000011 G
ERR11   000474R     003	ERR28   001507R     003	E$R01 = 000001 G 	E$R26 = 000032 G 	E$R9  = 000013 G
ERR12   000540R     003	ERR29   001557R     003	E$R02 = 000003 G 	E$R27 = 000033 G 	Q$$CMO= 000000
ERR13   000575R     003	ERR3    000126R     003	E$R09 = 000012 G 	E$R28 = 000034 G 	R$$11M= 000000
ERR14   000627R     003	ERR30   001622R     003	E$R1  = 000002 G 	E$R29 = 000035 G 	S$V0  = 000000 G
ERR15   000676R     003	ERR31   001662R     003	E$R10 = 000014 G 	E$R3  = 000004 G 	S$V1  = 000001 G
ERR16   000730R     003	ERR32   001722R     003	E$R11 = 000015 G 	E$R30 = 000036 G 	S$V2  = 000002 G
ERR17   000764R     003	ERR33   001775R     003	E$R13 = 000016 G 	E$R31 = 000037 G 	S$$LIB= 000000
ERR18   001030R     003	ERR34   002025R     003	E$R14 = 000017 G 	E$R32 = 000040 G 	Z     = 000046
ERR19   001052R     003	ERR35   002062R     003	E$R15 = 000020 G 	E$R4  = 000005 G 	$ERMSG  000000RG
ERR2    000072R     003	ERR36   002113R     003	E$R16 = 000021 G 	E$R5  = 000006 G 	$EROUT= ****** GX
ERR20   001102R     003	ERR37   002141R     003	E$R17 = 000022 G 	E$R55 = 000041 G 	$FMTER= ****** GX
ERR21   001132R     003	ERR4    000153R     003	E$R18 = 000023 G 	E$R56 = 000042 G 	$MGLST  000000RG    002
ERR22   001177R     003	ERR5    000201R     003	E$R19 = 000024 G 	E$R58 = 000043 G 	$SAVRG= ****** GX
ERR23   001234R     003	ERR6    000253R     003	E$R20 = 000025 G 	E$R6  = 000007 G 	$$    = 000067
ERR24   001271R     003	ERR7    000314R     003	E$R21 = 000026 G 	E$R7  = 000010 G

. ABS.	000000	   000
      	000014	   001
MSGLST	000114	   002
MSGTXT	002224	   003
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  1340 WORDS  ( 6 PAGES)
DYNAMIC MEMORY:  3104 WORDS  ( 11 PAGES)
ELAPSED TIME:  00:00:22
[42,10]LBRER,[42,20]LBRER/-SP=[42,30]LBRPRF,LBRER
LBRERF	MACRO M1108  05-DEC-77 22:27  PAGE 2


      1						.TITLE	LBRERF
      2						.IDENT	/X02.3/
      3
      4					;
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS 01754
      6					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS 01754
      7					; COPYRIGHT 1972, DIGITAL EQUIPMENT CORP., MAYNARD, MASS 01754
      8					;
      9					;	DEC ASSUMES NO RESPONSILILITY FOR THE
     10					;	USE OR RELIABILITY OF ITS SOFTWARE ON
     11					;	EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
     12					;
     13					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     14					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     15					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     16					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     17					;
     18					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     19					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     20					; EQUIPMENT CORPORATION.
     21					;
     22					; VERSION X02.3
     23					;
     24					;
     25					; WRITTEN BY:
     26					;	GEORGE W. BERRY
     27					;
     28					; MODIFIED BY:
     29					;	C.A. D'ELIA	10-JUN-74
     30					;	C.A. D'ELIA	30-JUN-74 (VIRTUAL TABLES)
     31					;	THOMAS J MILLER	30-DEC-74
     32					;
     33					;
     34					; ERROR MESSAGE FORMATTING ROUTINE
     35					;
     36
     37					;
     38					; MACRO LIBRARY CALLS
     39					;
     40
     41						.MCALL	FCSBT$
     42	000000					FCSBT$
     43						.MCALL	FDOFF$
     44	000000					FDOFF$	DEF$L
     45
     46
     47						.IF NDF	R$$11M
     48
     49						.MCALL	MOUT$,MOWA$S,DIR$
     50
     51						.ENDC
     52
     53
     54					;
     55					; LOCAL DATA
     56					;
     57
LBRERF	MACRO M1108  05-DEC-77 22:27  PAGE 2-1


     58	000000					.PSECT	TXT
     59	000000	   015 	   012 	   114 	DIAG:	.ASCIZ	<15><12>/LBR -- *DI/  ;DIAGNOSTIC PREFIX
	000003	   102 	   122 	   040
	000006	   055 	   055 	   040
	000011	   052 	   104 	   111
	000014	   000
     60	000015	   101 	   107 	   052 		.ASCII	/AG*-/		;NOTE: NULL CHAR MUST BE 4 BYTES FROM ...
	000020	   055
     61									;      ... END OF STRING
     62	000021	   015 	   012 	   114 	FATAL:	.ASCIZ	<15><12>/LBR -- *FAT/  ;FATAL PREFIX
	000024	   102 	   122 	   040
	000027	   055 	   055 	   040
	000032	   052 	   106 	   101
	000035	   124 	   000
     63	000037	   101 	   114 	   052 		.ASCII	/AL*-/		;NOTE: PLACEMENT OF NULL CHAR AGAIN
	000042	   055
     64
     65	000000					.PSECT
     66
     67
     68						.IF NDF	R$$11M
     69
     70
     71					;
     72					; MESSAGE FILENAME DESCRIPTOR
     73					;
     74
     75						.PSECT	TXT
     76
     77					MSGFL:	.ASCII	/SY:[1,2]LBR.MSG/  ;FILENAME STRING
     78					MSGFLE:
     79
     80						.PSECT
     81
     82					MFLDS:	.WORD	MSGFLE-MSGFL	;FILENAME DESCRIPTOR
     83						.WORD	MSGFL
     84
     85					;
     86					; MESSAGE OUTPUT DPB
     87					;
     88
     89					MODPB:	MOUT$	MFLDS,,,CONT,USBUF,$OUTBF,128.,MOSTS,8.
     90
     91					;
     92					; MESSAGE OUTPUT I/O STATUS BLOCK
     93					;
     94
     95					MOSTS:	.BLKW	2
     96
     97
     98						.ENDC
     99
    100
    101					;+
    102					;
    103					; **-$FMTER- FORMAT AN ERROR MESSAGE
    104					;
LBRERF	MACRO M1108  05-DEC-77 22:27  PAGE 2-2


    105					; THIS ROUTINE IS CALLED BY '$ERMSG'.  THE DESCRIPTION ON ITS
    106					; USE IS FOUND IN THAT MODULE.
    107					;
    108					;-
    109
    110	000000				$FMTER::
    111	000000	005005 				CLR	R5		;
    112	000002	150105 				BISB	R1,R5		;GET ERROR NUMBER
    113	000004	005004 				CLR	R4		;
    114	000006	000301 				SWAB	R1		;SWAP HALVES
    115	000010	150104 				BISB	R1,R4		;GET SEVERITY
    116	000012	016703 	000000G			MOV	$CMIPT,R3	;GET COMMAND INPUT RECORD BLOCK
    117	000016	132763 	000004 	000017 		BITB	#FD.TTY,F.RCTL(R3);TERMINAL DEVICE?
    118	000024	001001 				BNE	40$		;IF NE YES
    119	000026	005204 				INC	R4		;INCREMENT SEVERITY
    120	000030	012701 	000000'		40$:	MOV	#DIAG,R1	;ASSUME DIAGNOSTIC MESSAGE
    121	000034	020427 	000000G			CMP	R4,#S$V2	;FATAL ERROR?
    122	000040	002402 				BLT	50$		;IF LT NO
    123	000042	012701 	000021'			MOV	#FATAL,R1	;GET ADDRESS OF FATAL MESSAGE
    124	000046	012700 	000000G		50$:	MOV	#$OUTBF,R0	;GET ADDRESS OF OUTPUT BUFFER
    125	000052	112120 			60$:	MOVB	(R1)+,(R0)+	;INSERT PREFIX
    126	000054	001376 				BNE	60$		;
    127	000056	005300 				DEC	R0		;BACKUP BUFFER ADDRESS
    128
    129
    130						.IF NDF	R$$11M
    131
    132
    133						MOV	R4,R3		;SAVE SEVERITY
    134						MOV	#MODPB,R4	;GET ADDRESS OF MESSAGE OUTPUT DPB
    135						MOV	R0,M.OBUF(R4)	;SET UP BUFFER ADDRESS
    136						MOV	R2,M.OPRM(R4)	;SET ADDRESS OF PARAMETER BLOCK
    137						MOV	R5,M.ONUM(R4)	;SET ERROR NUMBER
    138						INC	M.ONUM(R4)	;CONVERT TO RECORD NUMBER
    139						DIR$	R4		;FORMAT MESSAGE
    140						BCS	63$		;IF CS MO NOT IN SYSTEM
    141						MOWA$S			;WAIT FOR FORMATTING TO BE COMPLETED
    142						DECB	MOSTS		;I/O ERROR?
    143						BEQ	67$		;IF EQ NO
    144					63$:	CMPB	(R0)+,(R0)+	;POINT TO BYTE COUNT
    145						MOVB	#2,(R0)+	;SET BYTE COUNT TO 2
    146						TSTB	(R0)+		;ADJUST FIRST TEXT BYTE
    147						CLR	R4		;CLEAR HIGH PART OF DIVIDEND
    148						MOV	R0,-(SP)	;SAVE R0
    149						MOV	#10.,R0		;PREPARE TO DIVIDE BY 10.
    150						DIV	R0,R4		;CONVERT ERROR NUMBER
    151						MOV	(SP)+,R0	;RESTORE R0
    152						ADD	#'0,R4		;CONVERT HIGH DIGIT TO ASCII
    153						MOVB	R4,(R0)+	;INSERT DIGIT IN BUFFER
    154						ADD	#'0,R5		;CONVERT LOW DIGIT TO ASCII
    155						MOVB	R5,(R0)		;INSERT LOW DIGIT IN BUFFER
    156						SUB	#5,R0		;BACK UP RECORD COUNT ADDRESS
    157					67$:	MOVB	(R1)+,(R0)+	;INSERT REMAINDER OF PREFIX
    158						MOVB	(R1)+,(R0)+	;
    159						MOVB	(R0),R2		;PICK UP LENGTH OF RECORD
    160						MOVB	(R1)+,(R0)+	;
    161						MOVB	(R1),(R0)+	;INSERT LAST BYTE OF PREFIX
LBRERF	MACRO M1108  05-DEC-77 22:27  PAGE 2-3


    162						SUB	#$OUTBF,R0	;CALCULATE LENGTH OF PREFIX
    163						ADD	R0,R2		;ADD TO FORMATTED RECORD LENGTH
    164						MOV	R3,R4		;RESTORE SEVERITY INTO R4
    165
    166						.IFF
    167
    168	000060	112120 				MOVB	(R1)+,(R0)+	;MOVE REMAINDER OF ...
    169	000062	112120 				MOVB	(R1)+,(R0)+	;... PREFIX STRING ...
    170	000064	112120 				MOVB	(R1)+,(R0)+	;... INTO THE MESSAGE ...
    171	000066	111120 				MOVB	(R1),(R0)+	;... BUFFER
    172	000070	006305 				ASL	R5		;CONVERT ERROR NUMBER INTO AN OFFSET
    173	000072	016501 	000000G			MOV	$MGLST(R5),R1	;POINT R1 TO ERROR MESSAGE FORMAT STRING
    174	000076					CALL	$EDMSG		;GENERATE THE ERROR MESSAGE
    175	000102	010002 				MOV	R0,R2		;PUT ADDR OF END OF MESSAGE IN R2
    176	000104	162702 	000000G			SUB	#$OUTBF,R2	;CALCULATE LENGTH OF ERROR MESSAGE STRING
    177
    178
    179						.ENDC
    180
    181
    182	000110					RETURN
    183
    184
    185
    186		000001 				.END
LBRERF	MACRO M1108  05-DEC-77 22:27  PAGE 2-4
SYMBOL TABLE

DIAG    000000R     002	FD.TTY= 000004   	F.EOBB= 000032   	F.UNIT= 000136   	Q$$CMO= 000000
FATAL   000021R     002	FD.WBH= 000002   	F.ERR = 000052   	F.URBD= 000020   	R$$11M= 000000
FA.APD= 000100   	FO.APD= 000106   	F.FACC= 000043   	F.VBN = 000064   	R.FIX = 000001
FA.CRE= 000010   	FO.MFY= 000002   	F.FFBY= 000014   	F.VBSZ= 000060   	R.VAR = 000002
FA.EXT= 000004   	FO.RD = 000001   	F.FNAM= 000110   	NB.DEV= 000200   	S$V2  = ****** GX
FA.NSP= 000100   	FO.UPD= 000006   	F.FNB = 000102   	NB.DIR= 000100   	S$$LIB= 000000
FA.RD = 000001   	FO.WRT= 000016   	F.FTYP= 000116   	NB.NAM= 000004   	S.FATT= 000016
FA.SHR= 000040   	F.ALOC= 000040   	F.FVER= 000120   	NB.SD1= 000400   	S.FDB = 000140
FA.TMP= 000020   	F.BBFS= 000062   	F.HIBK= 000004   	NB.SD2= 001000   	S.FNAM= 000006
FA.WRT= 000002   	F.BDB = 000070   	F.LUN = 000042   	NB.SNM= 000040   	S.FNB = 000036
FD.BLK= 000010   	F.BGBC= 000057   	F.MBCT= 000054   	NB.STP= 000020   	S.FNBW= 000017
FD.CCL= 000002   	F.BKDN= 000026   	F.MBC1= 000055   	NB.SVR= 000010   	S.FNTY= 000004
FD.CR = 000002   	F.BKDS= 000020   	F.MBFG= 000056   	NB.TYP= 000002   	S.FTYP= 000002
FD.DIR= 000010   	F.BKEF= 000050   	F.NRBD= 000024   	NB.VER= 000001   	S.NFEN= 000020
FD.FTN= 000001   	F.BKP1= 000051   	F.NREC= 000030   	N.DID = 000024   	$CMIPT= ****** GX
FD.INS= 000010   	F.BKST= 000024   	F.OVBS= 000030   	N.DVNM= 000032   	$EDMSG= ****** GX
FD.PLC= 000004   	F.BKVB= 000064   	F.RACC= 000016   	N.FID = 000000   	$FMTER  000000RG
FD.RAH= 000001   	F.CNTG= 000034   	F.RATT= 000001   	N.FNAM= 000006   	$MGLST= ****** GX
FD.RAN= 000002   	F.DFNB= 000046   	F.RCNM= 000034   	N.FTYP= 000014   	$OUTBF= ****** GX
FD.REC= 000001   	F.DSPT= 000044   	F.RCTL= 000017   	N.FVER= 000016   	$$    = 000067
FD.RWM= 000001   	F.DVNM= 000134   	F.RSIZ= 000002   	N.NEXT= 000022   	...GBL= 000000
FD.SDI= 000020   	F.EFBK= 000010   	F.RTYP= 000000   	N.STAT= 000020   	...TPC= 000140
FD.SQD= 000040   	F.EFN = 000050   	F.STBK= 000036   	N.UNIT= 000034

. ABS.	000000	   000
      	000112	   001
TXT   	000043	   002
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  1887 WORDS  ( 8 PAGES)
DYNAMIC MEMORY:  3104 WORDS  ( 11 PAGES)
ELAPSED TIME:  00:00:13
[42,10]LBRERF,[42,20]LBRERF/-SP=[42,30]LBRPRF,LBRERF
LBRERO	MACRO M1108  05-DEC-77 22:27  PAGE 2


      1						.TITLE	LBRERO
      2						.IDENT	/X02.1/
      3
      4					;
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS 01754
      6					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS 01754
      7					; COPYRIGHT 1972, DIGITAL EQUIPMENT CORP., MAYNARD, MASS 01754
      8					;
      9					;	DEC ASSUMES NO RESPONSILILITY FOR THE
     10					;	USE OR RELIABILITY OF ITS SOFTWARE ON
     11					;	EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
     12					;
     13					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     14					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     15					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     16					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     17					;
     18					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     19					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     20					; EQUIPMENT CORPORATION.
     21					;
     22					; VERSION X02.1
     23					;
     24					;
     25					; WRITTEN BY:
     26					;	GEORGE W. BERRY
     27					;
     28					; MODIFIED BY:
     29					;	C.A. D'ELIA	16-JUN-74
     30					;	C.A. D'ELIA	02-JUL-74  (VIRTUAL TABLES)
     31					;	THOMAS J. MILLER 07-NOV-74
     32					;
     33					;
     34					; ERROR MESSAGE OUTPUT ROUTINE
     35					;
     36
     37					;
     38					; MACRO LIBRARY CALLS
     39					;
     40
     41						.MCALL	FDOFF$
     42	000000					FDOFF$	DEF$L
     43						.MCALL	FCSBT$
     44	000000					FCSBT$	DEF$L
     45
     46						.MCALL	CLOSE$,RCML$
     47
     48
     49
     50						.IF NDF	Q$$CMO
     51
     52
     53						.MCALL	PUT$
     54
     55						.IFF
     56
     57						.MCALL	FILIO$
LBRERO	MACRO M1108  05-DEC-77 22:27  PAGE 2-1


     58	000000					FILIO$
     59						.MCALL	DRERR$
     60	000000					DRERR$
     61						.MCALL	QIO$,WTSE$,DIR$,WSIG$S
     62
     63
     64						.ENDC
     65
     66
     67
     68
     69
     70						.IF DF	Q$$CMO
     71
     72
     73					;
     74					; DPB TO QUEUE I/O DIRECTLY TO COMMAND OUTPUT DEVICE
     75					;
     76
     77	000000				CMODPB:	QIO$	IO.WVB,$CMOLN,$QIOEF,,,,<,,0,,,> ;QUEUE I/O TO 'CMO'
     78
     79
     80						.ENDC
     81
     82
     83					;
     84					; OTHER I/O RELATED DPB'S
     85					;
     86
     87		000002 			$QIOEF==2			;QUEUE I/O EVENT FLAG
     88
     89	000030				ATTDET:	QIO$	IO.ATT,$CMOLN,$QIOEF  ;DPB USED TO ATTACH/DETACH TTY'S
     90
     91	000044				QIOWT:	WTSE$	$QIOEF		;WAIT FOR QUEUE I/O EVENT FLAG
     92
     93
     94
     95
     96
     97					;
     98					; LOCAL MESSAGE
     99					;
    100
    101	000000					.PSECT	TXT
    102
    103	000000	   015 	   012 	   114 	ABTMSG:	.ASCII	<15><12>/LBR -- *FATAL*- RUN ABORTED/  ;ABORT MESSAGE
	000003	   102 	   122 	   040
	000006	   055 	   055 	   040
	000011	   052 	   106 	   101
	000014	   124 	   101 	   114
	000017	   052 	   055 	   040
	000022	   122 	   125 	   116
	000025	   040 	   101 	   102
	000030	   117 	   122 	   124
	000033	   105 	   104
    104		000035 			ABTLEN = .-ABTMSG
    105
LBRERO	MACRO M1108  05-DEC-77 22:27  PAGE 2-2


    106
    107	000050					.PSECT
    108
    109
    110	000050				$EROUT::
    111
    112
    113						.IF NDF	Q$$CMO
    114
    115
    116						PUT$	$CMOPT,#$OUTBF,R2 ;OUTPUT MESSAGE
    117
    118						.IFF
    119
    120	000050	012700 	000000G			MOV	#$OUTBF,R0	;SPECIFY BUFFER ADDRESS IN R0
    121	000054	010201 				MOV	R2,R1		;SPECIFY BYTE COUNT IN R1
    122	000056					CALL	$QIOMG		;SEND TO COMMAND OUTPUT (VIA QIO)
    123
    124
    125						.ENDC
    126
    127
    128	000062	103404 				BCS	75$		;FATAL IF MESSAGE SEND FAILED
    129	000064	020427 	000000G			CMP	R4,#S$V2	;FATAL ERROR?
    130	000070	002001 				BGE	75$		;IF GE YES
    131	000072					RETURN			;
    132
    133	000074	105767 	000000G		75$:	TSTB	$ATTFG		;CHECK TTY ATTACHED FLAG
    134	000100	001402 				BEQ	76$		;SKIP IF NOT ATTACHED
    135	000102					CALL	$TTYDT		;ELSE, DETACH THE TELETYPE
    136	000106	016700 	000000G		76$:	MOV	$OPNFL,R0	;PNT R0 TO FDB OF (POSSIBLE) OPEN FILE
    137	000112	001402 				BEQ	77$		;IF NULL, THEN NONE OPEN
    138	000114					CLOSE$	R0		;ELSE, CLOSE FILE
    139	000120	016700 	000000G		77$:	MOV	$LBRPT,R0	;POINT R0 TO LIBRARY FDB
    140	000124	112760 	000001 	000000 		MOVB	#R.FIX,F.RTYP(R0) ;SET FIXED LENGTH RECORDS ATTRIBUTE
    141	000132					CLOSE$	R0		;CLOSE LIBRARY FILE
    142	000136					CLOSE$	$WRKPT		;CLOSE WORK FILE
    143	000146					RCML$	$CMIPT		;RESET TO ZERO LEVEL
    144	000156	000167 	000000G			JMP	$RSTRT		;GET NEXT COMMAND LINE
    145
    146						.IF DF Q$$CMO
    147
    148	000162	012702 	000000'		$QIOMG::MOV	#CMODPB,R2	;PUT DPB ADDRESS IN R2
    149	000166	010062 	000014 			MOV	R0,Q.IOPL(R2)	;SET BUFFER ADDRESS
    150	000172	010162 	000016 			MOV	R1,Q.IOPL+2(R2)	;SET BYTE COUNT
    151
    152
    153						.ENDC			; (Q$$CMO)
    154
    155
    156	000176				$QIO::	DIR$	R2		;INVOKE QUEUE I/O DIRECTIVE
    157	000202	103010 				BCC	10$		;SKIP ON SUCCESS
    158	000204	023727 	000000G	177777 		CMP	@#$DSW,#IE.UPN	;FAIL -- WAS DYNAMIC MEMORY UNAVAILABLE?
    159	000212	001007 				BNE	20$		;ERROR IF SOMETHING ELSE
    160	000214					WSIG$S			;ELSE, WAIT FOR MEMORY TO BECOME FREE
    161	000222	000765 				BR	$QIO		;AND TRY IT AGAIN
    162	000224				10$:	DIR$	#QIOWT		;WAIT FOR I/O DONE
LBRERO	MACRO M1108  05-DEC-77 22:27  PAGE 2-3


    163	000232	006137 	000000G		20$:	ROL	@#$DSW		;USE DIRECTIVE STATUS TO SET C-BIT
    164	000236					RETURN			;AND RETURN
    165
    166
    167						.ENABL	LSB
    168
    169	000240	110067 	000001G		$TTYAT::MOVB	R0,$ATTFG+1	;SAVE TELETYPE LUN
    170	000244	105267 	000000G			INCB	$ATTFG		;SET TTY ATTACHED FLAG
    171	000250	012767 	001400 	177554 		MOV	#IO.ATT,ATTDET+Q.IOFN  ;SPECIFY ATTACH FUNCTION
    172	000256	000405 				BR	10$		;BRANCH INTO COMMON CODE
    173
    174	000260	105067 	000000G		$TTYDT::CLRB	$ATTFG		;CLEAR TTY ATTACHED FLAG
    175	000264	012767 	002000 	177540 		MOV	#IO.DET,ATTDET+Q.IOFN  ;SPECIFY DETACH FUNCTION
    176	000272	012702 	000030'		10$:	MOV	#ATTDET,R2	;PUT DPB ADDRESS IN R2
    177	000276	116762 	000001G	000004 		MOVB	$ATTFG+1,Q.IOLU(R2)  ;SPECIFY TTY LUN IN DPB
    178	000304	000734 				BR	$QIO		;QUEUE THE I/O REQUEST AND RETURN
    179
    180						.DSABL	LSB
    181
    182
    183
    184
    185		000001 				.END
LBRERO	MACRO M1108  05-DEC-77 22:27  PAGE 2-4
SYMBOL TABLE

ABTLEN= 000035   	F.BKEF= 000050   	IE.ADP= 177636   	IO.UNL= 000042   	R$$11M= 000000
ABTMSG  000000R     002	F.BKP1= 000051   	IE.AST= 177660   	IO.WAT= 013400   	R.FIX = 000001
ATTDET  000030R  	F.BKST= 000024   	IE.CKP= 177766   	IO.WLB= 000400   	R.VAR = 000002
CMODPB  000000R  	F.BKVB= 000064   	IE.HWR= 177772   	IO.WVB= 011000   	S$V2  = ****** GX
FA.APD= 000100   	F.CNTG= 000034   	IE.IDU= 177644   	IQ.Q  = 000002   	S$$LIB= 000000
FA.CRE= 000010   	F.DFNB= 000046   	IE.IEF= 177637   	IQ.X  = 000001   	S.FATT= 000016
FA.EXT= 000004   	F.DSPT= 000044   	IE.ILU= 177640   	IS.CLR= 000000   	S.FDB = 000140
FA.NSP= 000100   	F.DVNM= 000134   	IE.INS= 177776   	IS.SET= 000002   	S.FNAM= 000006
FA.RD = 000001   	F.EFBK= 000010   	IE.IPR= 177641   	NB.DEV= 000200   	S.FNB = 000036
FA.SHR= 000040   	F.EFN = 000050   	IE.ITI= 177643   	NB.DIR= 000100   	S.FNBW= 000017
FA.TMP= 000020   	F.EOBB= 000032   	IE.ITS= 177770   	NB.NAM= 000004   	S.FNTY= 000004
FA.WRT= 000002   	F.ERR = 000052   	IE.LNL= 177646   	NB.SD1= 000400   	S.FTYP= 000002
FD.BLK= 000010   	F.FACC= 000043   	IE.SDP= 177635   	NB.SD2= 001000   	S.NFEN= 000020
FD.CCL= 000002   	F.FFBY= 000014   	IE.ULN= 177773   	NB.SNM= 000040   	W.TSEF= 000002
FD.CR = 000002   	F.FNAM= 000110   	IE.UPN= 177777   	NB.STP= 000020   	$ATTFG= ****** GX
FD.DIR= 000010   	F.FNB = 000102   	IO.ACE= 007400   	NB.SVR= 000010   	$CMIPT= ****** GX
FD.FTN= 000001   	F.FTYP= 000116   	IO.ACR= 006400   	NB.TYP= 000002   	$CMOLN= ****** GX
FD.INS= 000010   	F.FVER= 000120   	IO.ACW= 007000   	NB.VER= 000001   	$DSW  = ****** GX
FD.PLC= 000004   	F.HIBK= 000004   	IO.APC= 014000   	N.DID = 000024   	$EROUT  000050RG
FD.RAH= 000001   	F.LUN = 000042   	IO.APV= 014010   	N.DVNM= 000032   	$LBRPT= ****** GX
FD.RAN= 000002   	F.MBCT= 000054   	IO.ATT= 001400   	N.FID = 000000   	$OPNFL= ****** GX
FD.REC= 000001   	F.MBC1= 000055   	IO.CLN= 003400   	N.FNAM= 000006   	$OUTBF= ****** GX
FD.RWM= 000001   	F.MBFG= 000056   	IO.CRE= 012000   	N.FTYP= 000014   	$QIO    000176RG
FD.SDI= 000020   	F.NRBD= 000024   	IO.DAC= 010000   	N.FVER= 000016   	$QIOEF= 000002 G
FD.SQD= 000040   	F.NREC= 000030   	IO.DEL= 012400   	N.NEXT= 000022   	$QIOMG  000162RG
FD.TTY= 000004   	F.OVBS= 000030   	IO.DET= 002000   	N.STAT= 000020   	$RSTRT= ****** GX
FD.WBH= 000002   	F.RACC= 000016   	IO.ENA= 006000   	N.UNIT= 000034   	$TTYAT  000240RG
FO.APD= 000106   	F.RATT= 000001   	IO.EXT= 011400   	PAR$$$= 000067   	$TTYDT  000260RG
FO.MFY= 000002   	F.RCNM= 000034   	IO.FNA= 004400   	QIOWT   000044R  	$WRKPT= ****** GX
FO.RD = 000001   	F.RCTL= 000017   	IO.KIL= 000012   	Q$$CMO= 000000   	$$    = 000067
FO.UPD= 000006   	F.RSIZ= 000002   	IO.LOV= 001010   	Q.IOAE= 000012   	$$MSG = 000000
FO.WRT= 000016   	F.RTYP= 000000   	IO.LTK= 000050   	Q.IOEF= 000006   	$$$ARG= 000006
F.ALOC= 000040   	F.STBK= 000036   	IO.RAT= 013000   	Q.IOFN= 000002   	$$$OST= 000004
F.BBFS= 000062   	F.UNIT= 000136   	IO.RDN= 000022   	Q.IOLU= 000004   	.CLOSE= ****** G
F.BDB = 000070   	F.URBD= 000020   	IO.RLB= 001000   	Q.IOPL= 000014   	.GCML2= ****** G
F.BGBC= 000057   	F.VBN = 000064   	IO.RNA= 005400   	Q.IOPR= 000007   	...GBL= 000000
F.BKDN= 000026   	F.VBSZ= 000060   	IO.RTK= 000060   	Q.IOSB= 000010   	...TPC= 000140
F.BKDS= 000020   	IE.ACT= 177771   	IO.RVB= 010400

. ABS.	000000	   000
      	000306	   001
TXT   	000035	   002
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  2810 WORDS  ( 11 PAGES)
DYNAMIC MEMORY:  3104 WORDS  ( 11 PAGES)
ELAPSED TIME:  00:00:29
[42,10]LBRERO,[42,20]LBRERO/-SP=[42,30]LBRPRF,LBRERO
LBRFI	MACRO M1108  05-DEC-77 22:28  PAGE 2


      1						.TITLE	LBRFI
      2						.IDENT	/03/
      3
      4					;
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      6					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      7					;
      8					;	DEC ASSUMES NO RESPONSIBLIITY FOR THE USE
      9					;	OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT
     10					;	WHICH IS NOT SUPPLIED BY DEC.
     11					;
     12					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     13					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     14					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     15					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     16					;
     17					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     18					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     19					; EQUIPMENT CORPORATION.
     20					;
     21					; VERSION 03
     22					;
     23					; WRITTEN BY:
     24					;	GEORGE W. BERRY
     25					;
     26					; MODIFIED BY:
     27					;	C.A. D'ELIA	08-MAY-74
     28					;	C.A. D'ELIA	29-JUN-74  (VIRTUAL TABLES)
     29					;
     30					;
     31
     32					;+
     33					; **-$FINDA-*- ALPHABETIC TABLE SEARCH
     34					;
     35					; THIS ROUTINE IS USED TO SEARCH EITHER THE EPT OR THE MNT TABLES.
     36					; IT PERFORMS AN ALPHABETICAL SEARCH, FAILING EITHER AT THE END
     37					; OF THE TABLE OR UPON ENCOUNTERING AN ITEM THAT IS GREATER THAN
     38					; THE ITEM FOR WHICH THE TABLE IS BEING SEARCHED.  AN ALTERNATE
     39					; ERROR CONDITION ARISES WHEN THE ITEM DOES NOT FIT INTO THE LEGAL
     40					; BOUNDS OF THE TABLE, IE. THE TABLE HAS NULL LENGTH OR THE ITEM
     41					; IS LARGER THAN THE MAXIMUM RADIX-50 VALUE.
     42					;
     43					; INPUTS:
     44					;
     45					; 	R0-R1 = THE SYMBOL TO BE MATCHED
     46					; 	R2 = ADDR OF TABLE DESCRIPTOR BLOCK
     47					;
     48					; OUTPUTS:
     49					;
     50					; 	C-BIT CLEAR (MATCH FOUND)
     51					;		R0 = ADDR OF MATCH
     52					;		R1 = VIRTUAL LOCN OF MATCH
     53					;
     54					;	- OR -
     55					;
     56					;	C-BIT SET & R2 ZERO (MATCH NOT FOUND)
     57					;		R0 = ADDR OF LINK TO SLOT
LBRFI	MACRO M1108  05-DEC-77 22:28  PAGE 2-1


     58					;		R1 = VIRTUAL LOCN OF LINK TO SLOT
     59					;
     60					;	- OR -
     61					;
     62					;	C-BIT SET & R2 NON-ZERO (NOT WITHIN TABLE BOUNDS)
     63					;
     64					;-
     65
     66	000000				$FINDA::SAVRG			;SAVE R3-R5
     67	000004	016267 	000002 	000000G		MOV	2(R2),$HDLST	;GET ADDR OF TABLE LIST HEADS
     68	000012	005003 				CLR	R3		;INITIAL OFFSET IS ZERO
     69	000014	012704 	000002G			MOV	#SR0+2,R4	;PREPARE TO SAVE SYMBOL TO BE MATCHED
     70	000020	010114 				MOV	R1,(R4)		;SAVE THE TWO-WORD SYMBOL ...
     71	000022	010044 				MOV	R0,-(R4)	;... WE'RE TRYING TO MATCH
     72	000024	010746 				MOV	PC,-(SP)	;SET STATUS TO BOUNDS ERROR FAILURE
     73	000026	005762 	000004 			TST	4(R2)		;CHECK THE TABLE LENGTH
     74	000032	001451 				BEQ	ERRXIT		;IF NULL, DECLARE TABLE BOUND ERROR
     75
     76	000034	021463 	000000G		10$:	CMP	(R4),$PARTD(R3)	;COMPARE SYMBOL WITH PARTN LIMIT
     77	000040	101406 				BLOS	20$		;BRANCH IF WE HAVE CORRECT PARTITION
     78	000042	062703 	000002 			ADD	#2,R3		;ELSE, UPDATE THE LIST OFFSET
     79	000046	020327 	000000C			CMP	R3,#<NU$PAR*2>-2  ;COMPARE OFFSET WITH MAXIMUM
     80	000052	003041 				BGT	ERRXIT		;TOO HIGH, DECLARE BOUND ERROR
     81	000054	000767 				BR	10$		;O.K., CHECK THIS PARTITION LIMIT
     82
     83	000056	016700 	000000G		20$:	MOV	$HDLST,R0	;PUT ADDR OF PARTITION LIST HEAD ...
     84	000062	060300 				ADD	R3,R0		;... IN R0
     85	000064	005001 				CLR	R1		;FORCE VIRTUAL LOCN ZERO FOR A LIST HEAD
     86	000066	005710 			30$:	TST	(R0)		;ARE WE AT THE END OF THE LINKED LIST?
     87	000070	001431 				BEQ	MATERR		;NULL POINTER INDICATES YES--MATCH ERROR
     88	000072	010016 				MOV	R0,(SP)		;SAVE LINK ADDR ON STACK TOP
     89	000074	010105 				MOV	R1,R5		;SAVE LINK VIRTUAL LOCN IN R5
     90	000076	001402 				BEQ	31$		;BRANCH IF LINK IS LIST HEAD
     91	000100					CALL	$LCKPG		;ELSE, LOCK PAGE CONTAINING LINK
     92	000104	011001 			31$:	MOV	(R0),R1		;PUT VIRTUAL LOCN OF NEXT LINK IN R1
     93	000106					CALL	$CVRL		;OBTAIN ITS REAL MEMORY ADDR IN R0
     94	000112	010501 				MOV	R5,R1		;PUT VIRTUAL LOCN OF LAST LINK IN R1
     95	000114	001402 				BEQ	32$		;BRANCH IF IT WAS A LIST HEAD
     96	000116					CALL	$UNLPG		;ELSE, UNLOCK PAGE CONTAINING LAST LINK
     97	000122	017601 	000000 		32$:	MOV	@(SP),R1	;RESTORE VIRTUAL LOCN OF NEXT ELEMENT
     98	000126	021460 	000002 			CMP	(R4),2(R0)	;COMPARE SYMBOL & ENTRY FIRST HALF
     99	000132	101355 				BHI	30$		;TOO HIGH, BRANCH TO LOOK FURTHER IN LIST
    100	000134	103405 				BLO	SLOT		;NO MATCH--WE'VE FOUND THE PROPER SLOT
    101	000136	026460 	000002 	000004 		CMP	2(R4),4(R0)	;ELSE, COMPARE SYMBOL & ENTRY LAST HALF
    102	000144	101350 				BHI	30$		;TOO HIGH, BRANCH TO LOOK FURTHER IN LIST
    103	000146	001404 				BEQ	EXIT		;MATCH--LEAVE WITH C-BIT CLEAR
    104
    105	000150	011600 			SLOT:	MOV	(SP),R0		;PUT ADDR OF LINK TO SLOT IN R0, AND ...
    106	000152	010501 				MOV	R5,R1		;... AND ITS VIRTUAL LOCN IN R1
    107	000154	005016 			MATERR:	CLR	(SP)		;SET STATUS TO NO MATCH FOUND
    108	000156	000261 			ERRXIT:	SEC			;SET C-BIT TO INDICATE A FAILURE
    109	000160	012602 			EXIT:	MOV	(SP)+,R2	;SET SUPPLEMENTAL FAIL STATUS IN R2
    110	000162					RETURN			;NOTE: IF C-BIT IS SET, CALLER MUST ...
    111									;... ALSO CHECK R2 TO DETERMINE ERROR
    112					;+
    113					; **-$FINDC-*- CONTINUOUS ASSOCIATIVE SEARCH
    114					; **-$FINDN-*- RE-ENTRY FOR CONTINUOUS ASSOCIATIVE SEARCH
LBRFI	MACRO M1108  05-DEC-77 22:28  PAGE 2-2


    115					;
    116					; THIS ROUTINE PERFORMS A SEARCH OF EITHER THE EPT OR MNT TABLES.
    117					; A MATCH MUST BE MADE ON THE DATA FIELDS OF THE TABLE ENTRIES.
    118					; THE CALLER MUST INITIALLY ENTER AT '$FINDC'.  IF THAT SUCCEEDS,
    119					; REQUESTS TO FIND THE NEXT MATCH MUST BE 6DE TO '$FINDN'.  THE
    120					; FAILURE CONDITION ARISES WHEN A MATCH IS NOT FOUND BETWEEN THE
    121					; CURRENT POSITION IN THE TABLE AND THE END OF THE TABLE.
    122					;
    123					; INPUTS: (FOR '$FINDC' ONLY)
    124					;
    125					;	R0-R1 = THE DATA TO BE MATCHED
    126					;	R2 = ADDR OF TABLE DESCRIPTOR BLOCK
    127					;
    128					; OUTPUTS: (FOR BOTH)
    129					;
    130					;	C-BIT CLEAR (MATCH FOUND)
    131					;		R0 = ADDR OF MATCH
    132					;		R1 = VIRTUAL LOCN OF MATCH
    133					;
    134					;	- OR -
    135					;
    136					;	C-BIT SET (MATCH NOT FOUND)
    137					;
    138					;-
    139
    140						.ENABL	LSB
    141
    142	000164				$FINDC::SAVRG			;SAVE R3-R5
    143	000170	010004 				MOV	R0,R4		;COPY DATA TO BE MATCHED INTO ...
    144	000172	010105 				MOV	R1,R5		;... R4-R5
    145	000174	016200 	000002 			MOV	2(R2),R0	;PUT ADDR OF FIRST LIST HEAD IN R0
    146	000200	010067 	000000G			MOV	R0,$HDLST	;AND SAVE THE ADDR
    147	000204	005003 				CLR	R3		;INITIAL OFFSET INTO LIST IS ZERO
    148
    149	000206				10$:	CALL	ASCSCH		;PERFORM THE ASSOCIATIVE SEARCH
    150	000212	103407 				BCS	20$		;LEAVE IF MATCH NOT FOUND
    151	000214	012702 	000000G			MOV	#SR0,R2		;GET ADDR OF REGISTER SAVE AREA
    152	000220	010022 				MOV	R0,(R2)+	;SAVE REGISTERS NECESSARY ...
    153	000222	010122 				MOV	R1,(R2)+	;... TO CONTINUE THE SEARCH
    154	000224	010322 				MOV	R3,(R2)+	;
    155	000226	010422 				MOV	R4,(R2)+	;
    156	000230	010522 				MOV	R5,(R2)+	;
    157	000232				20$:	RETURN
    158
    159
    160	000234				$FINDN::SAVRG			;SAVE R3-R5
    161	000240	012702 	000000G			MOV	#SR0,R2		;GET ADDR OF REGISTER SAVE AREA
    162	000244	012200 				MOV	(R2)+,R0	;RESTORE REGISTERS NECESSARY ...
    163	000246	012201 				MOV	(R2)+,R1	;... TO CONTINUE THE SEARCH
    164	000250	012203 				MOV	(R2)+,R3	;
    165	000252	012204 				MOV	(R2)+,R4	;
    166	000254	012205 				MOV	(R2)+,R5	;
    167	000256	000753 				BR	10$		;BRANCH INTO COMMON SEARCH CODE
    168
    169						.DSABL	LSB
    170
    171
LBRFI	MACRO M1108  05-DEC-77 22:28  PAGE 2-3


    172	000260	011001 			ASCSCH:	MOV	(R0),R1		;GET VIRTUAL LOCN OF NEXT ENTRY
    173	000262	001011 				BNE	10$		;BRANCH IF LINK IS NOT NULL
    174	000264	062703 	000002 			ADD	#2,R3		;ELSE, UPDATE THE LIST HEAD OFFSET
    175	000270	020327 	000000C			CMP	R3,#<NU$PAR*2>-2  ;COMPARE WITH MAXIMUM
    176	000274	003015 				BGT	20$		;ERROR-- END OF TABLE FOUND
    177	000276	016700 	000000G			MOV	$HDLST,R0	;POINT R0 TO NEXT LIST HEAD
    178	000302	060300 				ADD	R3,R0		;
    179	000304	000765 				BR	ASCSCH		;SEARCH THE NEXT PARTITION
    180	000306				10$:	CALL	$CVRL		;OBTAIN REAL ADDR OF ENTRY IN R0
    181	000312	020460 	000006 			CMP	R4,6(R0)	;TRY TO MATCH FIRST WORDS OF DATA
    182	000316	001360 				BNE	ASCSCH		;LOOK FURTHER IN LIST
    183	000320	020560 	000010 			CMP	R5,8.(R0)	;TRY TO MATCH LAST WORDS OF DATA
    184	000324	001355 				BNE	ASCSCH		;LOOK FURTHER IN LIST
    185	000326	000401 				BR	25$		;MATCH--C-BIT IS CLEAR
    186
    187	000330	000261 			20$:	SEC			;FAILURE, SET C-BIT
    188	000332				25$:	RETURN
    189
    190
    191		000001 				.END
LBRFI	MACRO M1108  05-DEC-77 22:28  PAGE 2-4
SYMBOL TABLE

ASCSCH  000260R  	NU$PAR= ****** GX	SR0   = ****** GX	$FINDC  000164RG 	$PARTD= ****** GX
ERRXIT  000156R  	Q$$CMO= 000000   	S$$LIB= 000000   	$FINDN  000234RG 	$SAVRG= ****** GX
EXIT    000160R  	R$$11M= 000000   	$CVRL = ****** GX	$HDLST= ****** GX	$UNLPG= ****** GX
MATERR  000154R  	SLOT    000150R  	$FINDA  000000RG 	$LCKPG= ****** GX	$$    = 000067

. ABS.	000000	   000
      	000334	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  602 WORDS  ( 3 PAGES)
DYNAMIC MEMORY:  3104 WORDS  ( 11 PAGES)
ELAPSED TIME:  00:00:08
[42,10]LBRFI,[42,20]LBRFI/-SP=[42,30]LBRPRF,LBRFI
LBRFLA	MACRO M1108  05-DEC-77 22:28  PAGE 2


      1						.TITLE	LBRFLA
      2						.IDENT	/X02.1/
      3
      4					;
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      6					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      7					;
      8					;	DEC ASSUMES NO RESPONSIBLIITY FOR THE USE
      9					;	OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT
     10					;	WHICH IS NOT SUPPLIED BY DEC.
     11					;
     12					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     13					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     14					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     15					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     16					;
     17					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     18					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     19					; EQUIPMENT CORPORATION.
     20					;
     21					; VERSION X02.1
     22					;
     23					; WRITTEN BY:
     24					;	GEORGE W. BERRY
     25					;
     26					; MODIFIED BY:
     27					;	C.A. D'ELIA	24-JUN-74
     28					;	THOMAS J. MILLER 07-NOV-74
     29					;
     30					;
     31
     32					;
     33					; MACRO CALLS
     34					;
     35
     36						.MCALL	FDOFF$
     37	000000					FDOFF$	DEF$L
     38
     39
     40					;+
     41					;
     42					; **-$FIXLA-RECOMPUTE L$LA
     43					;
     44					; THIS ROUTINE IS CALLED TO RECOMPUTE THE AVAILABLE FREE SPACE
     45					; IN THE LIBRARY.  THE VALUE (IN BYTES) IS STORED IN THE HEADER
     46					; AT LOCATIONS L$LA AND L$LA+2.
     47					;
     48					;-
     49	000000				$FIXLA::SAVRG			;SAVE R3-R5
     50	000004	016700 	000000G			MOV	$LBRPT,R0	;POINT TO LBR FDB
     51	000010	016005 	000006 			MOV	F.HIBK+2(R0),R5	;GET FILE SIZE IN BLOCKS
     52	000014	166705 	000000G			SUB	L$NX,R5		;GET FREE BLOCKS
     53	000020	005205 				INC	R5		;FUDGE FOR LAST BLOCK
     54
     55
     56						.IF DF	R$$EIS
     57
LBRFLA	MACRO M1108  05-DEC-77 22:28  PAGE 2-1


     58
     59						CLR	R4		;CLEAR HIGH ORDER
     60						ASHC	#9.,R4		;CONVERT TO BYTES
     61
     62						.IFF
     63
     64	000022	000305 				SWAB	R5		;PERFORM SHIFT BY EIGHT BITS
     65	000024	010504 				MOV	R5,R4		;COPY INTO R4 FOR COMBINED SHIFT
     66	000026	105005 				CLRB	R5		;CLEAR LOW HALF OF R5
     67	000030	040504 				BIC	R5,R4		;CLEAR HIGH HALF OF R4
     68	000032	006305 				ASL	R5		;PERFORM NINTH SHIFT
     69	000034	006104 				ROL	R4		;AND MAKE IT COMBINED RESULT
     70
     71
     72						.ENDC
     73
     74
     75	000036	166705 	000002G			SUB	L$NX+2,R5	;COMPUTE FREE BYTES IN LAST BLOCK
     76	000042	005604 				SBC	R4
     77	000044	010467 	000000G			MOV	R4,L$LA		;AND STORE VALUE
     78	000050	010567 	000002G			MOV	R5,L$LA+2	;DOUBLE PRECISION
     79	000054					RETURN
     80
     81		000001 				.END
LBRFLA	MACRO M1108  05-DEC-77 22:28  PAGE 2-2
SYMBOL TABLE

F.ALOC= 000040   	F.EFBK= 000010   	F.MBFG= 000056   	F.VBSZ= 000060   	S$$LIB= 000000
F.BBFS= 000062   	F.EFN = 000050   	F.NRBD= 000024   	L$LA  = ****** GX	S.FATT= 000016
F.BDB = 000070   	F.EOBB= 000032   	F.NREC= 000030   	L$NX  = ****** GX	S.FDB = 000140
F.BGBC= 000057   	F.ERR = 000052   	F.OVBS= 000030   	N.DID = 000024   	S.FNAM= 000006
F.BKDN= 000026   	F.FACC= 000043   	F.RACC= 000016   	N.DVNM= 000032   	S.FNB = 000036
F.BKDS= 000020   	F.FFBY= 000014   	F.RATT= 000001   	N.FID = 000000   	S.FNBW= 000017
F.BKEF= 000050   	F.FNAM= 000110   	F.RCNM= 000034   	N.FNAM= 000006   	S.FNTY= 000004
F.BKP1= 000051   	F.FNB = 000102   	F.RCTL= 000017   	N.FTYP= 000014   	S.FTYP= 000002
F.BKST= 000024   	F.FTYP= 000116   	F.RSIZ= 000002   	N.FVER= 000016   	S.NFEN= 000020
F.BKVB= 000064   	F.FVER= 000120   	F.RTYP= 000000   	N.NEXT= 000022   	$FIXLA  000000RG
F.CNTG= 000034   	F.HIBK= 000004   	F.STBK= 000036   	N.STAT= 000020   	$LBRPT= ****** GX
F.DFNB= 000046   	F.LUN = 000042   	F.UNIT= 000136   	N.UNIT= 000034   	$SAVRG= ****** GX
F.DSPT= 000044   	F.MBCT= 000054   	F.URBD= 000020   	Q$$CMO= 000000   	...TPC= 000140
F.DVNM= 000134   	F.MBC1= 000055   	F.VBN = 000064   	R$$11M= 000000

. ABS.	000000	   000
      	000056	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  1551 WORDS  ( 7 PAGES)
DYNAMIC MEMORY:  3104 WORDS  ( 11 PAGES)
ELAPSED TIME:  00:00:09
[42,10]LBRFLA,[42,20]LBRFLA/-SP=[42,30]LBRPRF,LBRFLA
LBRIN	MACRO M1108  05-DEC-77 22:28  PAGE 2


      1						.TITLE	LBRIN
      2						.IDENT	/X03.3/
      3
      4					;
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  07754
      6					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      7					;
      8					;	DEC ASSUMES NO RESPONSIBLIITY FOR THE USE
      9					;	OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT
     10					;	WHICH IS NOT SUPPLIED BY DEC.
     11					;
     12					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     13					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     14					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     15					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     16					;
     17					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     18					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     19					; EQUIPMENT CORPORATION.
     20					;
     21					; VERSION X03.3
     22					;
     23					; WRITTEN BY:
     24					;	GEORGE W. BERRY
     25					;
     26					; MODIFIED BY:
     27					;	C.A. D'ELIA	10-JUN-74
     28					;	C.A. D'ELIA	02-JUL-74  (VIRTUAL TABLES)
     29					;	THOMAS J. MILLER 29-OCT-74
     30					;
     31					;
     32
     33					;
     34					; MACRO CALLS
     35					;
     36
     37						.MCALL	IOERR$
     38	000000					IOERR$
     39						.MCALL	FDOFF$
     40	000000					FDOFF$	DEF$L
     41						.MCALL	CSI$
     42	000000					CSI$
     43						.MCALL	FCSBT$
     44	000000					FCSBT$
     45
     46						.MCALL	CLOSE$,GTIM$S,PUT$
     47
     48
     49						.IF NDF	S$$LIB
     50
     51
     52						.MCALL	GET$,OPEN$R
     53
     54						.IFF
     55
     56						.MCALL	GET$S
     57
LBRIN	MACRO M1108  05-DEC-77 22:28  PAGE 2-1


     58
     59						.ENDC
     60
     61
     62					;
     63					; LOCAL DATA
     64					;
     65
     66	000000				MHSZ:	.BLKW	1		;ACTUAL MODULE HEADER SIZE
     67	000002				DATE:	.BLKW	8.		;DATE + TIME VALUE FROM
     68	000022				XXX:	.BLKW	3
     69		000022'			ID	=XXX			;MODULE .IDENT
     70		000026'			ENDFLG	=XXX+4			;END FLG
     71	000030				MDEPTH:	.BLKW	1		;MACRO DEFINITION DEPTH COUNTER
     72	000032				MACNAM:	.BLKW	3		;MACRO NAME BUFFER
     73	000040	000000 				.WORD	0		;NON-RAD50 CHARACTER STOPPER
     74									;   0=READING MODULE
     75									;   1=EOF EXPECTED
     76
     77	000000					.PSECT	PUTCOM,D
     78
     79	000000				RPBLK:	.BLKW	4		;MODULE REPLACE INFO BLOCK -- CLEARED
     80									;... INITIALLY & FILLED IN AS FOLLOWS:
     81		000000'			RPMNT==RPBLK			;  RPMNT-NAME OF MNT REPLACED
     82		000004'			RPMHD==RPBLK+4			;  RPMHD-ADDR (VBN) OF MODULE REPLACED
     83
     84
     85	000010				LASTEP::.BLKW	2		;LAST EPT ENTRY REPLACED ...
     86									;... IN CASE OF REPLACE ERROR
     87
     88	000042					.PSECT
     89
     90					;
     91					; REPLACE MESSAGE
     92					;
     93
     94						.NLIST	BEX
     95	000042	   015 	   012 	   115 	RPM:	.ASCIZ	<15><12>/MODULE "%2R" REPLACED/<15><12>
     96					;
     97					; KEY WORD STRINGS
     98					;
     99	000074	   115 	   101 	   103 	MACSTR:	.ASCIZ	/MACRO/
    100	000102	   122 	   105 	   120 	REPSTR:	.ASCIZ	/REPT/
    101	000107	   111 	   122 	   120 	IRCSTR:	.ASCIZ	/IRPC/
    102	000114	   111 	   122 	   120 	IRSTR:	.ASCIZ	/IRP/
    103	000120	   105 	   116 	   104 	ENMSTR:	.ASCIZ	/ENDM/
    104	000125	   105 	   116 	   104 	ENRSTR:	.ASCIZ	/ENDR/
    105						.EVEN
    106						.LIST	BEX
    107
    108
    109					;
    110					; TABLE OF TYPE DEPENDENT CO-ROUTINES (INDEXED BY TYPE)
    111					;
    112
    113	000132				INSUB:
    114	000132	001072'				.WORD	INOBJ		;OBJ TYPE - INSERT OBJ MODULES
LBRIN	MACRO M1108  05-DEC-77 22:28  PAGE 2-2


    115	000134	057032 				.RAD50	/OBJ/		;DEFAULT EXTENSION IS OBJ
    116	000136	001260'				.WORD	INMAC		;MAC TYPE - INSERT MAC MODULES
    117	000140	050553 				.RAD50	/MAC/		;DEFAULT EXTENSION IS MAC
    118
    119
    120					;+
    121					; **-$INS-INSERT FUNCTION
    122					;
    123					; THIS ROUTINE PERFORMS AN INSERT OF SPECIFIED
    124					; INPUT MODULES (WHERE THE SPECIFICATION IS
    125					; TAKEN FROM THE COMMAND INPUT DEVICE) INTO THE
    126					; LIBRARY.  THE MNT AND EPT ARE UPDATED.
    127					;
    128					; INPUTS:
    129					;
    130					;	NONE
    131					;
    132					; OUTPUTS:
    133					;
    134					;	NONE
    135					;
    136					;-
    137	000142				$INS::	SAVRG			;SAVE R3-R5
    138	000146	016700 	000000G			MOV	$INPPT,R0	;POINT TO INPUT FDB
    139	000152	012760 	000004 	000016 		MOV	#FD.PLC,F.RACC(R0) ;SET TO PARTIAL LOCATE MODE
    140	000160	004567 	000000G		IN10:	JSR	R5,$CLEAR	;CLEAR TEMP AREA
    141	000164	000022'				.WORD	XXX
    142	000166	000004 				.WORD	4
    143
    144
    145						.IF NDF	Q$$CMO
    146
    147
    148						MOV	$CMOPT,R0	;OUTPUT ON CMO DEVICE (LUN-2)
    149
    150						.IFF
    151
    152	000170	005000 				CLR	R0		;OUTPUT TO CMO VIA QUEUE I/O
    153
    154
    155						.ENDC
    156
    157
    158	000172					CALL	$OUT		;INIT MESSAGE OUTPUT ROUTINE
    159	000176	016700 	000000G			MOV	$INPPT,R0	;GET INPUT FILE CONTROL BLOCK ADDRESS
    160	000202	016760 	000000G	000000G		MOV	$SWTCH,R$SWTH(R0) ;SET UP /RP BIT
    161	000210	012701 	000000G			MOV	#$CSIBK,R1	;GET CSI BLOCK ADDRESS
    162	000214					CALL	$SCANI		;SCAN FOR AN INPUT FILE
    163	000220	103004 				BCC	5$		;BRANCH IF FILE SPEC ENCOUNTERED
    164
    165	000222	005067 	000000G			CLR	$OPNFL		;INDICATE LIBRARY IS ONLY OPEN FILE
    166	000226					CALLR	$WTHD		;REWRITE MODIFIED HEADER
    167									;AND RETURN THROUGH  $WTHD***
    168
    169	000232	012701 	000006 		5$:	MOV	#FO.UPD,R1	;SPECIFY OPEN FOR UPDATE
    170	000236					CALL	$RDHD		;READ HEADER, EPT AND MNT
    171	000242	116701 	000000G			MOVB	L$TYP,R1	;GET FILE TYPE
LBRIN	MACRO M1108  05-DEC-77 22:28  PAGE 2-3


    172	000246	006301 				ASL	R1		;CONVERT IT TO A TABLE OFFSET
    173	000250	006301 				ASL	R1
    174	000252	016167 	000134'	000014G		MOV	INSUB+2(R1),INPNAM+N.FTYP ;MOVE DEFAULT EXT TO NMBLK
    175	000260					CALL	@INSUB(R1)	;INIT INSERT TYPE-DEPENDENT CO-ROUTINE
    176	000264	016700 	000000G			MOV	$INPPT,R0
    177	000270	010067 	000000G			MOV	R0,$OPNFL	;INDICATE OPEN FILE ON 'INPPT'
    178
    179
    180						.IF NDF	S$$LIB
    181
    182
    183						OPEN$R	R0
    184
    185						.IFF
    186
    187	000274	012701 	000001 			MOV	#FO.RD,R1	;SPECIFY OPEN FOR READ
    188	000300					CALL	$OPEN		;PARSE FILENAME AND OPEN FILE
    189
    190
    191						.ENDC
    192
    193
    194	000304	103006 				BCC	IN20		;BRANCH IF OK
    195	000306	012701 				MOV	(PC)+,R1
    196	000310	   000G	   000G			.BYTE	E$R11,S$V2	;CAN'T OPEN FILE
    197	000312	016002 	000000G		ERROR:	MOV	R$NAME(R0),R2
    198	000316	000167 	000000G		ERRXIT:	JMP	$ERMSG		;FATAL ERROR EXIT.
    199
    200
    201	000322	012701 	000000'		IN20:	MOV	#RPBLK,R1	;CLEAR REPLACE BLOCK
    202	000326	005021 				CLR	(R1)+		;
    203	000330	005021 				CLR	(R1)+
    204	000332	005021 				CLR	(R1)+
    205	000334	005011 				CLR	(R1)
    206	000336	032760 	000000G	000000G		BIT	#RP$SW,R$SWTH(R0) ;/RP INDICATED
    207	000344	001401 				BEQ	1$		;BRANCH IF NOT
    208	000346	005241 				INC	-(R1)		;PERMIT /RP
    209	000350	016700 	000000G		1$:	MOV	$LBRPT,R0	;GET LIBRARY FDB
    210	000354	112760 	000002 	000000 		MOVB	#R.VAR,F.RTYP(R0) ;CHANGE LBR TO VARIABLE LENGTH RECORDS
    211	000362	005001 				CLR	R1		;HIGH ORDER VIRTUAL BLOCK
    212	000364	016702 	000000G			MOV	L$NX,R2		;LOW ORDER VIRTUAL BLOCK
    213	000370	016703 	000002G			MOV	L$NX+2,R3	;BYTE WITHIN BLOCK
    214	000374					CALL	.POINT		;CALL THE .POINT SUBROUTINE
    215	000400	103007 				BCC	25$		;BRANCH IF OK
    216	000402	122760 	177766 	000052 		CMPB	#IE.EOF,F.ERR(R0) ;IGNORE EOF ERROR IF IT OCCURS
    217	000410	001403 				BEQ	25$		;BRANCH IF EOF ERROR
    218
    219	000412	012701 			24$:	MOV	(PC)+,R1	;INDICATE POSITIONING ERROR
    220	000414	   000G	   000G			.BYTE	E$R14,S$V2
    221	000416	000735 				BR	ERROR
    222
    223	000420	004567 	000000G		25$:	JSR	R5,$CLEAR	;ZERO MODULE HEADER RECORD
    224	000424	000000G				.WORD	$MHBUF
    225	000426	000006 				.WORD	6
    226	000430					PUT$	R0,#$MHST,MHSZ	;WRITE MODULE HEADER RECORD
    227	000450	103434 				BCS	40$		;PUT ERROR
    228	000452	016700 	000000G		30$:	MOV	$INPPT,R0	;PUT ADDR OF INPUT FDB IN R0
LBRIN	MACRO M1108  05-DEC-77 22:28  PAGE 2-4


    229	000456	005767 	177344 			TST	ENDFLG		;TEST FOR OMITTING GET
    230	000462	003006 				BGT	35$		;BRANCH...FIRST RECORD ALREADY READ
    231
    232
    233						.IF NDF	S$$LIB
    234
    235
    236						GET$	R0		;GET INPUT RECORD
    237
    238						.IFF
    239
    240	000464					GET$S	R0		;GET INPUT RECORD
    241
    242
    243						.ENDC
    244
    245
    246	000470	103003 				BCC	35$
    247	000472	012701 			31$:	MOV	(PC)+,R1	;FATAL READ ERROR
    248	000474	   000G	   000G			.BYTE	E$R01,S$V2
    249	000476	000705 				BR	ERROR		;FATAL EXIT
    250
    251	000500				35$:	CALL	@(SP)+		;SCAN RECORD JUST READ
    252	000502	016701 	000000G			MOV	$INPPT,R1
    253	000506	016700 	000000G			MOV	$LBRPT,R0
    254	000512	005761 	000024 			TST	F.NRBD(R1)	;NULL LINE?
    255	000516	001755 				BEQ	30$		;SKIP PUT IF SO
    256	000520					PUT$	R0,F.NRBD+2(R1),F.NRBD(R1) ;WRITE OUT RECORD
    257	000540	103003 				BCC	45$
    258	000542	012701 			40$:	MOV	(PC)+,R1	;WRITE ERROR
    259	000544	   000G	   000G			.BYTE	E$R02,S$V2
    260	000546	000661 				BR	ERROR
    261
    262
    263	000550	005767 	177252 		45$:	TST	ENDFLG		;CHECK END FLAG
    264	000554	003736 				BLE	30$		;IF NOT SET, CONTINUE READING MODULE
    265	000556	012704 	000000G			MOV	#$MHST,R4	;BUILD MODULE HEADER RECORD
    266	000562	005024 				CLR	(R4)+		;CLEAR MODULE STATUS
    267	000564	032767 	000000G	000000C		BIT	#SS$SW,R$SWTH+INPPT  ;WAS /SS SWITCH SPECIFIED?
    268	000572	001402 				BEQ	50$		;BRANCH IF NOT
    269	000574	105264 	177777 			INCB	-1(R4)		;YES--SET SELECTIVE SEARCH ATTRIBUTE
    270	000600	012705 	000000G		50$:	MOV	#L$NX,R5	;GET ADDRESS OF MODULE INSERT
    271	000604					CALL	.MARK		;COMPUTE CURRENT VBN&BYTE-IN-BLOCK
    272	000610	010346 				MOV	R3,-(SP)	;SAVE BYTE IN BLOCK
    273	000612	162502 				SUB	(R5)+,R2	;# OF BLOCKS
    274
    275
    276						.IF DF	R$$EIS
    277
    278
    279						MUL	#512.,R2	;COMPUTE # OF BYTES
    280
    281						.IFF
    282
    283	000614	000302 				SWAB	R2		;MULTIPLY R2 BY 256.
    284	000616	010203 				MOV	R2,R3		;MAKE IT DOUBLE WORD RESULT
    285	000620	105003 				CLRB	R3		;CLEAR LOW HALF OF R3
LBRIN	MACRO M1108  05-DEC-77 22:28  PAGE 2-5


    286	000622	040302 				BIC	R3,R2		;CLEAR HIGH HALF OF R2
    287	000624	006303 				ASL	R3		;FINAL RESULT IS MULTIPLIED BY 512.
    288	000626	006102 				ROL	R2		;DOUBLE WORD
    289
    290
    291						.ENDC
    292
    293
    294	000630	061603 				ADD	(SP),R3		;ADD BYTE-IN-BLOCK INTO MODULE SIZE
    295	000632	005502 				ADC	R2		;(DOUBLE PRECISION)
    296	000634	161503 				SUB	(R5),R3		; - BYTE IN RECORD OF START
    297	000636	005602 				SBC	R2		;(DOUBLE PRECISION)
    298	000640	010224 				MOV	R2,(R4)+	;AND SAVE MODULE SIZE
    299	000642	010324 				MOV	R3,(R4)+
    300	000644	012701 	000002'			MOV	#DATE,R1
    301	000650					GTIM$S	R1
    302	000660	012703 	000000G			MOV	#L$DAT,R3	;STORE DATE IN BOTH LIBRARY HEADER
    303	000664	011124 				MOV	(R1),(R4)+	;AND MODULE HEADER
    304	000666	012123 				MOV	(R1)+,(R3)+
    305	000670	011124 				MOV	(R1),(R4)+
    306	000672	012123 				MOV	(R1)+,(R3)+
    307	000674	011124 				MOV	(R1),(R4)+
    308	000676	012123 				MOV	(R1)+,(R3)+
    309	000700	012123 				MOV	(R1)+,(R3)+
    310	000702	012123 				MOV	(R1)+,(R3)+
    311	000704	011113 				MOV	(R1),(R3)
    312	000706	016724 	177110 			MOV	ID,(R4)+	;STORE MHID
    313	000712	016714 	177106 			MOV	ID+2,(R4)
    314
    315	000716	005001 				CLR	R1		;GET ADDRESS OF MODULE HEADER RECORD
    316	000720	014502 				MOV	-(R5),R2
    317	000722	016503 	000002 			MOV	2(R5),R3
    318	000726	016025 	000066 			MOV	F.VBN+2(R0),(R5)+ ;SAVE NEW NEXT MODULE ADDRESS
    319	000732	012615 				MOV	(SP)+,(R5)
    320	000734					CALL	.POINT		;RESET RECORD POINTER
    321	000740	103624 				BCS	24$		;BRANCH IF POSITIONING ERROR
    322	000742					PUT$	R0,#$MHST,MHSZ	;REWRITE HEADER RECORD
    323	000762	103667 				BCS	40$		;BRANCH IF WRITE ERROR
    324	000764	026727 	000004'	000001 		CMP	RPMHD,#1	;CHECK FOR OCCURRENCE OF REPLACE
    325	000772	101421 				BLOS	18$		;BRANCH IF NONE OCCURRED
    326	000774	005767 	000000'			TST	RPMNT		;IF SO, CHECK FOR THE MODULE NAME
    327	001000	001002 				BNE	15$		;IF PRESENT, CONTINUE
    328	001002	000167 	000000G			JMP	EPTERR		;OTHERWISE, FORCE EPT ERROR
    329	001006				15$:
    330	001006	012702 	000004'			MOV	#RPMHD,R2	;NOW IS THE TIME TO DELETE MODULE
    331	001012					CALL	$DELM
    332	001016					CALL	$WTHD		;BEST REWRITE HEADER
    333	001022	012701 	000042'			MOV	#RPM,R1		;TELL HIM I DID IT
    334	001026	012702 	000000'			MOV	#RPMNT,R2	;GET POINTER TO MNT NAME
    335	001032					CALL	$OUT1
    336	001036	016700 	000000G		18$:	MOV	$INPPT,R0
    337
    338
    339						.IF NDF	S$$LIB
    340
    341
    342						GET$	R0		;MORE INPUT?
LBRIN	MACRO M1108  05-DEC-77 22:28  PAGE 2-6


    343
    344						.IFF
    345
    346	001042					GET$S	R0		;MORE INPUT?
    347
    348
    349						.ENDC
    350
    351
    352	001046	103402 				BCS	CLOSIN		;BRANCH IF NO MORE INPUT
    353	001050	000167 	177246 			JMP	IN20		;GET$ SUCCEEDED...GO BACK FOR MORE
    354
    355	001054				CLOSIN:	CLOSE$	R0		;CLOSE INPUT FILE
    356	001060	005726 				TST	(SP)+		;FLUSH COROUTINE ADDRESS
    357	001062					CALL	$WTHD		;WRITE OUT HEADER, EPT, MNT
    358	001066	000167 	177066 			JMP	IN10		;RETURN FOR MORE INPUT
LBRIN	MACRO M1108  05-DEC-77 22:28  PAGE 3


    360					;
    361					; OBJECT LANGUAGE DEFINITION
    362					;
    363
    364		000001 			GSD	=1			;GLOBAL SYMBOL DIRECTORY RECORD TYPE
    365		000000 				MN=0				;MODULE NAME ENTRY
    366		000004 				GSN=4				;GLOBAL SYMBOL NAME ENTRY
    367		000010 					DEF=10				;DEFINITION FLAG
    368		000006 				PVI=6				;PROGRAM VERSION ID ENTRY
    369
    370		000006 			ENDOM	=6			;END OF MODULE RECORD TYPE
    371
    372
    373					;+
    374					;
    375					; THIS CO-ROUTINE HANDLES THE OBJECT MODULE TYPE-DEPENDENT
    376					; FUNCTIONS FOR THE INSERT ($INS) PROCESSOR.
    377					;
    378					;-
    379
    380	001072	012767 	000000G	176700 	INOBJ:	MOV	#HS$OBJ,MHSZ	;STORE MODULE HEADER SIZE
    381
    382	001100	005067 	176722 		CO1:	CLR	ENDFLG
    383	001104				COXIT:	CALL	@(SP)+		;EXIT CO-ROUTINE
    384	001106	016001 	000026 			MOV	F.NRBD+2(R0),R1	;GET ADDRESS OF RECORD JUST READ
    385	001112	122711 	000001 			CMPB	#GSD,(R1)
    386	001116	001406 				BEQ	120$		;BRANCH IF GSD RECORD
    387	001120	122711 	000006 			CMPB	#ENDOM,(R1)
    388	001124	001365 				BNE	CO1		;BRANCH IF NOT END-OF-MODULE
    389	001126	005267 	176674 			INC	ENDFLG		;INDICATE END OF MODULE
    390	001132	000764 				BR	COXIT		;EXIT
    391
    392	001134	010105 			120$:	MOV	R1,R5
    393	001136	066005 	000024 			ADD	F.NRBD(R0),R5	;R5=END OF RECORD ADDRESS
    394	001142	005721 				TST	(R1)+		;POINT TO FIRST GSD ENTRY
    395
    396	001144	020105 			ILOP:	CMP	R1,R5		;REACHED END OF RECORD?
    397	001146	103354 				BHIS	CO1		;EXIT IF ALL DONE
    398	001150	122761 	000000 	000005 		CMPB	#MN,5(R1)
    399	001156	001006 				BNE	140$		;BRANCH IF NOT MODULE NAME ENTRY
    400	001160	012702 	000000G			MOV	#$MNBLK,R2	;MNT DESCRIPTOR
    401	001164	012704 	000000G			MOV	#L$MA,R4	;POINT R4 TO MNT'S AVAILABLE
    402	001170					CALL	PUT
    403
    404	001174	122761 	000004 	000005 	140$:	CMPB	#GSN,5(R1)
    405	001202	001012 				BNE	150$		;BRANCH IF NOT GLOBAL SYMBOL NAME
    406	001204	132761 	000010 	000004 		BITB	#DEF,4(R1)	;IS IT A SYMBOL DEFINITION?
    407	001212	001417 				BEQ	CEXIT		;BRANCH IF NOT
    408	001214	012702 	000000G			MOV	#$EPBLK,R2	;EPT DESCRIPTOR
    409	001220	012704 	000000G			MOV	#L$EA,R4	;POINT R4 TO EPT'S AVAILABLE
    410	001224					CALL	PUT		;UPDATE THE EPT
    411
    412	001230	122761 	000006 	000005 	150$:	CMPB	#PVI,5(R1)
    413	001236	001005 				BNE	CEXIT		;BRANCH IF NOT PROGRAM VERSION ID ENTRY
    414	001240	011167 	176556 			MOV	(R1),ID		;STORE VERSION IDENTIFICATION
    415	001244	016167 	000002 	176552 		MOV	2(R1),ID+2
    416
LBRIN	MACRO M1108  05-DEC-77 22:28  PAGE 3-1


    417	001252	062701 	000010 		CEXIT:	ADD	#8.,R1		;GET NEXT GSD ENTRY
    418	001256	000732 				BR	ILOP
    419
    420					;
    421					;+
    422					;
    423					; THIS ROUTINE SCANS FOR FIRST LEVEL MACRO DEFINITIONS IN THE INPUT FILE.
    424					; IT CREATES THE MNT ENTRY FOR EACH DEFINITION IT FINDS AND ONLY SWITCHES
    425					; TO THE MAIN PROGRAM LOOP WHEN IT IS SCANNING LINES OF A MACRO DEFINITION
    426					; WHICH MUST BE WRITTEN TO THE LIBRARY FILE.  THEREFORE IT MUST DO ITS OWN
    427					; INPUT WHILE IT SCANNING OUTSIDE OF A MACRO DEFINITION.
    428					;
    429					;-
    430	001260	012767 	000000G	176512 	INMAC:	MOV	#HS$MAC,MHSZ	;SET MODULE HEADER SIZE
    431	001266				COXIT1:	CALL	@(SP)+		;SWITCH TO MAIN PROGRAM LOOP
    432	001270	005767 	176534 			TST	MDEPTH		;ARE WE INSIDE A MACRO DEFINITION ALREADY?
    433	001274	101065 				BHI	70$		;BRANCH IF SO
    434	001276	005067 	176524 			CLR	ENDFLG		;OTHERWISE INDICATE NO END OF MODULE
    435	001302				10$:	CALL	SCAN		;SCAN FOR NEXT KEY WORD
    436	001306	103402 				BCS	20$		;IF NONE FOUND READ NEW LINE
    437	001310	005704 				TST	R4		;IS KEY WORD ".MACRO"?
    438	001312	001405 				BEQ	30$		;BRANCH IF SO
    439	001314				20$:
    440
    441						.IF NDF S$$LIB
    442
    443						GET$	R0		;READ NEXT LINE
    444
    445						.IFF
    446
    447	001314					GET$S	R0		;READ NEXT LINE
    448
    449						.ENDC
    450
    451	001320	103370 				BCC	10$		;BRANCH TO SCAN LINE IF NO ERRORS
    452	001322	000167 	177526 			JMP	CLOSIN		;JUMP TO CLOSE INPUT FILE
    453									;(COROUTINE WILL BE RESTARTED)
    454	001326	010304 			30$:	MOV	R3,R4		;COPY END OF LINE POINTER
    455	001330	160104 				SUB	R1,R4		;MACRO DEF FOUND, CALCULATE CHARS LEFT
    456									;... IN CURRENT LINE
    457	001332	003770 				BLE	20$		;IGNORE LINE IF NO MACRO NAME
    458	001334	020427 	000006 			CMP	R4,#6		;GREATER THAN SIX?
    459	001340	003402 				BLE	40$		;OK IF NOT
    460	001342	012704 	000006 			MOV	#6,R4		;OTHERWISE CONSIDER ONLY FIRST SIX
    461	001346	012700 	000036'		40$:	MOV	#MACNAM+4,R0	;POINT TO MACNAM BUFFER
    462	001352	005010 				CLR	(R0)		;...AND CLEAR IT  OUT
    463	001354	005040 				CLR	-(R0)
    464	001356	005040 				CLR	-(R0)
    465	001360	112120 			50$:	MOVB	(R1)+,(R0)+	;MOVE IN CHARS FROM INPUT LINE
    466	001362					SOB	R4,50$		;LOOP UNTIL ALL MOVED
    467	001366	012700 	000032'			MOV	#MACNAM,R0	;POINT TO NAME BUF
    468	001372					CALL	$CAT5		;CONVERT
    469	001376	010167 	176430 			MOV	R1,MACNAM	;MOVE IN FIRST CONVERTED WORD
    470	001402	001744 				BEQ	20$		;IF NO NAME, READ NEW LINE
    471	001404	103403 				BCS	60$		;BRANCH IF NO MORE CHARACTERS TO CONVERT
    472	001406					CALL	$CAT5		;CONVERT SECOND WORD
    473	001412	000401 				BR	65$		;BRANCH TO MOVE IN WORD
LBRIN	MACRO M1108  05-DEC-77 22:28  PAGE 3-2


    474	001414	005001 			60$:	CLR	R1		;SET FOR SECOND WORD OF NAME TO BE ZERO
    475	001416	010167 	176412 		65$:	MOV	R1,MACNAM+2	;MOVE IN SECOND WORD OF NAME
    476	001422	012701 	000032'			MOV	#MACNAM,R1	;POINT TO MACRO NAME
    477	001426	012702 	000000G			MOV	#$MNBLK,R2	;POINT TO MNT BLOCK
    478	001432	012704 	000000G			MOV	#L$MA,R4	;MOVE IN MODULE HEADER SIZE
    479	001436					CALL	PUT		;WRITE MNT ENTRY
    480	001442	005267 	176362 			INC	MDEPTH		;WE ARE IN A MACRO DEF NOW
    481	001446	000417 				BR	SQZ		;BRANCH TO HAVE LINE WRITTEN TO LBR FILE
    482	001450				70$:	CALL	SCAN		;SCAN FOR KEY WORD
    483	001454	103414 				BCS	SQZ		;WRITE LINE IF NONE FOUND
    484	001456	032704 	000004 			BIT	#4,R4		;.MACRO, .REPT, .IRPC OR .IRP?
    485	001462	001003 				BNE	80$		;BRANCH IF NOT
    486	001464	005267 	176340 			INC	MDEPTH		;OTHERWISE INC MACRO DEPTH
    487	001470	000406 				BR	SQZ		;AND WRITE LINE
    488	001472	005367 	176332 		80$:	DEC	MDEPTH		;MUST HAVE BEEN ".ENDM" OR ".ENDR"
    489	001476	001003 				BNE	SQZ		;WRITE LINE IF STILL IN MACRO DEF
    490	001500	005267 	176322 			INC	ENDFLG		;OTHER INDICATE END OF MACRO DEF
    491	001504	000400 				BR	SQZ		;WRITE LAST LINE AND ADJUST POINTERS
    492	001506	032767 	000000G	000000C	SQZ:	BIT	#SZ$SW,R$SWTH+INPPT ;SQUEEZE DESIRED?
    493	001514	001664 				BEQ	COXIT1		;IF EQ NO
    494	001516	016701 	000024G			MOV	F.NRBD+INPPT,R1	;PICK UP CHARACTER COUNT FOR LINE
    495	001522					CALL	ELIM		;ELIMINATE TRAILING BLANKS AND TABS
    496	001526	010167 	000024G			MOV	R1,F.NRBD+INPPT	;UPDATE CHARACTER COUNT
    497	001532	001655 				BEQ	COXIT1		;IF EQ LINE ELIMINATED
    498	001534	124327 	000073 		10$:	CMPB	-(R3),#';	;SEMI-COLON?
    499	001540	001403 				BEQ	20$		;IF EQ YES
    500	001542	005301 				DEC	R1		;OTHERWISE DECREMENT COUNT
    501	001544	001373 				BNE	10$		;IF NE MORE CHARACTERS ON LINE
    502	001546	000647 				BR	COXIT1		;OTHERWISE NO SEMI ON LINE
    503	001550	005301 			20$:	DEC	R1		;DEC COUNT FOR SEMI
    504	001552	001402 				BEQ	30$		;IF EQ FIRST CHAR ON LINE
    505	001554					CALL	ELIM		;ELIMINATE TRAILING BLANKS AND TABS
    506	001560	010167 	000024G		30$:	MOV	R1,F.NRBD+INPPT	;UPDATE CHARACTER COUNT
    507	001564	000640 				BR	COXIT1		;BR TO PRINT LINE
    508
    509
    510					;+
    511					;
    512					; THIS THE SCAN ROUTINE.  IT SCANS FOR KEY WORDS IN THE INPUT SOURCE FILES.
    513					;
    514					; INPUTS:
    515					;	R0 POINTS TO FDB ON WHICH LINE HAS JUST BEEN READ.
    516					;
    517					; OUTPUTS:
    518					;	C-BIT SET IF NO KEY WORD WAS FOUND ON CURRENT LINE.
    519					;
    520					;	C-BIT CLEAR IF A KEY WORD WAS FOUND, AND
    521					;	R1 POINTS TO FIRST CHARACTER OF OPERAND FIELD (OR PAST END OF LINE)
    522					;	R4 CONTAINS:
    523					;		0 IF IT WAS ".MACRO"
    524					;		1 IF IT WAS ".REPT"
    525					;		2 IF IT WAS ".ENDM"
    526					;		3 IF IT WAS ".ENDR"
    527					;
    528					;-
    529	001566	016001 	000026 		SCAN:	MOV	F.NRBD+2(R0),R1	;POINT TO LINE
    530	001572	016003 	000024 			MOV	F.NRBD(R0),R3	;PICK UP CHARACTER COUNT
LBRIN	MACRO M1108  05-DEC-77 22:28  PAGE 3-3


    531	001576	060103 				ADD	R1,R3		;POINT TO CHAR PAST END OF LINE
    532	001600	052702 	000001 		5$:	BIS	#1,R2		;INITIALLY INDICATE NO KEY WORD ON LINE
    533	001604					CALL	SKIP		;POINT R1 TO FIRST NON BLANK
    534	001610	103437 				BCS	25$		;BRANCH IF NOTHING ON LINE
    535	001612	121127 	000056 			CMPB	(R1),#'.	;FIRST CHAR "." (POSSIBLE KEY WORD)?
    536	001616	001012 				BNE	10$		;BRANCH IF NOT
    537	001620	005201 				INC	R1		;OTHERWISE POINT TO NEXT CHARACTER
    538	001622	004567 	000064 			JSR	R5,CMPSTR	;SEE IF KEY WORD
    539	001626	000006 				.WORD	6
    540	001630	000074'				.WORD	MACSTR
    541	001632	000102'				.WORD	REPSTR
    542	001634	000107'				.WORD	IRCSTR
    543	001636	000114'				.WORD	IRSTR
    544	001640	000120'				.WORD	ENMSTR
    545	001642	000125'				.WORD	ENRSTR
    546	001644	010105 			10$:	MOV	R1,R5		;SAVE CURRENT STRING POINTER
    547	001646					CALL	SKIP		;POINT TO NEXT NONBLANK
    548	001652	103415 				BCS	20$		;BRANCH ON LINE TERMINATION
    549	001654	122127 	000072 		15$:	CMPB	(R1)+,#':	;RESTART LINE SCAN FOR LABLE
    550	001660	001747 				BEQ	5$		;BRANCH IF SO
    551	001662	124127 	000075 			CMPB	-(R1),#'=	;CHECK FOR ASSIGNMENT STATEMENT
    552	001666	000261 				SEC			;PREPARE TO RETURN STATUS OF NO KEY WORD
    553	001670	001407 				BEQ	25$		;RETURN IF ASSIGNMENT
    554	001672	020105 				CMP	R1,R5		;SEE IF POINTER WAS BUMPED IN "SKIP"
    555	001674	001004 				BNE	20$		;IF IT WAS, THEN OPERATOR HAS BEEN SCANNED
    556	001676	052702 	000001 			BIS	#1,R2		;COULD NOT HAVE SCANNED KEY WORD
    557	001702	005201 				INC	R1		;OTHERWISE BUMP POINTER
    558	001704	000757 				BR	10$		;CONTINUE SCAN
    559	001706	006002 			20$:	ROR	R2		;SET RETURN STATUS
    560	001710				25$:	RETURN
    561
    562
    563					;+
    564					;
    565					; THIS ROUTINE COMPARES A STRING IN THE INPUT BUFFER WITH A SET OF
    566					; STRINGS POINTED TO IN THE CALL.
    567					;
    568					; IT IS CALLED BY:
    569					;	JSR	R5,CMPSTR
    570					;	.WORD	COUNT
    571					;	.WORD	STRPT0
    572					;	.WORD	STRPT1
    573					;	...
    574					;
    575					; WHERE:
    576					;	COUNT IS THE NUMBER OF STRING POINTERS BEING PASSED
    577					;	STRPT0,STRPT1,... ARE POINTERS TO ASCIZ STRINGS
    578					;	R1 POINTS TO THE TEST STRING
    579					;
    580					; OUTPUTS:
    581					;	R2 UNCHANGED IF NO MATCH WAS FOUND
    582					;
    583					;	R2 CLEAR IF MATCH WAS FOUND, AND
    584					;	R1 POINTS TO FIRST CHARACTER OF OPERAND FIELD (OR PAST END OF LINE)
    585					;	R4 CONTAINS NUMBER OF STRING POINTER THAT WAS MATCHED.
    586					;
    587					;-
LBRIN	MACRO M1108  05-DEC-77 22:28  PAGE 3-4


    588	001712	012504 			CMPSTR:	MOV	(R5)+,R4	;PICK UP COUNT
    589	001714	010446 				MOV	R4,-(SP)	;AND SAVE IT
    590	001716	010146 				MOV	R1,-(SP)	;SAVE STRING POINTER
    591	001720	011601 			5$:	MOV	(SP),R1		;PICK UP INPUT STRING PTR
    592	001722	012502 				MOV	(R5)+,R2	;PICK COMPARE STRING PTR
    593	001724	105712 			10$:	TSTB	(R2)		;AT END OF COMPARE STRING?
    594	001726	001407 				BEQ	15$		;MATCH IF SO
    595	001730	122122 				CMPB	(R1)+,(R2)+	;OTHERWISE, COMPARE NEXT CHARACTER
    596	001732	001774 				BEQ	10$		;LOOP IF EQUAL
    597	001734					SOB	R4,5$		;LOOP UNTIL STRING POINTERS EXHAUSTED
    598	001740	012601 				MOV	(SP)+,R1	;RESTORE INPUT STRING POINTER
    599	001742	005726 				TST	(SP)+		;POP SAVED COUNT
    600	001744	000407 				BR	25$		;BRANCH TO EXIT
    601	001746	005726 			15$:	TST	(SP)+		;THROW AWAY SAVED STRING POINTER
    602	001750	060405 				ADD	R4,R5		;BUMP R5 PAST
    603	001752	060405 				ADD	R4,R5		;...LAST STRING POINTER
    604	001754	005745 				TST	-(R5)		;...AND POINT TO INSTRUCTION AFTER CALL
    605	001756	162604 				SUB	(SP)+,R4	;CALCULATE NEGATIVE OF NUMBER OF MATCH
    606	001760	005404 				NEG	R4		;MAKE POSITIVE
    607	001762	005002 				CLR	R2		;INDICATE SUCCESSFUL MATCH
    608	001764	000205 			25$:	RTS	R5
    609					;+
    610					;
    611					; THIS ROUTINE ATTEMPTS TO POINT R1 TO THE NEXT NONBLANK IN THE CURRENT.
    612					; IT RETURNS:
    613					;
    614					;	C-BIT CLEAR IF SUCCESSFUL
    615					;
    616					;	C-BIT SET IF ";" OR END OF LINE SEEN
    617					;
    618					;-
    619	001766	020103 			SKIP:	CMP	R1,R3		;END OF LINE?
    620	001770	103014 				BHIS	15$		;BRANCH TO RETURN C-BIT SET IF SO
    621	001772	121127 	000073 			CMPB	(R1),#';	;COMMENT FIELD?
    622	001776	001411 				BEQ	15$		;BRANCH IF SO
    623	002000	122127 	000011 			CMPB	(R1)+,#11	;CURRENT CHARACTER A TAB?
    624	002004	001770 				BEQ	SKIP		;BRANCH TO BUMP POINTER IF SO
    625	002006	124127 	000040 			CMPB	-(R1),#40	;CURRENT CHARACTER SPACE?
    626	002012	000241 				CLC			;PREPARE TO RETURN C-BIT CLEAR IF NOT
    627	002014	001003 				BNE	20$		;BRANCH TO RETURN C-BIT CLEAR
    628	002016	005201 				INC	R1		;BUMP POINTER PAST SPACE OR TAB
    629	002020	000762 				BR	SKIP		;CHECK NEXT CHAR
    630	002022	000261 			15$:	SEC
    631	002024				20$:	RETURN
    632
    633
    634					;+
    635					;
    636					; THIS ROUTINE IS USED TO ELIMINATE TRAILING BLANKS AND TABS FROM THE
    637					; CURRENT SOURCE LINE.
    638					;
    639					; INPUTS:
    640					;	R1 CONTAINS CHARACTER OF CURRENT LINE
    641					;	R3 POINTS PAST LAST CHARACTER ON CURRENT LINE
    642					;
    643					; OUTPUTS:
    644					;	R1 CONTAINS UPDATED CHARACTER COUNT
LBRIN	MACRO M1108  05-DEC-77 22:28  PAGE 3-5


    645					;	R3 POINTS PAST LAST NONBLANK, NONTAB CHARACTER ON LINE
    646					;
    647					;-
    648
    649	002026	124327 	000011 		ELIM:	CMPB	-(R3),#11	;CURRENT LAST CHAR A TAB?
    650	002032	001403 				BEQ	10$		;IF EQ YES
    651	002034	121327 	000040 			CMPB	(R3),#40	;CURRENT LAST CHAR A BLANK?
    652	002040	001002 				BNE	20$		;IF NE NO
    653	002042	005301 			10$:	DEC	R1		;REDUCE COUNT FOR TRAILING CHAR
    654	002044	001370 				BNE	ELIM		;IF NE MORE CHARS ON LINE
    655	002046	005203 			20$:	INC	R3		;POINT R3 PAST CURRENT END OF LINE
    656	002050					RETURN
    657		000001 				.END
LBRIN	MACRO M1108  05-DEC-77 22:28  PAGE 3-6
SYMBOL TABLE

CEXIT   001252R  	FD.RWM= 000001   	G.TIDA= 000004   	IE.ONP= 177773   	NB.VER= 000001
CLOSIN  001054R  	FD.SDI= 000020   	G.TIHR= 000006   	IE.OVR= 177756   	N.DID = 000024
CMPSTR  001712R  	FD.SQD= 000040   	G.TIMI= 000010   	IE.PRI= 177760   	N.DVNM= 000032
COXIT   001104R  	FD.TTY= 000004   	G.TIMO= 000002   	IE.RAC= 177724   	N.FID = 000000
COXIT1  001266R  	FD.WBH= 000002   	G.TISC= 000012   	IE.RAT= 177723   	N.FNAM= 000006
CO1     001100R  	FO.APD= 000106   	G.TIYR= 000000   	IE.RBG= 177730   	N.FTYP= 000014
CS.DIF= 000002   	FO.MFY= 000002   	HS$MAC= ****** GX	IE.RCN= 177722   	N.FVER= 000016
CS.DVF= 000004   	FO.RD = 000001   	HS$OBJ= ****** GX	IE.RER= 177740   	N.NEXT= 000022
CS.EQU= 000040   	FO.UPD= 000006   	ID    = 000022R  	IE.RNM= 177715   	N.STAT= 000020
CS.INP= 000001   	FO.WRT= 000016   	IE.ABO= 177761   	IE.RSU= 177757   	N.UNIT= 000034
CS.MOR= 000020   	F.ALOC= 000040   	IE.ALN= 177736   	IE.SNC= 177735   	PAR$$$= 000000
CS.NMF= 000001   	F.BBFS= 000062   	IE.BAD= 177777   	IE.SPC= 177772   	PUT   = ****** GX
CS.OUT= 000002   	F.BDB = 000070   	IE.BBE= 177710   	IE.SQC= 177734   	PVI   = 000006
CS.WLD= 000010   	F.BGBC= 000057   	IE.BDI= 177714   	IE.SRE= 177762   	Q$$CMO= 000000
C.CMLD= 000002   	F.BKDN= 000026   	IE.BDR= 177716   	IE.STK= 177706   	REPSTR  000102R
C.DEVD= 000006   	F.BKDS= 000020   	IE.BDV= 177711   	IE.VER= 177774   	RPBLK   000000R     002
C.DIRD= 000012   	F.BKEF= 000050   	IE.BHD= 177700   	IE.WAC= 177743   	RPM     000042R
C.DSDS= 000006   	F.BKP1= 000051   	IE.BLK= 177754   	IE.WAT= 177741   	RPMHD = 000004RG    002
C.FILD= 000016   	F.BKST= 000024   	IE.BNM= 177712   	IE.WER= 177737   	RPMNT = 000000RG    002
C.MKW1= 000024   	F.BKVB= 000064   	IE.BTF= 177675   	IE.WLK= 177764   	RP$SW = ****** GX
C.MKW2= 000026   	F.CNTG= 000034   	IE.BTP= 177725   	IE.2DV= 177720   	R$NAME= ****** GX
C.SIZE= 000054   	F.DFNB= 000046   	IE.BVR= 177701   	ILOP    001144R  	R$SWTH= ****** GX
C.STAT= 000001   	F.DSPT= 000044   	IE.BYT= 177755   	INMAC   001260R  	R$$11M= 000000
C.SWAD= 000022   	F.DVNM= 000134   	IE.CKS= 177742   	INOBJ   001072R  	R.FIX = 000001
C.TYPR= 000000   	F.EFBK= 000010   	IE.CLO= 177732   	INPNAM= ****** GX	R.VAR = 000002
DATE    000002R  	F.EFN = 000050   	IE.CON= 177752   	INPPT = ****** GX	SCAN    001566R
DEF   = 000010   	F.EOBB= 000032   	IE.DAA= 177770   	INSUB   000132R  	SKIP    001766R
ELIM    002026R  	F.ERR = 000052   	IE.DAO= 177763   	IN10    000160R  	SQZ     001506R
ENDFLG= 000026R  	F.FACC= 000043   	IE.DFU= 177750   	IN20    000322R  	SS$SW = ****** GX
ENDOM = 000006   	F.FFBY= 000014   	IE.DNA= 177771   	IRCSTR  000107R  	SZ$SW = ****** GX
ENMSTR  000120R  	F.FNAM= 000110   	IE.DNR= 177775   	IRSTR   000114R  	S$V2  = ****** GX
ENRSTR  000125R  	F.FNB = 000102   	IE.DUN= 177767   	IS.BV = 000005   	S$$LIB= 000000
EPTERR= ****** GX	F.FTYP= 000116   	IE.DUP= 177707   	IS.CR = 006401   	S.FATT= 000016
ERROR   000312R  	F.FVER= 000120   	IE.EBX= 177776   	IS.ESC= 015401   	S.FDB = 000140
ERRXIT  000316R  	F.HIBK= 000004   	IE.EOF= 177766   	IS.PND= 000000   	S.FNAM= 000006
E$R01 = ****** GX	F.LUN = 000042   	IE.EOT= 177702   	IS.RDD= 000002   	S.FNB = 000036
E$R02 = ****** GX	F.MBCT= 000054   	IE.EOV= 177765   	IS.SUC= 000001   	S.FNBW= 000017
E$R11 = ****** GX	F.MBC1= 000055   	IE.EXP= 177676   	LASTEP  000010RG    002	S.FNTY= 000004
E$R14 = ****** GX	F.MBFG= 000056   	IE.FEX= 177717   	L$DAT = ****** GX	S.FTYP= 000002
FA.APD= 000100   	F.NRBD= 000024   	IE.FHE= 177705   	L$EA  = ****** GX	S.NFEN= 000020
FA.CRE= 000010   	F.NREC= 000030   	IE.FOP= 177713   	L$MA  = ****** GX	XXX     000022R
FA.EXT= 000004   	F.OVBS= 000030   	IE.HFU= 177744   	L$NX  = ****** GX	$CAT5 = ****** GX
FA.NSP= 000100   	F.RACC= 000016   	IE.IFC= 177776   	L$TYP = ****** GX	$CLEAR= ****** GX
FA.RD = 000001   	F.RATT= 000001   	IE.IFU= 177747   	MACNAM  000032R  	$CSIBK= ****** GX
FA.SHR= 000040   	F.RCNM= 000034   	IE.ILL= 177726   	MACSTR  000074R  	$DELM = ****** GX
FA.TMP= 000020   	F.RCTL= 000017   	IE.ISQ= 177703   	MDEPTH  000030R  	$EPBLK= ****** GX
FA.WRT= 000002   	F.RSIZ= 000002   	IE.LCK= 177745   	MHSZ    000000R  	$ERMSG= ****** GX
FD.BLK= 000010   	F.RTYP= 000000   	IE.MBK= 177721   	MN    = 000000   	$INPPT= ****** GX
FD.CCL= 000002   	F.STBK= 000036   	IE.MOD= 177753   	NB.DEV= 000200   	$INS    000142RG
FD.CR = 000002   	F.UNIT= 000136   	IE.NBF= 177731   	NB.DIR= 000100   	$LBRPT= ****** GX
FD.DIR= 000010   	F.URBD= 000020   	IE.NBK= 177727   	NB.NAM= 000004   	$MHBUF= ****** GX
FD.FTN= 000001   	F.VBN = 000064   	IE.NFI= 177704   	NB.SD1= 000400   	$MHST = ****** GX
FD.INS= 000010   	F.VBSZ= 000060   	IE.NLN= 177733   	NB.SD2= 001000   	$MNBLK= ****** GX
FD.PLC= 000004   	GSD   = 000001   	IE.NNC= 177674   	NB.SNM= 000040   	$OPEN = ****** GX
FD.RAH= 000001   	GSN   = 000004   	IE.NOD= 177751   	NB.STP= 000020   	$OPNFL= ****** GX
FD.RAN= 000002   	G.TICP= 000016   	IE.NSF= 177746   	NB.SVR= 000010   	$OUT  = ****** GX
FD.REC= 000001   	G.TICT= 000014   	IE.OFL= 177677   	NB.TYP= 000002   	$OUT1 = ****** GX
LBRIN	MACRO M1108  05-DEC-77 22:28  PAGE 3-7
SYMBOL TABLE

$RDHD = ****** GX	$SWTCH= ****** GX	$$MSG = 000000   	.GETSQ= ****** G 	.PUT  = ****** G
$SAVRG= ****** GX	$WTHD = ****** GX	$$$OST= 000020   	.MARK = ****** GX	...GBL= 000000
$SCANI= ****** GX	$$    = 000067   	.CLOSE= ****** G 	.POINT= ****** GX	...TPC= 000140

. ABS.	000000	   000
      	002052	   001
PUTCOM	000014	   002
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  4512 WORDS  ( 18 PAGES)
DYNAMIC MEMORY:  5216 WORDS  ( 20 PAGES)
ELAPSED TIME:  00:00:51
[42,10]LBRIN,[42,20]LBRIN/-SP=[42,30]LBRPRF,LBRIN
LBRINI	MACRO M1108  05-DEC-77 22:29  PAGE 2


      1						.TITLE	LBRINI
      2						.IDENT	/X02.1/
      3
      4					;
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      6					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      7					;
      8					;	DEC ASSUMES NO RESPONSIBLIITY FOR THE USE
      9					;	OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT
     10					;	WHICH IS NOT SUPPLIED BY DEC.
     11					;
     12					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     13					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     14					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     15					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     16					;
     17					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     18					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     19					; EQUIPMENT CORPORATION.
     20					;
     21					; VERSION X02.1
     22					;
     23					; WRITTEN BY:
     24					;	GEORGE W. BERRY
     25					;
     26					; MODIFIED BY:
     27					;	C.A. D'ELIA	13-MAY-74
     28					;	C.A. D'ELIA	30-JUN-74 (VIRTUAL TABLES)
     29					;	T.J. MILLER	16-JUL-75 (USE GTSK FOR CALCULATING SIZE)
     30					;
     31					;
     32
     33					;
     34					; MACRO LIBRARY CALLS
     35					;
     36
     37						.MCALL	FDOFF$,GPRT$C,GTSK$C
     38	000000					FDOFF$	DEF$L
     39
     40					;
     41					; LOCAL DATA
     42					;
     43
     44						.IF DF	R$$11M
     45
     46	000000	000000 	000000 		ADRBND:	.LIMIT			;TKB WILL PROVIDE TASK'S ADDRESS LIMITS
     47
     48						.ENDC
     49
     50
     51					;+
     52					;
     53					; *-$INIT-*-INITIALIZATION ROUTINE
     54					;
     55					; THIS ROUTINE INITIALIZES THE LIBRARIAN'S DATA BASE,
     56					; READS A COMMAND, AND PERFORMS A SYNTAX CHECK ON IT.
     57					;
LBRINI	MACRO M1108  05-DEC-77 22:29  PAGE 2-1


     58					; INPUTS:
     59					;	NONE
     60					;
     61					; OUTPUTS:
     62					;	R1 = ADDRESS OF CSI BLOCK ($CSIBK)
     63					;	R5 = ADDRESS OF SWITCH WORD ($SWTCH)
     64					;
     65					;-
     66
     67	000004				$INIT::
     68	000004	012700 	000000G			MOV	#LBRPT,R0
     69	000010	005060 	000036 			CLR	F.STBK(R0)	;CLEAR STATBK POINTER
     70	000014	010067 	000000G			MOV	R0,$LBRPT	;RESTORE $LBRPT
     71	000020	004567 	000000G			JSR	R5,$CLEAR	;CLEAR DATA BASE
     72	000024	000000G				.WORD	DBASE
     73	000026	000000G				.WORD	DSIZE
     74	000030	004567 	000000G			JSR	R5,$CLEAR	;CLEAR L$BUF
     75	000034	000000G				.WORD	L$BUF
     76	000036	000400 				.WORD	256.
     77
     78	000040				10$:	CALL	$GTCML		;GET A COMMAND LINE
     79	000044	103002 				BCC	20$		;BRANCH IF GOOD READ
     80	000046	000167 	000000G			JMP	$QUIT		;ELSE EXIT
     81
     82	000052	012701 	000000G		20$:	MOV	#$CSIBK,R1	;POINT R1 TO CSI BLOCK
     83	000056					CALL	$SYNTX		;ANALYSE LINE SYNTAX
     84	000062	103766 				BCS	10$		;BRANCH IF BAD SYNTAX
     85	000064	016700 	177712 			MOV	ADRBND+2,R0	;PUT ADDR OF FREE MEMORY IN R0
     86	000070					GTSK$C	$OUTBF		;GET TASK PARAMETERS
     87	000076	016746 	000032G			MOV	$OUTBF+G.TSTS,-(SP) ;PUSH TASK SIZE
     88	000102					GPRT$C	,$OUTBF		;GET PARTITION PARAMETERS
     89	000110	063716 	000000G			ADD	@#$DSW,(SP)	;CALC ADDR OF END OF PARTITION
     90	000114	160016 				SUB	R0,(SP)		;CALC SIZE OF FREE MEMORY
     91	000116	010067 	000000G			MOV	R0,$FRHD	;SETUP FREE MEMORY LIST HEAD
     92	000122	005020 				CLR	(R0)+		;IT'S ONE CHUNK--ZERO LINK WORD
     93	000124	012610 				MOV	(SP)+,(R0)	;PUT IT'S SIZE IN NEXT WORD
     94	000126					CALL	$INIVM		;INITIALIZE WORK FILE SUB-SYSTEM
     95	000132	103010 				BCC	40$		;BRANCH IF ALL WENT O.K.
     96	000134	012701 				MOV	(PC)+,R1	;ASSUME WORK FILE OPEN FAILURE
     97	000136	   000G	   000G			.BYTE	E$R31,S$V2	;THAT IS FATAL
     98	000140	005500 				ADC	R0		;CHECK ALTERNATE STATUS RETURN
     99	000142	002402 				BLT	30$		;BRANCH IF ASSUMPTION WAS CORRECT
    100	000144	012701 				MOV	(PC)+,R1	;ELSE, MARK FOR DELETE FAILURE
    101	000146	   000G	   000G			.BYTE	E$R32,S$V0	;IT'S ONLY A DIAGNOSTIC
    102	000150				30$:	CALL	$ERMSG		;NOTIFY USER (POSSIBLE RETURN)
    103	000154	012705 	000000G		40$:	MOV	#$SWTCH,R5	;POINT R5 TO LIBRARIAN'S SWITCH WORD
    104	000160	012701 	000000G			MOV	#$CSIBK,R1	;POINT R1 TO CSI BLOCK
    105	000164					RETURN
    106
    107
    108		000001 				.END
LBRINI	MACRO M1108  05-DEC-77 22:29  PAGE 2-2
SYMBOL TABLE

ADRBND  000000R  	F.ERR = 000052   	F.UNIT= 000136   	LBRPT = ****** GX	S.FNTY= 000004
DBASE = ****** GX	F.FACC= 000043   	F.URBD= 000020   	L$BUF = ****** GX	S.FTYP= 000002
DSIZE = ****** GX	F.FFBY= 000014   	F.VBN = 000064   	N.DID = 000024   	S.NFEN= 000020
E$R31 = ****** GX	F.FNAM= 000110   	F.VBSZ= 000060   	N.DVNM= 000032   	$CLEAR= ****** GX
E$R32 = ****** GX	F.FNB = 000102   	G.PRBA= 000006   	N.FID = 000000   	$CSIBK= ****** GX
F.ALOC= 000040   	F.FTYP= 000116   	G.PRFW= 000004   	N.FNAM= 000006   	$DSW  = ****** GX
F.BBFS= 000062   	F.FVER= 000120   	G.PRPB= 000000   	N.FTYP= 000014   	$ERMSG= ****** GX
F.BDB = 000070   	F.HIBK= 000004   	G.PRPN= 000002   	N.FVER= 000016   	$FRHD = ****** GX
F.BGBC= 000057   	F.LUN = 000042   	G.PRPS= 000002   	N.NEXT= 000022   	$GTCML= ****** GX
F.BKDN= 000026   	F.MBCT= 000054   	G.TSBA= 000002   	N.STAT= 000020   	$INIT   000004RG
F.BKDS= 000020   	F.MBC1= 000055   	G.TSFW= 000024   	N.UNIT= 000034   	$INIVM= ****** GX
F.BKEF= 000050   	F.MBFG= 000056   	G.TSGC= 000017   	Q$$CMO= 000000   	$LBRPT= ****** GX
F.BKP1= 000051   	F.NRBD= 000024   	G.TSMT= 000022   	R$$11M= 000000   	$OUTBF= ****** GX
F.BKST= 000024   	F.NREC= 000030   	G.TSNL= 000020   	S$V0  = ****** GX	$QUIT = ****** GX
F.BKVB= 000064   	F.OVBS= 000030   	G.TSPC= 000016   	S$V2  = ****** GX	$SWTCH= ****** GX
F.CNTG= 000034   	F.RACC= 000016   	G.TSPN= 000004   	S$$LIB= 000000   	$SYNTX= ****** GX
F.DFNB= 000046   	F.RATT= 000001   	G.TSPR= 000014   	S.FATT= 000016   	$$    = 000067
F.DSPT= 000044   	F.RCNM= 000034   	G.TSRN= 000010   	S.FDB = 000140   	$$$   = 000004R     002
F.DVNM= 000134   	F.RCTL= 000017   	G.TSTN= 000000   	S.FNAM= 000006   	$$$OST= 000010
F.EFBK= 000010   	F.RSIZ= 000002   	G.TSTS= 000032   	S.FNB = 000036   	$$$T1 = 000000
F.EFN = 000050   	F.RTYP= 000000   	G.TSVA= 000026   	S.FNBW= 000017   	...TPC= 000140
F.EOBB= 000032   	F.STBK= 000036   	G.TSVL= 000030

. ABS.	000000	   000
      	000166	   001
$DPB$$	000014	   002
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  2064 WORDS  ( 9 PAGES)
DYNAMIC MEMORY:  3104 WORDS  ( 11 PAGES)
ELAPSED TIME:  00:00:17
[42,10]LBRINI,[42,20]LBRINI/-SP=[42,30]LBRPRF,LBRINI
LBRLCD	MACRO M1108  05-DEC-77 22:29  PAGE 2


      1						.TITLE	LBRLCD
      2						.IDENT	/X02.1/
      3
      4					;
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      6					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      7					;
      8					;	DEC ASSUMES NO RESPONSIBLIITY FOR THE USE
      9					;	OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT
     10					;	WHICH IS NOT SUPPLIED BY DEC.
     11					;
     12					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     13					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     14					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     15					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     16					;
     17					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     18					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     19					; EQUIPMENT CORPORATION.
     20					;
     21					; VERSION X02.1
     22					;
     23					; WRITTEN BY:
     24					;	GEORGE W. BERRY
     25					;
     26					; MODIFIED BY:
     27					;	C.A. D'ELIA	16-JUN-74
     28					;	C.A. D'ELIA	20-JUN-74  (VIRTUAL TABLES)
     29					;	THOMAS J. MILLER 07-NOV-74
     30					;
     31
     32					;
     33					; MACRO LIBRARY CALLS
     34					;
     35
     36						.MCALL	FDOFF$
     37	000000					FDOFF$	DEF$L
     38						.MCALL	FCSBT$
     39	000000					FCSBT$
     40						.MCALL	CSI$
     41	000000					CSI$
     42						.MCALL	CLOSE$
     43
     44
     45					;+
     46					;
     47					; **-$LISCD- LISTING COMMAND DECODER
     48					;
     49					; THIS ROUTINE SCANS THE COMMAND LINE FOR A LISTING OUTPUT
     50					; SPECIFICATION.  IF IT IS PRESENT, THE LISTING ROUTINE,
     51					; '$LIS' IS CALLED.  A DIAGNOSTIC IS ISSUED IF TOO MANY OUTPUT
     52					; FILES ARE SPECIFIED.  FINALLY, THE LIBRARY FILE IS CLOSED AND
     53					; THE LIBRARIAN IS RESTARTED OR TERMINATED.
     54					;
     55					; INPUTS:
     56					;
     57					;	R5 = $SWTCH ADDRESS
LBRLCD	MACRO M1108  05-DEC-77 22:29  PAGE 2-1


     58					;
     59					; OUTPUTS:
     60					;
     61					;	NONE
     62					;
     63					;-
     64
     65	000000				$LISCD::
     66	000000	012704 	000000G			MOV	#$LISPT,R4	;PREPARE TO SCAN FOR LISTING FILE
     67	000004	012714 	000000G			MOV	#LISPT,(R4)	;INSURE PROPER FDB ADDRESS
     68	000010	011400 				MOV	(R4),R0		;PUT LISTING FDB ADDR IN R0
     69	000012	012701 	000000G			MOV	#$CSIBK,R1	;PUT CSI BLOCK ADDR IN R1
     70	000016					CALL	$SCANO		;SCAN THE COMMAND LINE
     71	000022	103006 				BCC	40$		;BRANCH IF LISTING FILE FOUND
     72	000024	032715 	000000G			BIT	#LI$SW,(R5)	;ELSE, TEST FOR /LI SWITCH
     73	000030	001405 				BEQ	50$		;BRANCH -- NO LISTING DESIRED
     74
     75
     76						.IF NDF	Q$$CMO
     77
     78
     79						MOV	$CMOPT,(R4)	;ELSE, FORCE LISTING TO CMD OUTPUT
     80
     81						.IFF
     82
     83	000032	005014 				CLR	(R4)		;ELSE, FORCE LISTING TO CMD OUTPUT
     84
     85
     86						.ENDC
     87
     88
     89	000034	052715 	000000G			BIS	#SP$SW,(R5)	;FORCE NO SPOOLING
     90	000040				40$:	CALL	$LIS		;PRODUCE LIBRARY LISTINGS
     91	000044	132767 	000020 	000001G	50$:	BITB	#CS.MOR,$CSIBK+C.STAT  ;MORE OUTPUT FILES?
     92	000052	001404 				BEQ	60$		;BRANCH IF NOT
     93	000054	012701 				MOV	(PC)+,R1	;ELSE, DIAG -- TOO MANY OUTPUT FILES
     94	000056	   000G	   000G			.BYTE	E$R24,S$V0
     95	000060					CALL	$ERMSG		;SEND DIAGNOSTIC MESSAGE
     96	000064	016700 	000000G		60$:	MOV	$LBRPT,R0	;PUT LIBRARY FDB ADDR IN R0
     97	000070	012760 	000001 	000000 		MOV	#R.FIX,F.RTYP(R0)  ;SET FIXED LENGTH RECORDS
     98	000076					CLOSE$	R0		;CLOSE LIBRARY FILE
     99	000102					CLOSE$	$WRKPT		;CLOSE WORK FILE
    100	000112	000167 	000000G			JMP	$RSTRT		;ELSE, RESTART LIBRARIAN
    101
    102
    103		000001 				.END
LBRLCD	MACRO M1108  05-DEC-77 22:29  PAGE 2-2
SYMBOL TABLE

CS.DIF= 000002   	FD.CCL= 000002   	F.BKVB= 000064   	F.RTYP= 000000   	Q$$CMO= 000000
CS.DVF= 000004   	FD.CR = 000002   	F.CNTG= 000034   	F.STBK= 000036   	R$$11M= 000000
CS.EQU= 000040   	FD.DIR= 000010   	F.DFNB= 000046   	F.UNIT= 000136   	R.FIX = 000001
CS.INP= 000001   	FD.FTN= 000001   	F.DSPT= 000044   	F.URBD= 000020   	R.VAR = 000002
CS.MOR= 000020   	FD.INS= 000010   	F.DVNM= 000134   	F.VBN = 000064   	SP$SW = ****** GX
CS.NMF= 000001   	FD.PLC= 000004   	F.EFBK= 000010   	F.VBSZ= 000060   	S$V0  = ****** GX
CS.OUT= 000002   	FD.RAH= 000001   	F.EFN = 000050   	LISPT = ****** GX	S$$LIB= 000000
CS.WLD= 000010   	FD.RAN= 000002   	F.EOBB= 000032   	LI$SW = ****** GX	S.FATT= 000016
C.CMLD= 000002   	FD.REC= 000001   	F.ERR = 000052   	NB.DEV= 000200   	S.FDB = 000140
C.DEVD= 000006   	FD.RWM= 000001   	F.FACC= 000043   	NB.DIR= 000100   	S.FNAM= 000006
C.DIRD= 000012   	FD.SDI= 000020   	F.FFBY= 000014   	NB.NAM= 000004   	S.FNB = 000036
C.DSDS= 000006   	FD.SQD= 000040   	F.FNAM= 000110   	NB.SD1= 000400   	S.FNBW= 000017
C.FILD= 000016   	FD.TTY= 000004   	F.FNB = 000102   	NB.SD2= 001000   	S.FNTY= 000004
C.MKW1= 000024   	FD.WBH= 000002   	F.FTYP= 000116   	NB.SNM= 000040   	S.FTYP= 000002
C.MKW2= 000026   	FO.APD= 000106   	F.FVER= 000120   	NB.STP= 000020   	S.NFEN= 000020
C.SIZE= 000054   	FO.MFY= 000002   	F.HIBK= 000004   	NB.SVR= 000010   	$CSIBK= ****** GX
C.STAT= 000001   	FO.RD = 000001   	F.LUN = 000042   	NB.TYP= 000002   	$ERMSG= ****** GX
C.SWAD= 000022   	FO.UPD= 000006   	F.MBCT= 000054   	NB.VER= 000001   	$LBRPT= ****** GX
C.TYPR= 000000   	FO.WRT= 000016   	F.MBC1= 000055   	N.DID = 000024   	$LIS  = ****** GX
E$R24 = ****** GX	F.ALOC= 000040   	F.MBFG= 000056   	N.DVNM= 000032   	$LISCD  000000RG
FA.APD= 000100   	F.BBFS= 000062   	F.NRBD= 000024   	N.FID = 000000   	$LISPT= ****** GX
FA.CRE= 000010   	F.BDB = 000070   	F.NREC= 000030   	N.FNAM= 000006   	$RSTRT= ****** GX
FA.EXT= 000004   	F.BGBC= 000057   	F.OVBS= 000030   	N.FTYP= 000014   	$SCANO= ****** GX
FA.NSP= 000100   	F.BKDN= 000026   	F.RACC= 000016   	N.FVER= 000016   	$WRKPT= ****** GX
FA.RD = 000001   	F.BKDS= 000020   	F.RATT= 000001   	N.NEXT= 000022   	$$    = 000067
FA.SHR= 000040   	F.BKEF= 000050   	F.RCNM= 000034   	N.STAT= 000020   	.CLOSE= ****** G
FA.TMP= 000020   	F.BKP1= 000051   	F.RCTL= 000017   	N.UNIT= 000034   	...GBL= 000000
FA.WRT= 000002   	F.BKST= 000024   	F.RSIZ= 000002   	PAR$$$= 000067   	...TPC= 000140
FD.BLK= 000010

. ABS.	000000	   000
      	000116	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  1959 WORDS  ( 8 PAGES)
DYNAMIC MEMORY:  3104 WORDS  ( 11 PAGES)
ELAPSED TIME:  00:00:15
[42,10]LBRLCD,[42,20]LBRLCD/-SP=[42,30]LBRPRF,LBRLCD
LBRLI	MACRO M1108  05-DEC-77 22:30  PAGE 2


      1						.TITLE	LBRLI
      2						.IDENT	/X03.5/
      3
      4					;
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      6					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      7					;
      8					;	DEC ASSUMES NO RESPONSIBLIITY FOR THE USE
      9					;	OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT
     10					;	WHICH IS NOT SUPPLIED BY DEC.
     11					;
     12					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     13					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     14					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     15					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     16					;
     17					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     18					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     19					; EQUIPMENT CORPORATION.
     20					;
     21					; VERSION X03.4
     22					;
     23					; WRITTEN BY:
     24					;	GEORGE W. BERRY
     25					;
     26					; MODIFIED BY:
     27					;	C.A. D'ELIA	16-JUN-74
     28					;	C.A. D'ELIA	07-JUL-74  (VIRTUAL TABLES)
     29					;	THOMAS J. MILLER 01-NOV-74
     30					;			18-MAR-75
     31					;			26-FEB-75
     32					;			20-JUN-75
     33					;
     34					;
     35
     36					;
     37					; MACRO CALLS
     38					;
     39
     40						.MCALL	FCSBT$
     41	000000					FCSBT$
     42						.MCALL	FDOFF$
     43	000000					FDOFF$	DEF$L
     44						.MCALL	FILIO$
     45	000000					FILIO$
     46
     47						.MCALL	CLOSE$,PRINT$,QIO$,DIR$
     48
     49
     50						.IF NDF	S$$LIB
     51
     52						.MCALL	OPEN$W
     53
     54						.ENDC
     55
     56
     57					;
LBRLI	MACRO M1108  05-DEC-77 22:30  PAGE 2-1


     58					; LOCAL DATA
     59					;
     60
     61		000010 			LINSIZ=8.			;NUMBER OF EP'S LISTED PER LINE
     62
     63	000000				SAVR3:	.BLKW	1		;NEEDED TO SAVE R3 DURING EPT LISTING
     64	000002				NXTMNT:	.BLKW	1		;VIRTUAL LOCN OF NEXT MNT ENTRY
     65	000004				TYPASC:				;TABLE OF LIBRARY TYPE MESSAGE POINTERS
     66	000004	000015 				.WORD	OBJSIZ
     67	000006	000447'				.WORD	OBJSTR
     68	000010	000005 				.WORD	MACSIZ
     69	000012	000464'				.WORD	MACSTR
     70
     71
     72
     73					;
     74					; FORMAT STRINGS FOR DIRECTORY LISTING
     75					;
     76						.NLIST	BEX
     77	000014	   045 	   106 	   045 	HD1:	.ASCIZ	/%F%2NDIRECTORY OF FILE %X%N/
     78	000050	   045 	   126 	   101 	HD2AA:	.ASCIZ	/%VA/		;LIBRARY TYPE MESSAGE
     79	000054	   040 	   114 	   111 	HD2:	.ASCIZ	/ LIBRARY CREATED BY:  LBR V%2R%N/
     80	000115	   114 	   101 	   123 	HD2A:	.ASCIZ	/LAST INSERT OCCURRED %Y AT %3Z%N/
     81		000153'			CRLF	=.-3
     82
     83	000156	   115 	   116 	   124 	HD3:	.ASCIZ	/MNT ENTRIES ALLOCATED: %D; AVAILABLE: %D%N/
     84		000160'			HD3X	=HD3+2
     85	000231	   105 	   120 	   000 	HD4:	.ASCIZ	/EP/
     86	000234	   106 	   111 	   114 	HD5:	.ASCIZ	/FILE SPACE AVAILABLE: /
     87	000263	   122 	   105 	   103 	HD6:	.ASCIZ	/RECOVERABLE DELETED SPACE: /
     88	000317	   040 	   127 	   117 	HD6X:	.ASCIZ	/ WORDS%N/
     89	000330	   045 	   062 	   116 	HD7:	.ASCIZ	/%2N/
     90	000334	   045 	   116 	   052 	MN1:	.ASCIZ	/%N** MODULE:/
     91	000351	   045 	   062 	   122 	MN1X:	.ASCIZ	/%2R/
     92	000355	   040 	   040 	   123 	MN2:	.ASCIZ	/  SIZE:/
     93	000365	   040 	   040 	   111 	MN3:	.ASCIZ	/  INSERTED:%Y/
     94	000403	   040 	   040 	   111 	MN4P:	.ASCII	/  IDENT:%2R/
     95	000416	   045 	   116 	   000 	MN4A:	.ASCIZ	/%N/
     96	000421	   011 	   011 	   040 	OBJATR:	.ASCIZ	<11><11>/  ATTRIB:SS%N/	;SELECTIVE SEARCH OBJECT MODULE
     97	000441	   040 	   040 	   045 	MN4:	.ASCIZ	/  %2R/
     98	000447	   117 	   102 	   112 	OBJSTR:	.ASCII	/OBJECT MODULE/
     99		000015 			OBJSIZ=	.-OBJSTR
    100	000464	   115 	   101 	   103 	MACSTR:	.ASCII	/MACRO/
    101		000005 			MACSIZ=	.-MACSTR
    102
    103
    104						.EVEN
    105						.NLIST	BEX
    106
    107
    108					;+
    109					;**-$LIS-LIST DIRECTORY FUNCTION
    110					;
    111					; THIS ROUTINE OUTPUTS A LIBRARY DIRECTORY LISTING
    112					; ON THE SPECIFIED LISTING OUTPUT DEVICE. THERE
    113					; ARE THREE FORMS OF THIS DIRECTORY DEPENDING ON
    114					; WHETHER /EP AND/OR /FU ARE GIVEN, TO INDICATE
LBRLI	MACRO M1108  05-DEC-77 22:30  PAGE 2-2


    115					; THAT ENTRY POINTS AND FULL MODULE IDENTIFICATION
    116					; ARE TO BE LISTED.
    117					;
    118					; INPUTS:
    119					;
    120					;	NONE
    121					;
    122					; OUTPUTS:
    123					;
    124					;	NONE
    125					;
    126					;-
    127	000472				$LIS::	SAVRG			;SAVE R3-R5
    128	000476	012701 	000001 			MOV	#FO.RD,R1	;INDICATE OPEN FOR READ
    129	000502					CALL	$RDHD		;READ LIBRARY HEADER, EPT, & MNT
    130	000506	016700 	000000G			MOV	$LISPT,R0	;OUTPUT ON LISTING DEVICE
    131	000512					CALL	LISOUT		;INIT OUTPUT CO-ROUTINE
    132					;****	OUTPUT HEADER
    133	000516	022700 	000000G			CMP	#LISPT,R0	;CHECK FOR LIST FILE SPECIFIED
    134	000522	001013 				BNE	1$		;BRANCH IF NOT
    135
    136
    137						.IF NDF	S$$LIB
    138
    139
    140						OPEN$W	R0		;OPEN LISTING FILE
    141
    142						.IFF
    143
    144	000524	012701 	000016 			MOV	#FO.WRT,R1	;SPECIFY OPEN FOR WRITE
    145	000530					CALL	$OPEN		;PARSE FILENAME AND OPEN FILE
    146
    147
    148						.ENDC
    149
    150
    151	000534	103006 				BCC	1$		;BRANCH IF OPEN WAS OK
    152	000536	012701 				MOV	(PC)+,R1	;OPEN FAILURE ON FILE
    153	000540	   000G	   000G			.BYTE	E$R11,S$V2
    154	000542	016002 	000000G			MOV	R$NAME(R0),R2
    155	000546	000167 	000000G			JMP	$ERMSG		;FATAL ERROR EXIT
    156
    157	000552	012701 	000014'		1$:	MOV	#HD1,R1		;GET ADDRESS OF FORMAT STRING
    158	000556	010067 	000000G			MOV	R0,$OPNFL	;INDICATE FILE OPEN ON 'LISPT'
    159
    160
    161						.IF DF	Q$$CMO
    162
    163	000562	001003 				BNE	3$		;SKIP IF NOT QIO OUTPUT TO 'CMO'
    164	000564	012700 	000000G			MOV	#$CMOLN,R0	;PUT LUN IN R0
    165	000570	000406 				BR	5$		;BRANCH TO DO THE ATTACH
    166
    167						.ENDC
    168
    169
    170	000572	132760 	000004 	000017 	3$:	BITB	#FD.TTY,F.RCTL(R0) ;OUTPUTTING TO A TERMINAL DEVICE?
    171	000600	001405 				BEQ	10$		;BRANCH IF NOT
LBRLI	MACRO M1108  05-DEC-77 22:30  PAGE 2-3


    172	000602	116000 	000042 			MOVB	F.LUN(R0),R0	;PUT LUN IN R0
    173	000606				5$:	CALL	$TTYAT		;ATTACH THE TELETYPE
    174	000612	005721 				TST	(R1)+		;DON'T OUTPUT FORM-FEED
    175	000614	016700 	000000G		10$:	MOV	$LBRPT,R0	;OUTPUT LIBRARY FILENAME
    176	000620	016002 	000000G			MOV	R$NAME(R0),R2	;GET FILE NAME POINTER
    177	000624					CALL	@(SP)+		;CONVERT + OUTPUT
    178	000626	012701 	000050'			MOV	#HD2AA,R1	;POINT TO LIBRARY TYPE MESSAGE
    179	000632	116702 	000000G			MOVB	L$TYP,R2	;PICK UP LIBRARY TYPE
    180	000636	006302 				ASL	R2		;CONVERT TO DOUBLE WORD OFFSET
    181	000640	006302 				ASL	R2
    182	000642	062702 	000004'			ADD	#TYPASC,R2	;POINT INTO TABEL
    183	000646					CALL	@(SP)+		;PRINT IT
    184	000650	012702 	000000G			MOV	#L$VER,R2
    185	000654	012701 	000054'			MOV	#HD2,R1		;"CREATED BY LBR VXXX"
    186	000660					CALL	@(SP)+		;CONVERT AND OUTPUT
    187	000662	012701 	000115'			MOV	#HD2A,R1	;"LAST INSERT OCCURRED"
    188	000666	012702 	000000G			MOV	#L$DAT,R2
    189	000672					CALL	@(SP)+		;CONVERT AND OUTPUT
    190	000674	012702 	000000G			MOV	#L$MI,R2
    191	000700	012701 	000156'			MOV	#HD3,R1		;"MNT'S ALLOCATED"
    192	000704					CALL	@(SP)+		;CONVERT AND OUTPUT
    193	000706	012701 	000231'			MOV	#HD4,R1		;"EPT'S ALLOCATED"
    194	000712					CALL	@(SP)+		;CONVERT AND OUTPUT
    195	000714	012701 	000160'			MOV	#HD3X,R1
    196	000720	012702 	000000G			MOV	#L$EI,R2
    197	000724					CALL	@(SP)+
    198	000726	012701 	000234'			MOV	#HD5,R1		;FILE SPACE AVAILABLE
    199	000732					CALL	@(SP)+
    200	000734	012700 	000000G			MOV	#L$LA,R0	;GET ADDRESS OF SPACE AVAILABLE
    201	000740					CALL	WORDS
    202	000744	012701 	000317'			MOV	#HD6X,R1
    203	000750					CALL	@(SP)+		;OUTPUT END OF LINE
    204	000752	012700 	000000G			MOV	#L$LD,R0	;OUTPUT LOGICALLY DELETED SPACE
    205	000756	005720 				TST	(R0)+		;ONLY IF NON-ZERO
    206	000760	001002 				BNE	2$
    207	000762	005710 				TST	(R0)
    208	000764	001412 				BEQ	20$
    209	000766	012701 	000263'		2$:	MOV	#HD6,R1
    210	000772					CALL	@(SP)+
    211	000774	012700 	000000G			MOV	#L$LD,R0	;OUTPUT NON-ZERO DELETED SPACE
    212	001000					CALL	WORDS
    213	001004	012701 	000317'			MOV	#HD6X,R1
    214	001010					CALL	@(SP)+		;OUTPUT IT
    215	001012	012701 	000153'		20$:	MOV	#CRLF,R1	;END OF HEADER
    216	001016					CALL	@(SP)+
    217					;****	END OF HEADER
    218	001020	005003 				CLR	R3		;INIT PARTITION LIST OFFSET TO ZERO
    219	001022	016704 	000000G		21$:	MOV	$MNADR,R4	;GET ADDR OF MNT PARTITION LIST HEADS
    220	001026	060304 				ADD	R3,R4		;POINT R4 TO PROPER LIST HEAD
    221	001030	011401 			22$:	MOV	(R4),R1		;PUT VIRTUAL LOCN OF NEXT MNT ENTRY IN R1
    222	001032	001006 				BNE	23$		;BRANCH IF NOT AT END OF LIST
    223	001034	062703 	000002 			ADD	#2,R3		;UPDATE THE LIST OFFSET
    224	001040	020327 	000000C			CMP	R3,#<NU$PAR*2>-2  ;COMPARE WITH MAXIMUM
    225	001044	003161 				BGT	90$		;BRANCH IF AT THE END OF THE TABLE
    226	001046	000765 				BR	21$		;ELSE, GET ENTRIES FROM NEXT PARTITION LIST
    227	001050				23$:	CALL	$CVRL		;OBTAIN REAL ADDR OF THE MNT ENTRY
    228	001054	010004 				MOV	R0,R4		;COPY IT INTO R4
LBRLI	MACRO M1108  05-DEC-77 22:30  PAGE 2-4


    229	001056	011067 	176720 			MOV	(R0),NXTMNT	;SAVE VIRTUAL LOCN OF NEXT MNT ENTRY
    230	001062	005760 	000006 			TST	6(R0)		;EXAMINE ASSOCIATED MODULE HEADER ADDR
    231	001066	001760 				BEQ	22$		;BRANCH IF SYMBOL IS LOGICALLY DELETED
    232	001070	032767 	000000G	000000G		BIT	#LE$SW,$SWTCH	;EPT LISTING DESIRED?
    233	001076	001403 				BEQ	24$		;BRANCH IF NOT
    234	001100	012701 	000334'			MOV	#MN1,R1		;IF TRUE, PROVIDE '** MODULE:'
    235	001104					CALL	@(SP)+
    236
    237	001106	012701 	000351'		24$:	MOV	#MN1X,R1
    238	001112	010402 				MOV	R4,R2		;PUT ADDRESS OF MNT ENTRY IN R2
    239	001114	005722 				TST	(R2)+		;SKIP PAST THE LINK--PNT TO MODULE NAME
    240	001116					CALL	@(SP)+		;OUTPUT MODULE NAME
    241	001120	032767 	000000G	000000G		BIT	#FU$SW,$SWTCH	;FULL MODULE ID NEEDED?
    242	001126	001446 				BEQ	30$		;BRANCH IF NOT
    243	001130	010401 				MOV	R4,R1		;PUT ADDR OF MNT ENTRY IN R1
    244	001132	062701 	000006 			ADD	#6,R1		;POINT R1 TO MODULE HEADER ADDR
    245	001136					CALL	$RDMH		;READ THE MODULE HEADER
    246	001142	103006 				BCC	25$
    247	001144	012701 				MOV	(PC)+,R1	;CAN'T READ MODULE HEADER
    248	001146	   000G	   000G			.BYTE	E$R10,S$V2
    249	001150	016002 	000000G			MOV	R$NAME(R0),R2	;PNT R2 TO FILE NAME
    250	001154	000167 	000000G			JMP	$ERMSG		;FATAL ERROR EXIT
    251
    252	001160	012701 	000355'		25$:	MOV	#MN2,R1
    253	001164					CALL	@(SP)+
    254	001166	012700 	000000G			MOV	#$MOSZ,R0
    255	001172					CALL	WORDS		;OUTPUT MODULE SIZE
    256					;****	OUTPUT TYPE DEPENDENT INFORMATION
    257	001176	012701 	000365'			MOV	#MN3,R1
    258	001202	012702 	000000G			MOV	#$MHDA,R2	;POINT TO ARGUMENTS
    259	001206					CALL	@(SP)+
    260	001210	012701 	000403'			MOV	#MN4P,R1	;POINT TO OUTPUT LINE
    261	001214	105767 	000000G			TSTB	L$TYP		;ALL SET IF OBJ TYPE
    262	001220	001402 				BEQ	27$		;BRANCH IF SO
    263	001222	012701 	000416'			MOV	#MN4A,R1	;OTHERWISE JUST OUTPUT <CR><LF>
    264	001226				27$:	CALL	@(SP)+
    265	001230	105767 	000000G			TSTB	$MHAT		;CHECK MODULE ATTRIBUTES
    266	001234	001403 				BEQ	30$		;BRANCH IF NONE PRESENT
    267	001236	012701 	000421'			MOV	#OBJATR,R1	;ONLY ATTRIBUTE IS 'SELECTIVE SEARCH'
    268	001242					CALL	@(SP)+		;ADD IT TO MODULE INFORMATION
    269	001244	012701 	000153'		30$:	MOV	#CRLF,R1
    270	001250					CALL	@(SP)+
    271					;****
    272	001252	032767 	000000G	000000G		BIT	#LE$SW,$SWTCH	;LIST ENTRY POINTS?
    273	001260	001663 				BEQ	22$		;BRANCH IF NO
    274	001262	012701 	000153'			MOV	#CRLF,R1
    275	001266					CALL	@(SP)+		;PUT OUT A BLANK LINE BEFORE EPT
    276	001270	012702 	000000G			MOV	#$EPBLK,R2	;GET PARAMETER BLOCK FOR ASSOCIATIVE SEARCH
    277	001274	016400 	000006 			MOV	6(R4),R0	;PUT MODULE HEADER ADDR (VBN ...
    278	001300	016401 	000010 			MOV	8.(R4),R1	;... AND OFFSET) IN R0-R1
    279	001304					CALL	$FINDC		;START CONTINUOUS ASSOCIATIVE SEARCH
    280	001310	103434 				BCS	50$		;GET NEXT MNT IF NOTHING FOUND
    281	001312	010367 	176462 			MOV	R3,SAVR3	;SAVE R3
    282	001316	005003 				CLR	R3		;R3 KEEPS NUMBER OF EPT'S IN OUTPUT LINE
    283	001320	012701 	000441'		35$:	MOV	#MN4,R1		;OUTPUT NAME
    284	001324	010002 				MOV	R0,R2		;COPY ADDR OF EPT ENTRY INTO R2
    285	001326	005722 				TST	(R2)+		;SKIP PAST THE LINK WORD
LBRLI	MACRO M1108  05-DEC-77 22:30  PAGE 2-5


    286	001330					CALL	@(SP)+		;OUTPUT EPT NAME
    287	001332	005203 				INC	R3		;INCREMENT EP'S PER LINE COUNT
    288	001334	022703 	000010 			CMP	#LINSIZ,R3	;CHECK FOR FULL LINE
    289	001340	001004 				BNE	38$		;BRANCH IF NOT
    290	001342	012701 	000153'			MOV	#CRLF,R1	;OUTPUT THE LINE
    291	001346					CALL	@(SP)+
    292	001350	005003 				CLR	R3		;AND CLEAR FLAG
    293	001352				38$:	CALL	$FINDN		;CONTINUE SEARCH
    294	001356	103360 				BCC	35$		;UNTIL NO MORE FOUND
    295	001360	012701 	000330'			MOV	#HD7,R1		;OUTPUT TWO CRLF'S
    296	001364	005703 				TST	R3		;UNLESS WE'RE ALREADY AT THE
    297									;START OF A LINE
    298	001366	001002 				BNE	40$
    299	001370	012701 	000153'			MOV	#CRLF,R1
    300	001374				40$:	CALL	@(SP)+		;OUTPUT A CR-LF
    301	001376	016703 	176376 			MOV	SAVR3,R3	;RESTORE R3
    302	001402	012704 	000002'		50$:	MOV	#NXTMNT,R4	;PNT R4 TO VIRTUAL LOCN OF NEXT MNT ENTRY
    303	001406	000610 				BR	22$		;CONTINUE WITH NEXT MNT ENTRY
    304
    305	001410	012701 	000330'		90$:	MOV	#HD7,R1
    306	001414					CALL	@(SP)+		;OUTPUT A COUPLE CRLF'S TO FINISH
    307	001416	005726 				TST	(SP)+		;FLUSH CO-ROUTINE FROM STACK
    308	001420	032767 	000000G	000000G		BIT	#SP$SW,$SWTCH	;SPOOLING REQUESTED?
    309	001426	001000 				BNE	91$		;BRANCH IF /-SP
Q   310	001430					PRINT$	$LISPT		;SPOOL OUTPUT IF NEEDED
    311	001430	016700 	000000G		91$:	MOV	$LISPT,R0	;PUT ADDR OF LISTING FDB, ETC IN R0
    312
    313
    314						.IF DF	Q$$CMO
    315
    316
    317	001434	001407 				BEQ	95$		;SKIP IF OUTPUT TO 'CMO' VIA QIO
    318
    319
    320						.ENDC
    321
    322
    323	001436					CLOSE$	R0		;CLOSE LISTING FILE
    324	001442	005067 	000000G			CLR	$OPNFL		;INDICATE LIBRARY ONLY OPEN FILE
    325	001446	105767 	000000G			TSTB	$ATTFG		;CHECK THE TTY ATTACHED FLAG
    326	001452	001402 				BEQ	100$		;BRANCH TO LEAVE IF NOT ATTACHED
    327	001454				95$:	CALL	$TTYDT		;DETACH THE TELETYPE
    328	001460				100$:	RETURN			;AND EXIT
    329					;+
    330					;
    331					; THIS ROUTINE TAKES A DOUBLE PRECISION VALUE (# OF BYTES)
    332					; AND CONVERTS IT TO A STRING DISPLAYING THE VALUE (DIVIDING THE
    333					; VALUE BY 2 TO DISPLAY # OF WORDS)
    334					;
    335					; INPUTS:
    336					;
    337					;	R0 = ADDRESS OF VALUE (IN ADDR AND ADDR+2)
    338					;
    339					; OUTPUTS:
    340					;
    341					;	R0,R1,R2  ARE LOST
    342					;
LBRLI	MACRO M1108  05-DEC-77 22:30  PAGE 2-6


    343					;-
    344	001462				WORDS:	SAVRG			;SAVE R3-R5
    345	001466	012004 				MOV	(R0)+,R4
    346	001470	011005 				MOV	(R0),R5		;GET DOUBLE PRECISION VALUE
    347	001472					DIV	#20000.,R4	;SPLIT VALUE INTO TWO PARTS
    348	001502	016700 	000000G			MOV	$LIPTR,R0	;POINT R0 TO OUTPUT FDB, ETC
    349	001506	010401 				MOV	R4,R1		;GET HIGH ORDER VALUE
    350	001510	001412 				BEQ	10$		;DON'T OUTPUT IF ZERO
    351	001512	005002 				CLR	R2		;ZERO SUPPRESS
    352	001514					CALL	$CBDMG		;CONVERT VALUE
    353	001520	114046 				MOVB	-(R0),-(SP)	;SAVE LAST CHAR
    354	001522	010702 				MOV	PC,R2		;NON-ZERO VALUE TO ZERO SUPPRESS FLAG
    355	001524					CALL	10$		;GET LOW ORDER STRING
    356	001530	112660 	177773 			MOVB	(SP)+,-5(R0)	;RESET STORED DIGIT
    357	001534					RETURN
    358
    359	001536	006205 			10$:	ASR	R5		;DIVIDE IN HALF FOR WORDS
    360	001540	010501 				MOV	R5,R1
    361	001542					CALL	$CBDMG		;CONVERT VALUE
    362	001546	010067 	000000G			MOV	R0,$LIPTR	;RESTORE $LIPTR
    363	001552					RETURN
    364
    365
    366					;
    367					; LISOUT--LISTING OUTPUT CO-ROUTINE
    368					;
    369
    370	001554				LISOUT:	CALL	$OUT		;INIT MESSAGE OUTPUT ROUTINE
    371	001560				10$:	CALL	@(SP)+		;RETURN VIA CO-ROUTINE CALL
    372	001562					CALL	$OUT1		;CALL MESSAGE OUTPUT ROUTINE
    373	001566	000774 				BR	10$
    374
    375
    376
    377		000001 				.END
LBRLI	MACRO M1108  05-DEC-77 22:30  PAGE 2-7
SYMBOL TABLE

CRLF  = 000153R  	F.CNTG= 000034   	HD6X    000317R  	MACSIZ= 000005   	S$$LIB= 000000
E$R10 = ****** GX	F.DFNB= 000046   	HD7     000330R  	MACSTR  000464R  	S.FATT= 000016
E$R11 = ****** GX	F.DSPT= 000044   	IO.ACE= 007400   	MN1     000334R  	S.FDB = 000140
FA.APD= 000100   	F.DVNM= 000134   	IO.ACR= 006400   	MN1X    000351R  	S.FNAM= 000006
FA.CRE= 000010   	F.EFBK= 000010   	IO.ACW= 007000   	MN2     000355R  	S.FNB = 000036
FA.EXT= 000004   	F.EFN = 000050   	IO.APC= 014000   	MN3     000365R  	S.FNBW= 000017
FA.NSP= 000100   	F.EOBB= 000032   	IO.APV= 014010   	MN4     000441R  	S.FNTY= 000004
FA.RD = 000001   	F.ERR = 000052   	IO.ATT= 001400   	MN4A    000416R  	S.FTYP= 000002
FA.SHR= 000040   	F.FACC= 000043   	IO.CLN= 003400   	MN4P    000403R  	S.NFEN= 000020
FA.TMP= 000020   	F.FFBY= 000014   	IO.CRE= 012000   	NB.DEV= 000200   	TYPASC  000004R
FA.WRT= 000002   	F.FNAM= 000110   	IO.DAC= 010000   	NB.DIR= 000100   	WORDS   001462R
FD.BLK= 000010   	F.FNB = 000102   	IO.DEL= 012400   	NB.NAM= 000004   	$ATTFG= ****** GX
FD.CCL= 000002   	F.FTYP= 000116   	IO.DET= 002000   	NB.SD1= 000400   	$CBDMG= ****** GX
FD.CR = 000002   	F.FVER= 000120   	IO.ENA= 006000   	NB.SD2= 001000   	$CMOLN= ****** GX
FD.DIR= 000010   	F.HIBK= 000004   	IO.EXT= 011400   	NB.SNM= 000040   	$CVRL = ****** GX
FD.FTN= 000001   	F.LUN = 000042   	IO.FNA= 004400   	NB.STP= 000020   	$EPBLK= ****** GX
FD.INS= 000010   	F.MBCT= 000054   	IO.KIL= 000012   	NB.SVR= 000010   	$ERMSG= ****** GX
FD.PLC= 000004   	F.MBC1= 000055   	IO.LOV= 001010   	NB.TYP= 000002   	$FINDC= ****** GX
FD.RAH= 000001   	F.MBFG= 000056   	IO.LTK= 000050   	NB.VER= 000001   	$FINDN= ****** GX
FD.RAN= 000002   	F.NRBD= 000024   	IO.RAT= 013000   	NU$PAR= ****** GX	$LBRPT= ****** GX
FD.REC= 000001   	F.NREC= 000030   	IO.RDN= 000022   	NXTMNT  000002R  	$LDIV = ****** GX
FD.RWM= 000001   	F.OVBS= 000030   	IO.RLB= 001000   	N.DID = 000024   	$LIPTR= ****** GX
FD.SDI= 000020   	F.RACC= 000016   	IO.RNA= 005400   	N.DVNM= 000032   	$LIS    000472RG
FD.SQD= 000040   	F.RATT= 000001   	IO.RTK= 000060   	N.FID = 000000   	$LISPT= ****** GX
FD.TTY= 000004   	F.RCNM= 000034   	IO.RVB= 010400   	N.FNAM= 000006   	$MHAT = ****** GX
FD.WBH= 000002   	F.RCTL= 000017   	IO.UNL= 000042   	N.FTYP= 000014   	$MHDA = ****** GX
FO.APD= 000106   	F.RSIZ= 000002   	IO.WAT= 013400   	N.FVER= 000016   	$MNADR= ****** GX
FO.MFY= 000002   	F.RTYP= 000000   	IO.WLB= 000400   	N.NEXT= 000022   	$MOSZ = ****** GX
FO.RD = 000001   	F.STBK= 000036   	IO.WVB= 011000   	N.STAT= 000020   	$OPEN = ****** GX
FO.UPD= 000006   	F.UNIT= 000136   	IQ.Q  = 000002   	N.UNIT= 000034   	$OPNFL= ****** GX
FO.WRT= 000016   	F.URBD= 000020   	IQ.X  = 000001   	OBJATR  000421R  	$OUT  = ****** GX
FU$SW = ****** GX	F.VBN = 000064   	LE$SW = ****** GX	OBJSIZ= 000015   	$OUT1 = ****** GX
F.ALOC= 000040   	F.VBSZ= 000060   	LINSIZ= 000010   	OBJSTR  000447R  	$RDHD = ****** GX
F.BBFS= 000062   	HD1     000014R  	LISOUT  001554R  	PAR$$$= 000000   	$RDMH = ****** GX
F.BDB = 000070   	HD2     000054R  	LISPT = ****** GX	Q$$CMO= 000000   	$SAVRG= ****** GX
F.BGBC= 000057   	HD2A    000115R  	L$DAT = ****** GX	R$NAME= ****** GX	$SWTCH= ****** GX
F.BKDN= 000026   	HD2AA   000050R  	L$EI  = ****** GX	R$$11M= 000000   	$TTYAT= ****** GX
F.BKDS= 000020   	HD3     000156R  	L$LA  = ****** GX	R.FIX = 000001   	$TTYDT= ****** GX
F.BKEF= 000050   	HD3X  = 000160R  	L$LD  = ****** GX	R.VAR = 000002   	$$    = 000067
F.BKP1= 000051   	HD4     000231R  	L$MI  = ****** GX	SAVR3   000000R  	.CLOSE= ****** G
F.BKST= 000024   	HD5     000234R  	L$TYP = ****** GX	SP$SW = ****** GX	...GBL= 000000
F.BKVB= 000064   	HD6     000263R  	L$VER = ****** GX	S$V2  = ****** GX	...TPC= 000140

. ABS.	000000	   000
      	001570	   001
ERRORS DETECTED:  1

VIRTUAL MEMORY USED:  2673 WORDS  ( 11 PAGES)
DYNAMIC MEMORY:  3104 WORDS  ( 11 PAGES)
ELAPSED TIME:  00:00:31
[42,10]LBRLI,[42,20]LBRLI/-SP=[42,30]LBRPRF,LBRLI
LBRNXT	MACRO M1108  05-DEC-77 22:30  PAGE 2


      1						.TITLE	LBRNXT
      2						.IDENT	/02/
      3
      4					;
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      6					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      7					;
      8					;	DEC ASSUMES NO RESPONSIBLIITY FOR THE USE
      9					;	OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT
     10					;	WHICH IS NOT SUPPLIED BY DEC.
     11					;
     12					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     13					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     14					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     15					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     16					;
     17					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     18					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     19					; EQUIPMENT CORPORATION.
     20					;
     21					; VERSION 02
     22					;
     23					; WRITTEN BY:
     24					;	GEORGE W. BERRY
     25					;
     26					; MODIFIED BY:
     27					;	C.A. D'ELIA	10-JUN-74
     28					;
     29					;
     30
     31					;+
     32					;
     33					; **-$NEXT- COMPUTE NEXT MODULE HEADER ADDRESS
     34					;
     35					; THIS ROUTINE COMPUTES THE ADDRESS OF THE NEXT MODULE HEADER.
     36					;
     37					; INPUTS:
     38					;
     39					;	R1 = VBN OF CURRENT MODULE HEADER
     40					;	R2 = BYTE-IN-BLOCK OF CURRENT MODULE HEADER
     41					;	MODULE HEADER BLOCK IS SET UP
     42					;
     43					; OUTPUTS:
     44					;
     45					;	R0 IS UNCHANGED
     46					;	R1 = BLOCK OF NEXT MODULE HEADER
     47					;	R2 = BYTE-IN-BLOCK OF NEXT MODULE HEADER
     48					;
     49					;-
     50	000000				$NEXT::	SAVRG			;SAVE R3-R5
     51	000004	016704 	000000G			MOV	$MOSZ,R4	;GET MODULE SIZE
     52	000010	016705 	000002G			MOV	$MOSZ+2,R5
     53	000014	060205 				ADD	R2,R5		;COMPUTE UPDATED BYTE IN BLOCK
     54	000016	005504 				ADC	R4		;(DOUBLE PRECISION)
     55	000020	010502 				MOV	R5,R2
     56	000022	042702 	177000 			BIC	#177000,R2	;R2 = NEXT M.H. BYTE-IN-BLOCK
     57
LBRNXT	MACRO M1108  05-DEC-77 22:30  PAGE 2-1


     58
     59						.IF DF	R$$EIS
     60
     61
     62						ASHC	#-9.,R4		;DIVIDE BY 512. TO GET BLOCKS
     63
     64						.IFF
     65
     66	000026	105005 				CLRB	R5		;DIVIDE THE DOUBLE WORD  ...
     67	000030	150405 				BISB	R4,R5		;... NUMBER IN R4-R5 ...
     68	000032	000305 				SWAB	R5		;... BY ...
     69	000034	105004 				CLRB	R4		;... 256.
     70	000036	000304 				SWAB	R4		;
     71	000040	006204 				ASR	R4		;MAKE FINAL RESULT A DIVISION ...
     72	000042	006005 				ROR	R5		;... BY 512.
     73
     74
     75						.ENDC
     76
     77
     78	000044	060501 				ADD	R5,R1		;AND UPDATE BLOCK NUMBER
     79	000046					RETURN
     80
     81
     82		000001 				.END
LBRNXT	MACRO M1108  05-DEC-77 22:30  PAGE 2-2
SYMBOL TABLE

Q$$CMO= 000000   	S$$LIB= 000000   	$MOSZ = ****** GX	$NEXT   000000RG 	$SAVRG= ****** GX
R$$11M= 000000

. ABS.	000000	   000
      	000050	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  440 WORDS  ( 2 PAGES)
DYNAMIC MEMORY:  3104 WORDS  ( 11 PAGES)
ELAPSED TIME:  00:00:04
[42,10]LBRNXT,[42,20]LBRNXT/-SP=[42,30]LBRPRF,LBRNXT
LBROUT	MACRO M1108  05-DEC-77 22:30  PAGE 2


      1						.TITLE	LBROUT
      2						.IDENT	/03/
      3
      4					;
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      6					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      7					;
      8					;	DEC ASSUMES NO RESPONSIBLIITY FOR THE USE
      9					;	OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT
     10					;	WHICH IS NOT SUPPLIED BY DEC.
     11					;
     12					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     13					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     14					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     15					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     16					;
     17					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     18					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     19					; EQUIPMENT CORPORATION.
     20					;
     21					; VERSION 03
     22					;
     23					; WRITTEN BY:
     24					;	GEORGE W. BERRY
     25					;
     26					; MODIFIED BY:
     27					;	C.A. D'ELIA	07-JUL-74
     28					;
     29					;
     30
     31					;
     32					; LOCAL ASSIGNMENTS
     33					;
     34
     35		000012 			LF = 12				;LINE FEED CHARACTER CODE
     36
     37					;
     38					; MACRO CALLS
     39					;
     40
     41						.MCALL	FDOFF$,PUT$
     42	000000					FDOFF$	DEF$L
     43
     44					;+
     45					;
     46					; **-$OUT- INITIALIZE OUTPUT ROUTINE
     47					; **-$OUT1- MESSAGE OUTPUT ROUTINE
     48					;
     49					; THIS ROUTINE CONVERTS AND OUTPUTS A FORMATTED TEXT LINE.
     50					; FIRST CALL TO '$OUT', THEN CALLS TO '$OUT1'.  INITIALLY IT
     51					; SETS UP "$LIPTR" TO POINT TO THE START OF THE OUTPUT BUFFER,
     52					; AND "LIFDB" TO THE ADDRESS OF THE OUTPUT FDB.
     53					;
     54					; INPUTS:
     55					;
     56					;	FIRST CALL TO $OUT -- R0=FDB ADDRESS
     57					;	CALLS TO $OUT1 -- R1, R2 SET UP FOR CALL TO $EDMSG
LBROUT	MACRO M1108  05-DEC-77 22:30  PAGE 2-1


     58					;
     59					; OUTPUTS:
     60					;
     61					;	R0,R1,R2  ARE LOST
     62					;
     63					;-
     64
     65
     66	000000					.PSECT	OUTBUF,D,GBL,OVR
     67
     68					;
     69					; LOCAL DATA BASE:
     70					;
     71	000000				LIFDB:	.BLKW	1		;POINTER TO OUTPUT FDB
     72	000002				$LIPTR::.BLKW	1		;LAST CHARACTER OUTPUT
     73	000004				LIBUF:	.BLKB	74.		;OUTPUT BUFFER
     74
     75
     76	000000					.PSECT
     77
     78						.ENABL	LSB
     79
     80	000000	010067 	000000'		$OUT::	MOV	R0,LIFDB	;SET UP FDB POINTER
     81	000004	012767 	000004'	000002'	20$:	MOV	#LIBUF,$LIPTR	;SAVE BUFFER ADDRESS
     82	000012				10$:	RETURN			;
     83	000014	016700 	000002'		$OUT1::	MOV	$LIPTR,R0	;OUTPUT BUFFER ADDRESS
     84	000020	032702 	000001 			BIT	#1,R2		;MUST FORCE R2 TO BE EVEN ...
     85	000024	001401 				BEQ	15$		;... WHENEVER WE CALL '$EDMSG'
     86	000026	010702 				MOV	PC,R2		;
     87	000030				15$:	CALL	$EDMSG		;FORMAT THE OUTPUT STRING
     88	000034	010067 	000002'			MOV	R0,$LIPTR	;SAVE NEXT CHAR ADDR
     89	000040	122740 	000012 			CMPB	#LF,-(R0)	;END OF LINE IN BUFFER?
     90	000044	001362 				BNE	10$		;BRANCH IF NOT A FULL LINE
     91	000046	162700 	000003'			SUB	#LIBUF-1,R0	;COMPUTE # OF CHARS TO OUTPUT
     92	000052	010001 				MOV	R0,R1		;USE R1 FOR COUNT
     93
     94
     95						.IF DF	Q$$CMO
     96
     97
     98	000054	005767 	000000'			TST	LIFDB		;DO WE HAVE A VALID FDB ADDRESS?
     99	000060	001005 				BNE	30$		;SKIP IF TRUE
    100	000062	012700 	000004'			MOV	#LIBUF,R0	;ELSE, PUT BUFFER ADDR IN R0
    101	000066					CALL	$QIOMG		;SEND MESSAGE TO CMD OUTPUT (VIA QIO)
    102	000072	000411 				BR	40$		;BRANCH INTO COMMON CODE
    103	000074				30$:
    104
    105						.ENDC
    106
    107
    108	000074					PUT$	LIFDB,#LIBUF,R1 ;OUTPUT THE STRING
    109	000116	103332 			40$:	BCC	20$
    110	000120	016002 	000000G			MOV	R$NAME(R0),R2
    111	000124	012701 				MOV	(PC)+,R1	;FATAL OUTPUT ERROR
    112	000126	   000G	   000G			.BYTE	E$R02,S$V2
    113	000130	000167 	000000G			JMP	$ERMSG		;FATAL -- ERROR EXIT
    114
LBROUT	MACRO M1108  05-DEC-77 22:30  PAGE 2-2


    115					;
    116		000001 				.END
LBROUT	MACRO M1108  05-DEC-77 22:30  PAGE 2-3
SYMBOL TABLE

E$R02 = ****** GX	F.EFN = 000050   	F.OVBS= 000030   	N.DVNM= 000032   	S.FNAM= 000006
F.ALOC= 000040   	F.EOBB= 000032   	F.RACC= 000016   	N.FID = 000000   	S.FNB = 000036
F.BBFS= 000062   	F.ERR = 000052   	F.RATT= 000001   	N.FNAM= 000006   	S.FNBW= 000017
F.BDB = 000070   	F.FACC= 000043   	F.RCNM= 000034   	N.FTYP= 000014   	S.FNTY= 000004
F.BGBC= 000057   	F.FFBY= 000014   	F.RCTL= 000017   	N.FVER= 000016   	S.FTYP= 000002
F.BKDN= 000026   	F.FNAM= 000110   	F.RSIZ= 000002   	N.NEXT= 000022   	S.NFEN= 000020
F.BKDS= 000020   	F.FNB = 000102   	F.RTYP= 000000   	N.STAT= 000020   	$EDMSG= ****** GX
F.BKEF= 000050   	F.FTYP= 000116   	F.STBK= 000036   	N.UNIT= 000034   	$ERMSG= ****** GX
F.BKP1= 000051   	F.FVER= 000120   	F.UNIT= 000136   	PAR$$$= 000067   	$LIPTR  000002RG    002
F.BKST= 000024   	F.HIBK= 000004   	F.URBD= 000020   	Q$$CMO= 000000   	$OUT    000000RG
F.BKVB= 000064   	F.LUN = 000042   	F.VBN = 000064   	R$NAME= ****** GX	$OUT1   000014RG
F.CNTG= 000034   	F.MBCT= 000054   	F.VBSZ= 000060   	R$$11M= 000000   	$QIOMG= ****** GX
F.DFNB= 000046   	F.MBC1= 000055   	LF    = 000012   	S$V2  = ****** GX	$$    = 000067
F.DSPT= 000044   	F.MBFG= 000056   	LIBUF   000004R     002	S$$LIB= 000000   	.PUT  = ****** G
F.DVNM= 000134   	F.NRBD= 000024   	LIFDB   000000R     002	S.FATT= 000016   	...TPC= 000140
F.EFBK= 000010   	F.NREC= 000030   	N.DID = 000024   	S.FDB = 000140

. ABS.	000000	   000
      	000134	   001
OUTBUF	000116	   002
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  1734 WORDS  ( 7 PAGES)
DYNAMIC MEMORY:  3104 WORDS  ( 11 PAGES)
ELAPSED TIME:  00:00:11
[42,10]LBROUT,[42,20]LBROUT/-SP=[42,30]LBRPRF,LBROUT
LBRPUT	MACRO M1108  05-DEC-77 22:31  PAGE 2


      1						.TITLE	LBRPUT
      2						.IDENT	/X03.1/
      3
      4					;
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  07754
      6					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      7					;
      8					;	DEC ASSUMES NO RESPONSIBLIITY FOR THE USE
      9					;	OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT
     10					;	WHICH IS NOT SUPPLIED BY DEC.
     11					;
     12					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     13					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     14					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     15					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     16					;
     17					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     18					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     19					; EQUIPMENT CORPORATION.
     20					;
     21					; VERSION X03.1
     22					;
     23					; WRITTEN BY:
     24					;	GEORGE W. BERRY
     25					;
     26					; MODIFIED BY:
     27					;	C.A. D'ELIA	10-JUN-74
     28					;	C.A. D'ELIA	02-JUL-74  (VIRTUAL TABLES)
     29					;	THOMAS J. MILLER 29-OCT-74
     30					;
     31					;
LBRPUT	MACRO M1108  05-DEC-77 22:31  PAGE 3


     33					;+
     34					; **-PUT- PUT AN ENTRY IN A TABLE
     35					;
     36					; INPUTS:
     37					;
     38					;	R1 - POINTS TO FIRST WORD OF NAME
     39					;	R2 - POINTS TO TABLE DESCRIPTOR BLOCK
     40					;	R4 - POINTS TO NUMBER OF ENTRIES AVAILABLE
     41					;
     42					;	WHERE THE FORMAT FOR THE DESCRIPTOR BLOCK IS
     43					;	AS FOLLOWS:
     44					;	       .WORD	SIZE
     45					;	       .WORD	ADDR
     46					;		.WORD	NUMBER
     47					;	  SIZE = SIZE OF ENTRIES
     48					;	  ADDR = ADDRESS OF FIRST ENTRY
     49					;	NUMBER = NUMBER OF ENTRIES IN THE TABLE
     50					;
     51					; OUTPUTS:
     52					;
     53					;	R0 AND R2 ARE LOST
     54					;	ALL OTHER REGISTERS PRESERVED
     55					;
     56					;-
     57
     58						.ENABL	LSB
     59
     60	000000	005714 			PUT::	TST	(R4)		;ARE ANY ENTRIES AVAILABLE?
     61	000002	001463 				BEQ	30$		;ERROR IF NOT
     62	000004					CALL	10$		;PUT THE ENTRY IN THE DESIRED TABLE
     63	000010	005314 				DEC	(R4)		;DECREMENT ENTRIES AVAILABLE COUNT
     64	000012					RETURN
     65
     66	000014				10$:	SAVRG			;SAVE R3-R5
     67	000020	022711 				CMP	(PC)+,(R1)	;NAME TOO LOW?
     68	000022	003100 				.RAD50	/A  /
     69	000024	101011 				BHI	15$		;ERROR IF SO
     70	000026	010146 				MOV	R1,-(SP)	;SAVE ADDR OF SYMBOL IN THE GSD RECORD
     71	000030	010203 				MOV	R2,R3		;SAVE ADDR OF TABLE DESCRIPTOR BLOCK
     72	000032	012100 				MOV	(R1)+,R0	;R0 GETS FIRST HALF OF SYMBOL
     73	000034	011101 				MOV	(R1),R1		;AND R1 GETS THE SECOND HALF
     74	000036					CALL	$FINDA		;SEARCH TABLE TO FIND SLOT FOR SYMBOL
     75	000042	103053 				BCC	REPLAC		;MATCH FOUND--THIS MAY REQUIRE A REPLACEMENT
     76	000044	005702 				TST	R2		;WAS A SLOT FOUND?
     77	000046	001403 				BEQ	20$		;BRANCH IF TRUE
     78	000050	012701 			15$:	MOV	(PC)+,R1	;ELSE, SYMBOL IS TOO BIG
     79	000052	   000G	   000G			.BYTE	E$R30,S$V2	;INVALID INPUT MODULE FORMAT
     80	000054	000440 				BR	35$		;FATAL ERROR
     81
     82	000056	005701 			20$:	TST	R1		;IS LINK TO SLOT A LIST HEAD?
     83	000060	001403 				BEQ	22$		;BRANCH IF TRUE
     84	000062	005760 	000006 			TST	6(R0)		;ELSE, IS LINK TO SLOT LOGICALLY DELETED?
     85	000066	001475 				BEQ	RPLAC0		;YES, TREAT AS A MODIFIED REPLACE
     86	000070	010004 			22$:	MOV	R0,R4		;PUT ADDR OF LINK TO SLOT IN R4
     87	000072	010105 				MOV	R1,R5		;PUT VIRTUAL LOCN OF LINK TO SLOT IN R5
     88	000074	001402 				BEQ	25$		;BRANCH IF LINK IS A LIST HEAD
     89	000076					CALL	$LCKPG		;ELSE, LOCK THE PAGE CONTAINING THE LINK
LBRPUT	MACRO M1108  05-DEC-77 22:31  PAGE 3-1


     90	000102	011301 			25$:	MOV	(R3),R1		;GET ENTRY SIZE IN R1
     91	000104	062701 	000002 			ADD	#2,R1		;ADD IN ROOM FOR A LINK WORD
     92	000110					CALL	$ALVRT		;ALLOCATE VIRTUAL MEMORY FOR THE ENTRY + LINK
     93	000114					CALL	$NWLNK		;UNLOCK OLD LINK AND INSERT NEW ENTRY
     94	000120	005724 			PUT1:	TST	(R4)+		;POINT R4 PAST THE NEW ENTRY'S LINK WORD
     95	000122	012601 				MOV	(SP)+,R1	;RESTORE ADDR OF SYMBOL IN THE GSD
     96	000124	010103 				MOV	R1,R3		;COPY THE ADDRESS INTO R3
     97	000126	012324 				MOV	(R3)+,(R4)+	;TRANSFER SYMBOL NAME INTO ...
     98	000130	012324 				MOV	(R3)+,(R4)+	;... THE NEW ENTRY
     99	000132	016724 	000000G			MOV	L$NX,(R4)+	;TRANSFER THE MODULE HEADER ADDR ...
    100	000136	016724 	000002G			MOV	L$NX+2,(R4)+	;... INTO THE NEW ENTRY
    101	000142	052767 	000000G	000002G		BIS	#LB$DTY,$SWTCH+2 ;INDICATE MODIFICATION
    102	000150					RETURN
    103
    104	000152	012701 			30$:	MOV	(PC)+,R1	;FATAL--EPT OR MNT FULL
    105	000154	   000G	   000G			.BYTE	E$R15,S$V2
    106	000156	016700 	000000G		35$:	MOV	$INPPT,R0	;POINT R0 TO INPUT FILE INFO
    107	000162	016002 	000000G			MOV	R$NAME(R0),R2	;FATAL ERROR
    108	000166	000167 	000000G		ERRXIT:	JMP	$ERMSG
    109
    110						.DSABL	LSB
    111
    112					;
    113					; A MATCH HAS BEEN FOUND IN THE TABLE.  IF IT IS NOT ALREADY
    114					; LOGICALLY DELETED, TREAT THIS AS A MODIFIED REPLACE.  IF THE
    115					; SYMBOL IS STILL ACTIVE, A CHECK MUST BE MADE TO SEE IF WE CAN
    116					; REPLACE IT.  IF THAT IS PERMISIBLE, PERFORM THE REPLACE.
    117					;
    118	000172	005760 	000006 		REPLAC:	TST	6(R0)		;IS THE SYMBOL STILL BOUND TO A MODULE?
    119	000176	001431 				BEQ	RPLAC0		;NO, IT'S LOGICALLY DELETED--INSERT NEW ONE
    120	000200	005767 	000000G			TST	RPMHD		;YES, IS A REPLACEMENT ALLOWABLE?
    121	000204	001437 				BEQ	KERR		;BRANCH IF NOT
    122	000206	022703 	000000G			CMP	#$EPBLK,R3	;O.K., IS THIS AN EPT OR AN MNT?
    123	000212	001410 				BEQ	20$		;BRANCH IF IT'S AN EPT
    124
    125	000214					CALL	MATCH		;SETUP MODULE REPLACE INFORMATION
    126	000220	103424 				BCS	EPTERR		;AN EPT ERROR HAS OCCURRED EARLIER
    127	000222	012704 	000000G			MOV	#RPMNT,R4	;SAVE NAME AS MNT ENTRY REPLACED
    128	000226	005267 	000000G			INC	L$MA		;UPDATE MNT AVAILABLE COUNT
    129	000232	000407 				BR	30$		;USE COMMON CODE TO INSERT NEW ENTRY
    130
    131	000234				20$:	CALL	MATCH		;MUST MATCH EARLIER MODULE REPLACE INFO
    132	000240	103421 				BCS	KERR		;ERROR IF WE DON'T
    133	000242	005267 	000000G			INC	L$EA		;UPDATE EPT AVAILABLE COUNT
    134	000246	012704 	000000G			MOV	#LASTEP,R4	;SAVE NAME AS LAST EPT ENTRY REPLACED
    135
    136	000252	016024 	000002 		30$:	MOV	2(R0),(R4)+	;SAVE FIRST HALF OF SYMBOL NAME
    137	000256	016014 	000004 			MOV	4(R0),(R4)	;AND THE LAST HALF
    138	000262				RPLAC0:	CALL	$WRMPG		;MARK THE PAGE DIRTY
    139	000266	010004 				MOV	R0,R4		;PNT R4 TO ADDR OF ENTRY WE'RE REPLACING
    140	000270	000713 				BR	PUT1		;USE NORMAL INSERT CODE
    141
    142
    143						.ENABL	LSB
    144
    145	000272	012700 	000002G		EPTERR::MOV	#LASTEP+2,R0	;POINT R0 TO EPT SYMBOL+2 IN ERROR
    146	000276	012703 	000000G			MOV	#$EPBLK,R3	;SPECIFY EPT ERROR MESSAGE
LBRPUT	MACRO M1108  05-DEC-77 22:31  PAGE 3-2


    147	000302	000401 				BR	10$
    148	000304	022020 			KERR:	CMP	(R0)+,(R0)+	;POINT R0 TO MNT SYMBOL+2 IN ERROR
    149	000306	016702 	000000G		10$:	MOV	$INPPT,R2	;POINT R2 TO INPUT FILE INFO
    150	000312	016202 	000000G			MOV	R$NAME(R2),R2	;POINT R2 NOW TO FILE NAME INFO
    151	000316	062702 	000010 			ADD	#8.,R2
    152	000322	011246 				MOV	(R2),-(SP)	;PUSH FILE NAME ON THE STACK
    153	000324	014246 				MOV	-(R2),-(SP)	;
    154	000326	014246 				MOV	-(R2),-(SP)	;
    155	000330	014246 				MOV	-(R2),-(SP)	;
    156	000332	014246 				MOV	-(R2),-(SP)	;
    157	000334	011046 				MOV	(R0),-(SP)	;PUSH ENTRY NAME ON STACK
    158	000336	014046 				MOV	-(R0),-(SP)	;
    159	000340	010602 				MOV	SP,R2		;R2 SERVES AS POINTER TO PARAMETER LIST
    160	000342	012701 				MOV	(PC)+,R1	;ASSUME MNT ERROR MESSAGE
    161	000344	   000G	   000G			.BYTE	E$R16,S$V2
    162	000346	022703 	000000G			CMP	#$EPBLK,R3	;VERIFY BY CHECKING DESCRIPTOR ADDRESS
    163	000352	001002 				BNE	20$		;SKIP IF ASSUMPTION CORRECT
    164	000354	012701 				MOV	(PC)+,R1	;ELSE, USE EPT ERROR MESSAGE
    165	000356	   000G	   000G			.BYTE	E$R23,S$V2
    166	000360	000702 			20$:	BR	ERRXIT		;USE FATAL ERROR EXIT
    167
    168						.DSABL	LSB
    169
    170
    171					;+
    172					; THIS ROUTINE MATCHES THE MODULE HEADER ADDRESS OF THE
    173					; ENTRY POINTED AT BY R0 WITH 'RPMHD' TO INSURE THAT WE'RE
    174					; REPLACING THE CORRECT MODULE AND ITS ENTRY POINTS.  NOTE
    175					; THAT 'RPMHD' IS INITIALLY ONE.
    176					;
    177					; INPUTS:
    178					;
    179					;	R0 = TABLE ENTRY ADDRESS
    180					;
    181					; OUTPUTS:
    182					;
    183					;	R4 IS TEMPORARY
    184					;	C-BIT IS SET IF MATCH FAILED
    185					;-
    186	000362	012704 	000000G		MATCH:	MOV	#RPMHD,R4
    187	000366	022714 	000001 			CMP	#1,(R4)		;IS THIS THE MNT CALL?
    188	000372	001410 				BEQ	10$		;BRANCH IF TRUE
    189	000374	022460 	000006 			CMP	(R4)+,6(R0)	;MATCH?
    190	000400	001003 				BNE	5$		;BRANCH IF NOT
    191	000402	021460 	000010 			CMP	(R4),8.(R0)	;MATCH?
    192	000406	001406 				BEQ	20$		;EXIT IF MATCH
    193	000410	000261 			5$:	SEC			;BAD MATCH EXIT
    194	000412					RETURN
    195	000414	016024 	000006 		10$:	MOV	6(R0),(R4)+	;STORE MODULE HEADER ADDRESS ...
    196	000420	016014 	000010 			MOV	8.(R0),(R4)	;... IN REPLACE INFO BLOCK
    197	000424	000257 			20$:	CCC
    198	000426					RETURN
    199		000001 				.END
LBRPUT	MACRO M1108  05-DEC-77 22:31  PAGE 3-3
SYMBOL TABLE

EPTERR  000272RG 	LASTEP= ****** GX	PUT1    000120R  	R$$11M= 000000   	$INPPT= ****** GX
ERRXIT  000166R  	LB$DTY= ****** GX	Q$$CMO= 000000   	S$V2  = ****** GX	$LCKPG= ****** GX
E$R15 = ****** GX	L$EA  = ****** GX	REPLAC  000172R  	S$$LIB= 000000   	$NWLNK= ****** GX
E$R16 = ****** GX	L$MA  = ****** GX	RPLAC0  000262R  	$ALVRT= ****** GX	$SAVRG= ****** GX
E$R23 = ****** GX	L$NX  = ****** GX	RPMHD = ****** GX	$EPBLK= ****** GX	$SWTCH= ****** GX
E$R30 = ****** GX	MATCH   000362R  	RPMNT = ****** GX	$ERMSG= ****** GX	$WRMPG= ****** GX
KERR    000304R  	PUT     000000RG 	R$NAME= ****** GX	$FINDA= ****** GX	$$    = 000067

. ABS.	000000	   000
      	000430	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  672 WORDS  ( 3 PAGES)
DYNAMIC MEMORY:  3104 WORDS  ( 11 PAGES)
ELAPSED TIME:  00:00:09
[42,10]LBRPUT,[42,20]LBRPUT/-SP=[42,30]LBRPRF,LBRPUT
LBRRHD	MACRO M1108  05-DEC-77 22:31  PAGE 2


      1						.TITLE	LBRRHD
      2						.IDENT	/X02.1/
      3
      4					;
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      6					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      7					;
      8					;	DEC ASSUMES NO RESPONSIBLIITY FOR THE USE
      9					;	OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT
     10					;	WHICH IS NOT SUPPLIED BY DEC.
     11					;
     12					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     13					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     14					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     15					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     16					;
     17					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     18					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     19					; EQUIPMENT CORPORATION.
     20					;
     21					; VERSION X02.1
     22					;
     23					; WRITTEN BY:
     24					;	GEORGE W. BERRY
     25					;
     26					; MODIFIED BY:
     27					;	C.A. D'ELIA	08-MAY-74
     28					;	THOMAS J MILLER 07-NOV-75  (CHANGE IN$COR TO $SWTCH+2)
     29					;
     30					;
     31
     32					;+
     33					;
     34					; **-$RDHD=READ LIBRARY HEADER,EPT,AND MNT.
     35					;
     36					; THIS ROUTINE READS THE HEADER, EPT AND MNT INTO
     37					; AN AREA BEGINNING AT L$BUF.
     38					;
     39					; INPUTS:
     40					;
     41					;	NONE
     42					;
     43					; OUTPUTS:
     44					;
     45					;	$EPBLK AND $MNBLK ARE SET UP
     46					;
     47					;-
     48	000000	032767 	000000G	000002G	$RDHD::	BIT	#IN$COR,$SWTCH+2 ;IS HEADER, EPT, AND MNT ALREADY THERE?
     49	000006	001011 				BNE	10$		;EXIT IF SO
     50	000010					CALL	$RDLHD		;READ LIBRARY HEADER
     51	000014					CALL	$RDEP		;READ EPT
     52	000020					CALL	$RDMN		;READ MNT
     53	000024	052767 	000000G	000002G		BIS	#IN$COR,$SWTCH+2	;INDICATE GOOD HEADER, EPT AND MNT IN CORE
     54	000032				10$:	RETURN
     55
     56
     57		000001 				.END
LBRRHD	MACRO M1108  05-DEC-77 22:31  PAGE 2-1
SYMBOL TABLE

IN$COR= ****** GX	R$$11M= 000000   	$RDEP = ****** GX	$RDLHD= ****** GX	$SWTCH= ****** GX
Q$$CMO= 000000   	S$$LIB= 000000   	$RDHD   000000RG 	$RDMN = ****** GX	$$    = 000067

. ABS.	000000	   000
      	000034	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  480 WORDS  ( 2 PAGES)
DYNAMIC MEMORY:  3104 WORDS  ( 11 PAGES)
ELAPSED TIME:  00:00:04
[42,10]LBRRHD,[42,20]LBRRHD/-SP=[42,30]LBRPRF,LBRRHD
LBRRLH	MACRO M1108  05-DEC-77 22:31  PAGE 2


      1						.TITLE	LBRRLH
      2						.IDENT	/X02.2/
      3
      4					;
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      6					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      7					;
      8					;	DEC ASSUMES NO RESPONSIBLIITY FOR THE USE
      9					;	OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT
     10					;	WHICH IS NOT SUPPLIED BY DEC.
     11					;
     12					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     13					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     14					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     15					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     16					;
     17					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     18					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     19					; EQUIPMENT CORPORATION.
     20					;
     21					; VERSION X02.2
     22					;
     23					; WRITTEN BY:
     24					;	GEORGE W. BERRY
     25					;
     26					; MODIFIED BY:
     27					;	C.A. D'ELIA	24-JUN-74
     28					;	THOMAS J. MILLER 07-NOV-74
     29					;			20-JUN-75 (WRITE END OF FILE IN FDB)
     30					;
     31					;
     32
     33					;
     34					; MACRO CALLS
     35					;
     36
     37						.MCALL	FCSBT$
     38	000000					FCSBT$
     39						.MCALL	FDOFF$
     40	000000					FDOFF$	DEF$L
     41
     42
     43						.IF NDF	S$$LIB
     44
     45
     46						.MCALL	GET$,OPEN$
     47
     48						.IFF
     49
     50						.MCALL	GET$S
     51
     52
     53						.ENDC
     54
     55
     56					;+
     57					; **-$RDLHD-READ LIBRARY HEADER
LBRRLH	MACRO M1108  05-DEC-77 22:31  PAGE 2-1


     58					;
     59					; THIS ROUTINE READS THE LIBRARY HEADER IN L$BUF.
     60					; AND VALIDATES HEADER CONTENTS.
     61					; INPUTS:
     62					;
     63					;	NONE
     64					;
     65					;
     66					; OUTPUTS:
     67					;
     68					;	R1=NEXT AVAILABLE BUFFER
     69					;
     70					;-
     71	000000				$RDLHD::SAVRG			;SAVE R3-R5
     72	000004					CALL	INIT		;POSITION FILE INITIALLY
     73	000010	012701 	000000G			MOV	#L$BUF,R1	;GET BUFFER ADDRESS
     74	000014	012760 	001000 	000020 		MOV	#512.,F.URBD(R0) ;INDICATE 512. BYTE BUFFER
     75	000022	012760 	001000 	000002 		MOV	#512.,F.RSIZ(R0) ;SET RECORD SIZE
     76
     77
     78						.IF NDF	S$$LIB
     79
     80
     81						GET$	R0,R1		;GET LIBRARY HEADER
     82
     83						.IFF
     84
     85	000030					GET$S	R0,R1		;GET LIBRARY HEADER
     86
     87
     88						.ENDC
     89
     90
     91	000040	103422 				BCS	ERROR		;FATAL READ ERROR
     92	000042	016760 	000000G	000012 		MOV	L$NX,F.EFBK+2(R0) ;TELL FCS WHERE THE END OF FILE IS
     93	000050	016760 	000002G	000014 		MOV	L$NX+2,F.FFBY(R0) ;
     94	000056	122721 	000000G			CMPB	#TY$,(R1)+	;VALIDATE HEADER RECORD.
     95	000062	103406 				BLO	10$		;BRANCH IF BAD TYPE CODE
     96	000064	122721 	000000G			CMPB	#ID$,(R1)+	;ID BYTE OK?
     97	000070	001003 				BNE	10$		;BRANCH IF NOT O.K.
     98	000072	062701 	000776 			ADD	#510.,R1	;PNT R1 TO NEXT BUFFER
     99	000076					RETURN
    100
    101	000100	012701 			10$:	MOV	(PC)+,R1	;BAD LIBRARY HEADER
    102	000102	   000G	   000G			.BYTE	E$R09,S$V2
    103	000104	000404 				BR	ERXIT
    104
    105	000106	012701 			ERROR:	MOV	(PC)+,R1	;CAN'T READ LIBRARY FILE
    106	000110	   000G	   000G			.BYTE	E$R01,S$V2
    107	000112	016002 	000000G		ERRNM:	MOV	R$NAME(R0),R2	;GIVE FILE NAME
    108	000116	000167 	000000G		ERXIT:	JMP	$ERMSG		;FATAL ERROR EXIT (NO RETURNS)
    109
    110
    111					;+
    112					;
    113					; THIS ROUTINE POSITIONS THE LBR FILE AT THE HEADER BLOCK.
    114					;
LBRRLH	MACRO M1108  05-DEC-77 22:31  PAGE 2-2


    115					; INPUTS:
    116					;
    117					;	NONE
    118					;
    119					; OUTPUTS:
    120					;
    121					;	R0 = $LBRPT
    122					;
    123					;-
    124	000122	016700 	000000G		INIT:	MOV	$LBRPT,R0
    125	000126	005760 	000070 			TST	F.BDB(R0)	;IS LIBRARY FILE ALREADY OPEN?
    126	000132	001006 				BNE	10$		;BRANCH IF SO
    127						.IF NDF S$$LIB
    128						OPEN$	R0,R1		;OPEN LIBRARY FILE
    129						.IFF
    130	000134					CALL	$OPEN		;OPEN LIBRARY FILE
    131						.ENDC
    132	000140	103003 				BCC	10$		;BRANCH IF NO ERROR ON OPEN
    133	000142	012701 				MOV	(PC)+,R1	;OPEN ERROR
    134	000144	   000G	   000G			.BYTE	E$R11,S$V2
    135	000146	000761 				BR	ERRNM
    136	000150				10$:
    137	000150	112760 	000001 	000000 		MOVB	#R.FIX,F.RTYP(R0) ;SET TO FIXED LENGTH RECORDS
    138	000156	005001 				CLR	R1
    139	000160	012702 	000001 			MOV	#1,R2		;POINT TO VIRTUAL BLOCK 1 TO
    140	000164	005003 				CLR	R3		;POINT TO START OF FILE
    141	000166					CALL	.POINT
    142	000172					RETURN
    143
    144
    145		000001 				.END
LBRRLH	MACRO M1108  05-DEC-77 22:31  PAGE 2-3
SYMBOL TABLE

ERRNM   000112R  	FD.SQD= 000040   	F.FACC= 000043   	ID$   = ****** GX	R$NAME= ****** GX
ERROR   000106R  	FD.TTY= 000004   	F.FFBY= 000014   	INIT    000122R  	R$$11M= 000000
ERXIT   000116R  	FD.WBH= 000002   	F.FNAM= 000110   	L$BUF = ****** GX	R.FIX = 000001
E$R01 = ****** GX	FO.APD= 000106   	F.FNB = 000102   	L$NX  = ****** GX	R.VAR = 000002
E$R09 = ****** GX	FO.MFY= 000002   	F.FTYP= 000116   	NB.DEV= 000200   	S$V2  = ****** GX
E$R11 = ****** GX	FO.RD = 000001   	F.FVER= 000120   	NB.DIR= 000100   	S$$LIB= 000000
FA.APD= 000100   	FO.UPD= 000006   	F.HIBK= 000004   	NB.NAM= 000004   	S.FATT= 000016
FA.CRE= 000010   	FO.WRT= 000016   	F.LUN = 000042   	NB.SD1= 000400   	S.FDB = 000140
FA.EXT= 000004   	F.ALOC= 000040   	F.MBCT= 000054   	NB.SD2= 001000   	S.FNAM= 000006
FA.NSP= 000100   	F.BBFS= 000062   	F.MBC1= 000055   	NB.SNM= 000040   	S.FNB = 000036
FA.RD = 000001   	F.BDB = 000070   	F.MBFG= 000056   	NB.STP= 000020   	S.FNBW= 000017
FA.SHR= 000040   	F.BGBC= 000057   	F.NRBD= 000024   	NB.SVR= 000010   	S.FNTY= 000004
FA.TMP= 000020   	F.BKDN= 000026   	F.NREC= 000030   	NB.TYP= 000002   	S.FTYP= 000002
FA.WRT= 000002   	F.BKDS= 000020   	F.OVBS= 000030   	NB.VER= 000001   	S.NFEN= 000020
FD.BLK= 000010   	F.BKEF= 000050   	F.RACC= 000016   	N.DID = 000024   	TY$   = ****** GX
FD.CCL= 000002   	F.BKP1= 000051   	F.RATT= 000001   	N.DVNM= 000032   	$ERMSG= ****** GX
FD.CR = 000002   	F.BKST= 000024   	F.RCNM= 000034   	N.FID = 000000   	$LBRPT= ****** GX
FD.DIR= 000010   	F.BKVB= 000064   	F.RCTL= 000017   	N.FNAM= 000006   	$OPEN = ****** GX
FD.FTN= 000001   	F.CNTG= 000034   	F.RSIZ= 000002   	N.FTYP= 000014   	$RDLHD  000000RG
FD.INS= 000010   	F.DFNB= 000046   	F.RTYP= 000000   	N.FVER= 000016   	$SAVRG= ****** GX
FD.PLC= 000004   	F.DSPT= 000044   	F.STBK= 000036   	N.NEXT= 000022   	$$    = 000067
FD.RAH= 000001   	F.DVNM= 000134   	F.UNIT= 000136   	N.STAT= 000020   	.GETSQ= ****** G
FD.RAN= 000002   	F.EFBK= 000010   	F.URBD= 000020   	N.UNIT= 000034   	.POINT= ****** GX
FD.REC= 000001   	F.EFN = 000050   	F.VBN = 000064   	PAR$$$= 000000   	...GBL= 000000
FD.RWM= 000001   	F.EOBB= 000032   	F.VBSZ= 000060   	Q$$CMO= 000000   	...TPC= 000140
FD.SDI= 000020   	F.ERR = 000052

. ABS.	000000	   000
      	000174	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  1919 WORDS  ( 8 PAGES)
DYNAMIC MEMORY:  3104 WORDS  ( 11 PAGES)
ELAPSED TIME:  00:00:15
[42,10]LBRRLH,[42,20]LBRRLH/-SP=[42,30]LBRPRF,LBRRLH
LBRRMH	MACRO M1108  05-DEC-77 22:31  PAGE 2


      1						.TITLE	LBRRMH
      2						.IDENT	/02/
      3
      4					;
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      6					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      7					;
      8					;	DEC ASSUMES NO RESPONSIBLIITY FOR THE USE
      9					;	OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT
     10					;	WHICH IS NOT SUPPLIED BY DEC.
     11					;
     12					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     13					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     14					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     15					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     16					;
     17					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     18					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     19					; EQUIPMENT CORPORATION.
     20					;
     21					; VERSION 02
     22					;
     23					; WRITTEN BY:
     24					;	GEORGE W. BERRY
     25					;
     26					; MODIFIED BY:
     27					;	C.A. D'ELIA	24-JUN-74
     28					;
     29					;
     30
     31					;
     32					; MACRO CALLS
     33					;
     34
     35						.MCALL	FCSBT$
     36	000000					FCSBT$
     37						.MCALL	FDOFF$
     38	000000					FDOFF$	DEF$L
     39
     40
     41						.IF NDF	S$$LIB
     42
     43
     44						.MCALL	GET$
     45
     46						.IFF
     47
     48						.MCALL	GET$S
     49
     50
     51						.ENDC
     52
     53
     54					;+
     55					;
     56					; **-$RDMH=READ MODULE HEADER
     57					;
LBRRMH	MACRO M1108  05-DEC-77 22:31  PAGE 2-1


     58					; THIS ROUTINE READS A MODULE HEADER INTO CORE.
     59					;
     60					; INPUTS:
     61					;
     62					;	R1=POINTER TO BLOCK/BYTE IN BLOCK OF MODULE HEADER
     63					;
     64					; OUTPUTS:
     65					;
     66					;	C-BIT SET IF ERROR
     67					;
     68					;-
     69	000000				$RDMH::	SAVRG			;SAVE R3-R5
     70	000004	012102 				MOV	(R1)+,R2	;GET VBN
     71	000006	011103 				MOV	(R1),R3		;GET BYTE-IN-BLOCK OF HEADER
     72	000010	005001 				CLR	R1		;CLEAR HIGH VBN
     73	000012	016700 	000000G			MOV	$LBRPT,R0
     74	000016	112760 	000002 	000000 		MOVB	#R.VAR,F.RTYP(R0) ;SET TO VARIABLE LENGTH RECORDS
     75	000024					CALL	.POINT		;POSITION FILE
     76	000030	103410 				BCS	10$		;EXIT IF ERROR
     77
     78
     79						.IF NDF	S$$LIB
     80
     81
     82						GET$	R0,#$MHBUF,#MHSIZE ;READ MODULE HEADER
     83
     84						.IFF
     85
     86	000032					GET$S	R0,#$MHBUF,#MHSIZE ;READ MODULE HEADER
     87
     88
     89						.ENDC
     90
     91
     92	000052				10$:	RETURN
     93
     94
     95		000001 				.END
LBRRMH	MACRO M1108  05-DEC-77 22:31  PAGE 2-2
SYMBOL TABLE

FA.APD= 000100   	FO.APD= 000106   	F.FACC= 000043   	F.VBN = 000064   	Q$$CMO= 000000
FA.CRE= 000010   	FO.MFY= 000002   	F.FFBY= 000014   	F.VBSZ= 000060   	R$$11M= 000000
FA.EXT= 000004   	FO.RD = 000001   	F.FNAM= 000110   	MHSIZE= ****** GX	R.FIX = 000001
FA.NSP= 000100   	FO.UPD= 000006   	F.FNB = 000102   	NB.DEV= 000200   	R.VAR = 000002
FA.RD = 000001   	FO.WRT= 000016   	F.FTYP= 000116   	NB.DIR= 000100   	S$$LIB= 000000
FA.SHR= 000040   	F.ALOC= 000040   	F.FVER= 000120   	NB.NAM= 000004   	S.FATT= 000016
FA.TMP= 000020   	F.BBFS= 000062   	F.HIBK= 000004   	NB.SD1= 000400   	S.FDB = 000140
FA.WRT= 000002   	F.BDB = 000070   	F.LUN = 000042   	NB.SD2= 001000   	S.FNAM= 000006
FD.BLK= 000010   	F.BGBC= 000057   	F.MBCT= 000054   	NB.SNM= 000040   	S.FNB = 000036
FD.CCL= 000002   	F.BKDN= 000026   	F.MBC1= 000055   	NB.STP= 000020   	S.FNBW= 000017
FD.CR = 000002   	F.BKDS= 000020   	F.MBFG= 000056   	NB.SVR= 000010   	S.FNTY= 000004
FD.DIR= 000010   	F.BKEF= 000050   	F.NRBD= 000024   	NB.TYP= 000002   	S.FTYP= 000002
FD.FTN= 000001   	F.BKP1= 000051   	F.NREC= 000030   	NB.VER= 000001   	S.NFEN= 000020
FD.INS= 000010   	F.BKST= 000024   	F.OVBS= 000030   	N.DID = 000024   	$LBRPT= ****** GX
FD.PLC= 000004   	F.BKVB= 000064   	F.RACC= 000016   	N.DVNM= 000032   	$MHBUF= ****** GX
FD.RAH= 000001   	F.CNTG= 000034   	F.RATT= 000001   	N.FID = 000000   	$RDMH   000000RG
FD.RAN= 000002   	F.DFNB= 000046   	F.RCNM= 000034   	N.FNAM= 000006   	$SAVRG= ****** GX
FD.REC= 000001   	F.DSPT= 000044   	F.RCTL= 000017   	N.FTYP= 000014   	$$    = 000067
FD.RWM= 000001   	F.DVNM= 000134   	F.RSIZ= 000002   	N.FVER= 000016   	.GETSQ= ****** G
FD.SDI= 000020   	F.EFBK= 000010   	F.RTYP= 000000   	N.NEXT= 000022   	.POINT= ****** GX
FD.SQD= 000040   	F.EFN = 000050   	F.STBK= 000036   	N.STAT= 000020   	...GBL= 000000
FD.TTY= 000004   	F.EOBB= 000032   	F.UNIT= 000136   	N.UNIT= 000034   	...TPC= 000140
FD.WBH= 000002   	F.ERR = 000052   	F.URBD= 000020   	PAR$$$= 000000

. ABS.	000000	   000
      	000054	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  1854 WORDS  ( 8 PAGES)
DYNAMIC MEMORY:  3104 WORDS  ( 11 PAGES)
ELAPSED TIME:  00:00:14
[42,10]LBRRMH,[42,20]LBRRMH/-SP=[42,30]LBRPRF,LBRRMH
LBRTBL	MACRO M1108  05-DEC-77 22:31  PAGE 2


      1						.TITLE	LBRTBL
      2						.IDENT	/X02.1/
      3
      4					;
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      6					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      7					;
      8					;	DEC ASSUMES NO RESPONSIBLIITY FOR THE USE
      9					;	OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT
     10					;	WHICH IS NOT SUPPLIED BY DEC.
     11					;
     12					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     13					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     14					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     15					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     16					;
     17					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     18					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     19					; EQUIPMENT CORPORATION.
     20					;
     21					; VERSION X02.1
     22					;
     23					; WRITTEN BY:
     24					;	GEORGE W. BERRY
     25					;
     26					; MODIFIED BY:
     27					;	C.A. D'ELIA	10-JUN-74
     28					;	C.A. D'ELIA	25-JUN-74  (VIRTUAL TABLES)
     29					;	THOMAS J. MILLER 14-NOV-74
     30					;
     31					;
     32
     33					;
     34					; MACRO CALLS
     35					;
     36
     37						.MCALL	IOERR$
     38	000000					IOERR$
     39						.MCALL	FDOFF$
     40	000000					FDOFF$	DEF$L
     41						.MCALL	FCSBT$
     42	000000					FCSBT$	DEF$L
     43
     44
     45						.IF NDF	S$$LIB
     46
     47
     48						.MCALL	GET$
     49
     50						.IFF
     51
     52						.MCALL	GET$S
     53
     54
     55						.ENDC
     56
     57
LBRTBL	MACRO M1108  05-DEC-77 22:31  PAGE 2-1


     58					;
     59					; LOCAL DATA
     60					;
     61
     62	000000				LASTV:	.BLKW	1		;FIRST HALF OF LAST SYMBOL INSERTED
     63	000002				ELESIZ:	.BLKW	1		;SIZE OF VIRTUAL MEMORY NEEDED FOR ELEMENT
     64
     65					;+
     66					; **-$RDEP-READ EPT
     67					;
     68					; THIS ROUTINE READS THE EPT.
     69					;
     70					; INPUTS:
     71					;
     72					;	L$BUF CONTAINS THE LIBRARY HEADER RECORD
     73					;
     74					; OUTPUTS:
     75					;
     76					;	$EPBLK (EPT BLOCK DESCRIPTOR) IS SET UP
     77					;
     78					;-
     79	000004				$RDEP::	SAVRG			;SAVE R3-R5
     80	000010	012705 	000000G			MOV	#$EPBLK,R5
     81	000014	012701 	000000G			MOV	#$EPTHL,R1	;POINT R1 TO EPT LIST HEADS
     82	000020	116703 	000000G			MOVB	L$ES,R3		;PUT SIZE OF EPT ENTRY IN R3
     83	000024	016702 	000000G			MOV	L$ET,R2		;PUT VBN OF START OF EPT IN R2
     84	000030	012704 	000000G			MOV	#L$EI,R4	;PUT ADDR OF EPT'S ALLOCATED IN R4
     85	000034	000414 				BR	RDR		;GO TO COMMON CODE
     86					;+
     87					;
     88					; **-$RDMN=READ MNT
     89					;
     90					; THIS ROUTINE READS THE MNT.
     91					;
     92					; INPUTS:
     93					;
     94					;	L$BUF CONTAINS THE LIBRARY HEADER RECORD
     95					;
     96					; OUTPUTS:
     97					;
     98					;	$MNBLK (MNT BLOCK DESCRIPTOR) IS SET UP.
     99					;
    100					;-
    101	000036				$RDMN::	SAVRG
    102	000042	012705 	000000G			MOV	#$MNBLK,R5
    103	000046	012701 	000000G			MOV	#$MNTHL,R1	;POINT R1 TO MNT LIST HEADS
    104	000052	116703 	000000G			MOVB	L$MS,R3		;PUT SIZE OF MNT ENTRY IN R3
    105	000056	016702 	000000G			MOV	L$MT,R2		;PUT VBN OF START OF MNT IN R2
    106	000062	012704 	000000G			MOV	#L$MI,R4	;PUT ADDR OF MNT'S ALLOCATED IN R4
    107
    108	000066	016700 	000000G		RDR:	MOV	$LBRPT,R0	;POINT R0 TO LIBRARY FDB, ETC
    109	000072	112760 	000001 	000000 		MOVB	#R.FIX,F.RTYP(R0)  ;INDICATE READ FIXED LENGTH RECORDS
    110	000100	010360 	000002 			MOV	R3,F.RSIZ(R0)	;SET THE DESIRED RECORD LENGTH
    111	000104	010325 				MOV	R3,(R5)+	;STORE TABLE ENTRY SIZE
    112	000106	010125 				MOV	R1,(R5)+	;AND ADDRESS OF LIST HEADS
    113	000110	011415 				MOV	(R4),(R5)	;AND NUMBER OF ENTRIES ALLOCATED
    114	000112	010167 	000000G			MOV	R1,$HDLST	;SET ADDR OF CURRENT LIST HEADS
LBRTBL	MACRO M1108  05-DEC-77 22:31  PAGE 2-2


    115	000116	062703 	000002 			ADD	#2,R3		;CALC SIZE OF REQ'D VIRTUAL MEMORY BLKS
    116	000122	010367 	177654 			MOV	R3,ELESIZ	;AND STORE IT
    117	000126					CALL	SETUP		;POSITION FILE
    118	000132	012401 				MOV	(R4)+,R1	;GET NUMBER OF ENTRIES ALLOCATED
    119	000134	161401 				SUB	(R4),R1		;AND, SUBTRACT ENTRIES AVAILABLE
    120	000136	003477 				BLE	RTN		;LEAVE IF NONE HAVE BEEN USED
    121	000140	010146 				MOV	R1,-(SP)	;ELSE, SAVE ENTRIES USED ON STACK
    122	000142	005067 	177632 			CLR	LASTV		;INITIALIZE LAST VALUE INSERTED
    123	000146	005003 				CLR	R3		;INITIAL PARTITION LIST OFFSET IS ZERO
    124	000150	016704 	000000G			MOV	$HDLST,R4	;POINT R4 TO FIRST LIST HEAD INITIALLY
    125	000154	005005 				CLR	R5		;AND ASSIGN VIRTUAL ZERO TO IT
    126	000156				RDELE:
    127
    128						.IF NDF	S$$LIB
    129
    130
    131						GET$	$LBRPT,#$OUTBF+4 ;GET TABLE ELEMENT
    132
    133						.IFF
    134
    135	000156					GET$S	$LBRPT,#$OUTBF+4 ;GET TABLE ELEMENT
    136
    137
    138						.ENDC
    139
    140
    141	000174	103467 				BCS	ERROR		;BRANCH IF READ ERROR OCCURRED
    142	000176	016002 	000026 			MOV	F.NRBD+2(R0),R2	;GET ADDR OF ELEMENT
    143	000202	010246 				MOV	R2,-(SP)	;AND SAVE IT
    144	000204	021267 	177570 			CMP	(R2),LASTV	;COMPARE ELE TO LAST ELEMENT
    145	000210	103453 				BLO	LIBERR		;OUT OF ORDER, ERROR
    146	000212	011267 	177562 			MOV	(R2),LASTV	;ELSE, RESET LAST ELEMENT READ
    147	000216	021263 	000000G		10$:	CMP	(R2),$PARTD(R3)	;COMPARE ELE WITH PARTITION DESCRIPTOR
    148	000222	101414 				BLOS	INSERT		;BRANCH IF THIS IS CORRECT PARTITION
    149	000224					CALL	UNLOCK		;UNLOCK OLD PARTITION (IF NECESSARY)
    150	000230	062703 	000002 			ADD	#2,R3		;UPDATE PARTITION LIST OFFSET
    151	000234	020327 	000000C			CMP	R3,#<NU$PAR*2>-2  ;COMPARE IT WITH MAXIMUM OFFSET
    152	000240	003037 				BGT	LIBERR		;IF GREATER, THEN ERROR
    153	000242	016704 	000000G			MOV	$HDLST,R4	;NEW LINK WORD IS NEXT...
    154	000246	060304 				ADD	R3,R4		;...PARTITION LIST HEAD
    155	000250	005005 				CLR	R5		;IT'S VIRTUAL LOCATION IS ZERO
    156	000252	000761 				BR	10$		;REPEAT TEST FOR THIS PARTITION
    157	000254	016701 	177522 		INSERT:	MOV	ELESIZ,R1	;SET SIZE OF MEMORY REQUIRED
    158	000260					CALL	$ALVRT		;ALLOCATE THE VIRTUAL MEMORY
    159	000264					CALL	$LCKPG		;LOCK PAGE CONTAINING NEW LOCN
    160	000270					CALL	$NWLNK		;UNLOCK OLD LINK AND INSERT ELEMENT
    161	000274	012600 				MOV	(SP)+,R0	;POINT R0 TO NEW ELEMENT
    162	000276	010401 				MOV	R4,R1		;POINT R1 TO VIRTUAL MEMORY BLOCK
    163	000300	005721 				TST	(R1)+		;BUMP R1 PAST THE LINK WORD
    164	000302	016702 	177474 			MOV	ELESIZ,R2	;GET SIZE OF VIRTUAL ALLOCATION
    165	000306	006202 				ASR	R2		;CONVERT IT TO WORDS
    166	000310	005302 				DEC	R2		;SUBTRACT OUT THE LINK WORD
    167	000312	012021 			20$:	MOV	(R0)+,(R1)+	;COPY ELEMENT INTO VIRTUAL STORAGE
    168	000314	005302 				DEC	R2		;
    169	000316	001375 				BNE	20$		;
    170	000320	005316 				DEC	(SP)		;DECREMENT ELEMENT COUNT
    171	000322	003315 				BGT	RDELE		;IF SOME REMAIN, REPEAT PROCESS
LBRTBL	MACRO M1108  05-DEC-77 22:31  PAGE 2-3


    172	000324	005726 				TST	(SP)+		;CLEAN THE STACK
    173	000326	010501 			UNLOCK:	MOV	R5,R1		;PUT VIRTUAL LOCN OF LINK IN R1
    174	000330	001402 				BEQ	RTN		;IF NULL, DON'T TRY TO UNLOCK IT
    175	000332					CALL	$UNLPG		;UNLOCK VIRTUAL PAGE CONTAINING OLD LINK
    176	000336				RTN:	RETURN
    177
    178					;
    179					; GENERAL ERROR EXIT
    180					;
    181	000340	012701 			LIBERR:	MOV	(PC)+,R1	;ERROR -- BAD LIBRARY
    182	000342	   000G	   000G			.BYTE	E$R29,S$V2
    183	000344	000405 				BR	ERRNM
    184
    185	000346	012701 			PERR:	MOV	(PC)+,R1	;ERROR IN POSITIONING FILE
    186	000350	   000G	   000G			.BYTE	E$R14,S$V2	;WITH .POINT
    187	000352	000402 				BR	ERRNM
    188
    189	000354	012701 			ERROR:	MOV	(PC)+,R1	;CAN'T READ LIBRARY FILE
    190	000356	   000G	   000G			.BYTE	E$R01,S$V2
    191	000360	016002 	000000G		ERRNM:	MOV	R$NAME(R0),R2	;GIVE FILE NAME
    192	000364	000167 	000000G		ERXIT:	JMP	$ERMSG		;FATAL ERROR EXIT
    193
    194					;+
    195					;
    196					; SETUP FOR EPT OR MNT READ
    197					;
    198					; THIS ROUTINE POSITIONS THE FILE AT THE DESIRED TABLE BLOCK.
    199					;
    200					; INPUTS:
    201					;
    202					;	R0 = $LBRPT
    203					;	R2 = STARTING BLOCK OF TABLE
    204					;
    205					; OUTPUTS:
    206					;
    207					;	R0 IS UNCHANGED
    208					;	R1 AND R3 ARE LOST
    209					;
    210					;-
    211
    212	000370	005001 			SETUP:	CLR	R1		;CLEAR HIGH VBN
    213	000372	005003 				CLR	R3		;CLEAR BYTE ADDRESS
    214	000374					CALL	.POINT		;POSITION FILE
    215	000400	103004 				BCC	10$		;BRANCH TO LEAVE ON SUCCESS
    216	000402	122760 	177766 	000052 		CMPB	#IE.EOF,F.ERR(R0) ;IGNORE EOF ERRORS
    217	000410	001356 				BNE	PERR		;BRANCH IF NOT EOF ERROR
    218	000412				10$:	RETURN
    219
    220
    221
    222		000001 				.END
LBRTBL	MACRO M1108  05-DEC-77 22:31  PAGE 2-4
SYMBOL TABLE

ELESIZ  000002R  	F.DFNB= 000046   	IE.BYT= 177755   	IE.SNC= 177735   	N.UNIT= 000034
ERRNM   000360R  	F.DSPT= 000044   	IE.CKS= 177742   	IE.SPC= 177772   	PAR$$$= 000067
ERROR   000354R  	F.DVNM= 000134   	IE.CLO= 177732   	IE.SQC= 177734   	PERR    000346R
ERXIT   000364R  	F.EFBK= 000010   	IE.CON= 177752   	IE.SRE= 177762   	Q$$CMO= 000000
E$R01 = ****** GX	F.EFN = 000050   	IE.DAA= 177770   	IE.STK= 177706   	RDELE   000156R
E$R14 = ****** GX	F.EOBB= 000032   	IE.DAO= 177763   	IE.VER= 177774   	RDR     000066R
E$R29 = ****** GX	F.ERR = 000052   	IE.DFU= 177750   	IE.WAC= 177743   	RTN     000336R
FA.APD= 000100   	F.FACC= 000043   	IE.DNA= 177771   	IE.WAT= 177741   	R$NAME= ****** GX
FA.CRE= 000010   	F.FFBY= 000014   	IE.DNR= 177775   	IE.WER= 177737   	R$$11M= 000000
FA.EXT= 000004   	F.FNAM= 000110   	IE.DUN= 177767   	IE.WLK= 177764   	R.FIX = 000001
FA.NSP= 000100   	F.FNB = 000102   	IE.DUP= 177707   	IE.2DV= 177720   	R.VAR = 000002
FA.RD = 000001   	F.FTYP= 000116   	IE.EBX= 177776   	INSERT  000254R  	SETUP   000370R
FA.SHR= 000040   	F.FVER= 000120   	IE.EOF= 177766   	IS.BV = 000005   	S$V2  = ****** GX
FA.TMP= 000020   	F.HIBK= 000004   	IE.EOT= 177702   	IS.CR = 006401   	S$$LIB= 000000
FA.WRT= 000002   	F.LUN = 000042   	IE.EOV= 177765   	IS.ESC= 015401   	S.FATT= 000016
FD.BLK= 000010   	F.MBCT= 000054   	IE.EXP= 177676   	IS.PND= 000000   	S.FDB = 000140
FD.CCL= 000002   	F.MBC1= 000055   	IE.FEX= 177717   	IS.RDD= 000002   	S.FNAM= 000006
FD.CR = 000002   	F.MBFG= 000056   	IE.FHE= 177705   	IS.SUC= 000001   	S.FNB = 000036
FD.DIR= 000010   	F.NRBD= 000024   	IE.FOP= 177713   	LASTV   000000R  	S.FNBW= 000017
FD.FTN= 000001   	F.NREC= 000030   	IE.HFU= 177744   	LIBERR  000340R  	S.FNTY= 000004
FD.INS= 000010   	F.OVBS= 000030   	IE.IFC= 177776   	L$EI  = ****** GX	S.FTYP= 000002
FD.PLC= 000004   	F.RACC= 000016   	IE.IFU= 177747   	L$ES  = ****** GX	S.NFEN= 000020
FD.RAH= 000001   	F.RATT= 000001   	IE.ILL= 177726   	L$ET  = ****** GX	UNLOCK  000326R
FD.RAN= 000002   	F.RCNM= 000034   	IE.ISQ= 177703   	L$MI  = ****** GX	$ALVRT= ****** GX
FD.REC= 000001   	F.RCTL= 000017   	IE.LCK= 177745   	L$MS  = ****** GX	$EPBLK= ****** GX
FD.RWM= 000001   	F.RSIZ= 000002   	IE.MBK= 177721   	L$MT  = ****** GX	$EPTHL= ****** GX
FD.SDI= 000020   	F.RTYP= 000000   	IE.MOD= 177753   	NB.DEV= 000200   	$ERMSG= ****** GX
FD.SQD= 000040   	F.STBK= 000036   	IE.NBF= 177731   	NB.DIR= 000100   	$HDLST= ****** GX
FD.TTY= 000004   	F.UNIT= 000136   	IE.NBK= 177727   	NB.NAM= 000004   	$LBRPT= ****** GX
FD.WBH= 000002   	F.URBD= 000020   	IE.NFI= 177704   	NB.SD1= 000400   	$LCKPG= ****** GX
FO.APD= 000106   	F.VBN = 000064   	IE.NLN= 177733   	NB.SD2= 001000   	$MNBLK= ****** GX
FO.MFY= 000002   	F.VBSZ= 000060   	IE.NNC= 177674   	NB.SNM= 000040   	$MNTHL= ****** GX
FO.RD = 000001   	IE.ABO= 177761   	IE.NOD= 177751   	NB.STP= 000020   	$NWLNK= ****** GX
FO.UPD= 000006   	IE.ALN= 177736   	IE.NSF= 177746   	NB.SVR= 000010   	$OUTBF= ****** GX
FO.WRT= 000016   	IE.BAD= 177777   	IE.OFL= 177677   	NB.TYP= 000002   	$PARTD= ****** GX
F.ALOC= 000040   	IE.BBE= 177710   	IE.ONP= 177773   	NB.VER= 000001   	$RDEP   000004RG
F.BBFS= 000062   	IE.BDI= 177714   	IE.OVR= 177756   	NU$PAR= ****** GX	$RDMN   000036RG
F.BDB = 000070   	IE.BDR= 177716   	IE.PRI= 177760   	N.DID = 000024   	$SAVRG= ****** GX
F.BGBC= 000057   	IE.BDV= 177711   	IE.RAC= 177724   	N.DVNM= 000032   	$UNLPG= ****** GX
F.BKDN= 000026   	IE.BHD= 177700   	IE.RAT= 177723   	N.FID = 000000   	$$    = 000067
F.BKDS= 000020   	IE.BLK= 177754   	IE.RBG= 177730   	N.FNAM= 000006   	$$MSG = 000000
F.BKEF= 000050   	IE.BNM= 177712   	IE.RCN= 177722   	N.FTYP= 000014   	.GETSQ= ****** G
F.BKP1= 000051   	IE.BTF= 177675   	IE.RER= 177740   	N.FVER= 000016   	.POINT= ****** GX
F.BKST= 000024   	IE.BTP= 177725   	IE.RNM= 177715   	N.NEXT= 000022   	...GBL= 000000
F.BKVB= 000064   	IE.BVR= 177701   	IE.RSU= 177757   	N.STAT= 000020   	...TPC= 000140
F.CNTG= 000034

. ABS.	000000	   000
      	000414	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  3836 WORDS  ( 15 PAGES)
DYNAMIC MEMORY:  4160 WORDS  ( 16 PAGES)
ELAPSED TIME:  00:00:28
[42,10]LBRTBL,[42,20]LBRTBL/-SP=[42,30]LBRPRF,LBRTBL
LBRWHD	MACRO M1108  05-DEC-77 22:32  PAGE 2


      1						.TITLE	LBRWHD
      2						.IDENT	/X03.2/
      3
      4					;
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      6					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.  01754
      7					;
      8					;	DEC ASSUMES NO RESPONSIBLIITY FOR THE USE
      9					;	OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT
     10					;	WHICH IS NOT SUPPLIED BY DEC.
     11					;
     12					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     13					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     14					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     15					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     16					;
     17					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     18					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     19					; EQUIPMENT CORPORATION.
     20					;
     21					; VERSION X03.2
     22					;
     23					; WRITTEN BY:
     24					;	GEORGE W. BERRY
     25					;
     26					; MODIFIED BY:
     27					;	C.A. D'ELIA	10-JUN-74
     28					;	C.A. D'ELIA	07-JUL-74 (VIRTUAL TABLES)
     29					;	THOMAS J. MILLER 07-NOV-74
     30					;			18-MAR-75
     31					;
     32					;
     33
     34					;
     35					; MACRO CALLS
     36					;
     37
     38						.MCALL	FDOFF$
     39	000000					FDOFF$	DEF$L
     40						.MCALL	FCSBT$
     41	000000					FCSBT$
     42						.MCALL	IOERR$,PUT$
     43	000000					IOERR$
     44
     45					;+
     46					; **-$WTHD=WRITE LIBRARY HEADER,EPT,AND MNT.
     47					;
     48					; THIS ROUTINE WRITES THE LIBRARY HEADER, EPT AND MNT
     49					; ONTO THE LIBRARY FILE.
     50					;
     51					; INPUTS:
     52					;
     53					;	NONE
     54					;
     55					; OUTPUTS:
     56					;
     57					;	NONE
LBRWHD	MACRO M1108  05-DEC-77 22:32  PAGE 2-1


     58					;-
     59	000000	032767 	000000G	000002G	$WTHD::	BIT	#LB$DTY,$SWTCH+2 ;HAS LIBRARY BEEN MODIFIED
     60	000006	001551 				BEQ	EXIT		;EXIT IF IT HAS NOT
     61	000010	042767 	000000G	000002G		BIC	#LB$DTY,$SWTCH+2 ;INDICATE UPDATE
     62	000016					SAVRG			;SAVE R3-R5
     63	000022	016700 	000000G			MOV	$LBRPT,R0	;POINT R0 TO LIBRARY FDB, ETC
     64	000026	112760 	000001 	000000 		MOVB	#R.FIX,F.RTYP(R0)  ;SPECIFY FIXED LENGTH RECORDS
     65	000034	016702 	000000G			MOV	L$ET,R2		;GET START BLOCK OF EPT
     66	000040	012705 	000000G			MOV	#$EPBLK,R5	;POINT R5 TO EPT DESCRIPTOR BLOCK
     67	000044					CALL	WTR		;WRITE EPT
     68	000050	016702 	000000G			MOV	L$MT,R2		;GET START BLOCK OF MNT
     69	000054	012705 	000000G			MOV	#$MNBLK,R5	;POINT R5 TO MNT DESCRIPTOR BLOCK
     70	000060				WTR:	CALL	SETUP		;POSITION FILE
     71	000064	012560 	000002 			MOV	(R5)+,F.RSIZ(R0)  ;SET RECORD SIZE
     72	000070	016504 	000002 			MOV	2(R5),R4	;PUT NUMBER OF ENTRIES IN R4
     73	000074	001474 				BEQ	50$		;NULL TABLE, DONE
     74	000076	005003 				CLR	R3		;INITIAL PARTITION LIST OFFSET IS ZERO
     75	000100	011546 				MOV	(R5),-(SP)	;PUT ADDR OF LIST HEADS ON STACK
     76	000102	013601 			10$:	MOV	@(SP)+,R1	;PUT VIRTUAL LOCN OF NEXT ENTRY IN R1
     77	000104	001431 				BEQ	20$		;BRANCH IF THE LINK IS NULL
     78	000106					CALL	$CVRL		;ELSE, OBTAIN ITS REAL ADDRESS
     79	000112	010046 				MOV	R0,-(SP)	;SAVE THIS ENTRY'S LINK
     80	000114	005760 	000006 			TST	6(R0)		;EXAMINE ASSOCIATED MODULE HEADER ADDR
     81	000120	001770 				BEQ	10$		;BRANCH IF SYMBOL IS LOGICALLY DELETED
     82	000122	010001 				MOV	R0,R1		;POINT R1 TO THE ENTRY
     83	000124	005721 				TST	(R1)+		;AND PAST THE LINK WORD
     84	000126	005761 	000006 			TST	6(R1)		;WAS ENTRY NEGATED IN COMPRESS?
     85	000132	100002 				BPL	15$		;IF PL NO
     86	000134	005461 	000006 			NEG	6(R1)		;ELSE MAKE POSITIVE AGAIN
     87	000140				15$:	PUT$	$LBRPT,R1,F.RSIZ(R0)  ;WRITE THE ENTRY INTO LIBRARY FILE
     88	000162	103464 				BCS	WTERR		;BRANCH IF WRITE ERROR DETECTED
     89	000164	005304 				DEC	R4		;DECREMENT NUMBER OF ENTRIES
     90	000166	000745 				BR	10$		;REPEAT FOR NEXT ENTRY
     91	000170	062703 	000002 		20$:	ADD	#2,R3		;UPDATE PARTITION LIST OFFSET
     92	000174	020327 	000000C			CMP	R3,#<NU$PAR*2>-2  ;COMPARE IT WITH MAXIMUM
     93	000200	003003 				BGT	30$		;BRANCH IF END OF TABLE
     94	000202	011546 				MOV	(R5),-(SP)	;CALC ADDR OF THE NEXT PARTITION ...
     95	000204	060316 				ADD	R3,(SP)		;... LIST HEAD
     96	000206	000735 				BR	10$		;EMPTY THIS LIST
     97	000210	005704 			30$:	TST	R4		;MUST WE PAD FILE WITH DUMMY ENTRIES?
     98	000212	001425 				BEQ	50$		;NO, JUST LEAVE
     99	000214	012702 	000200G			MOV	#$OUTBF+128.,R2	;POINT R2 TO END OF TEMP BUFFER
    100	000220	164502 				SUB	-(R5),R2	;BACKUP BY AN ENTRY SIZE
    101	000222	012722 	177777 		35$:	MOV	#177777,(R2)+	;FILL THE ENTRY WITH ALL ONES
    102	000226	020227 	000200G			CMP	R2,#$OUTBF+128.	;
    103	000232	103773 				BLO	35$		;
    104	000234	161502 				SUB	(R5),R2		;POINT R2 BACK TO START OF DUMMY RECORD
    105	000236	016700 	000000G			MOV	$LBRPT,R0	;POINT R0 TO LIBRARY FDB
    106	000242				40$:	PUT$	R0,R2,F.RSIZ(R0)  ;OUTPUT A DUMMY ENTRY
    107	000260	103425 				BCS	WTERR		;BRANCH ON ERROR
    108	000262					SOB	R4,40$		;FILL OUT THE ENTIRE DISK TABLE WITH THEM
    109	000266	012702 	000001 		50$:	MOV	#1,R2		;PREPARE TO POINT TO VBN ONE
    110	000272					CALL	SETUP		;POSITION FILE TO THE BLOCK
    111	000276	012760 	001000 	000002 		MOV	#512.,F.RSIZ(R0)  ;SET RECORD SIZE FOR LATER OPENS
    112	000304					CALL	$FIXLA		;RECOMPUTE L$LA
    113	000310					PUT$	R0,#L$BUF,#512.	;WRITE OUT LIBRARY HEADER RECORD
    114	000330	103401 				BCS	WTERR		;BRANCH IF ERROR
LBRWHD	MACRO M1108  05-DEC-77 22:32  PAGE 2-2


    115	000332				EXIT:	RETURN			;EXIT
    116
    117	000334	012701 			WTERR:	MOV	(PC)+,R1	;FATAL WRITE ERROR
    118	000336	   000G	   000G			.BYTE	E$R02,S$V2
    119	000340	000402 				BR	ERRNM
    120
    121	000342	012701 			PERR:	MOV	(PC)+,R1	;ERROR IN POSITIONING FILE
    122	000344	   000G	   000G			.BYTE	E$R14,S$V2	;WITH .POINT
    123
    124	000346	016002 	000000G		ERRNM:	MOV	R$NAME(R0),R2	;POINT R2 TO FILE NAME
    125	000352	000167 	000000G			JMP	$ERMSG		;FATAL ERROR EXIT
    126
    127					;+
    128					;
    129					; SETUP FOR EPT OR MNT WRITE.
    130					;
    131					; THIS ROUTINE POSITIONS THE FILE AT THE DESIRED TABLE BLOCK.
    132					;
    133					; INPUTS:
    134					;
    135					;	R0 = $LBRPT
    136					;	R2 = STARTING BLOCK OF TABLE
    137					;
    138					; OUTPUTS:
    139					;
    140					;	R0 IS UNCHANGED
    141					;	R1 AND R3  ARE LOST
    142					;
    143					;-
    144
    145	000356	005001 			SETUP:	CLR	R1		;CLEAR HIGH VBN
    146	000360	005003 				CLR	R3		;CLEAR BYTE ADDRESS
    147	000362					CALL	.POINT		;POSITION FILE
    148	000366	103005 				BCC	10$
    149	000370	122760 	177766 	000052 		CMPB	#IE.EOF,F.ERR(R0) ;IGNORE EOF ERRORS
    150	000376	001361 				BNE	PERR		;BRANCH IF NOT EOF ERROR
    151	000400	006203 				ASR	R3		;DIVIDE BY 512. TO GET BLOCKS
    152	000402				10$:	RETURN
    153
    154
    155
    156		000001 				.END
LBRWHD	MACRO M1108  05-DEC-77 22:32  PAGE 2-3
SYMBOL TABLE

ERRNM   000346R  	F.CNTG= 000034   	IE.BNM= 177712   	IE.RAC= 177724   	N.FNAM= 000006
EXIT    000332R  	F.DFNB= 000046   	IE.BTF= 177675   	IE.RAT= 177723   	N.FTYP= 000014
E$R02 = ****** GX	F.DSPT= 000044   	IE.BTP= 177725   	IE.RBG= 177730   	N.FVER= 000016
E$R14 = ****** GX	F.DVNM= 000134   	IE.BVR= 177701   	IE.RCN= 177722   	N.NEXT= 000022
FA.APD= 000100   	F.EFBK= 000010   	IE.BYT= 177755   	IE.RER= 177740   	N.STAT= 000020
FA.CRE= 000010   	F.EFN = 000050   	IE.CKS= 177742   	IE.RNM= 177715   	N.UNIT= 000034
FA.EXT= 000004   	F.EOBB= 000032   	IE.CLO= 177732   	IE.RSU= 177757   	PAR$$$= 000000
FA.NSP= 000100   	F.ERR = 000052   	IE.CON= 177752   	IE.SNC= 177735   	PERR    000342R
FA.RD = 000001   	F.FACC= 000043   	IE.DAA= 177770   	IE.SPC= 177772   	Q$$CMO= 000000
FA.SHR= 000040   	F.FFBY= 000014   	IE.DAO= 177763   	IE.SQC= 177734   	R$NAME= ****** GX
FA.TMP= 000020   	F.FNAM= 000110   	IE.DFU= 177750   	IE.SRE= 177762   	R$$11M= 000000
FA.WRT= 000002   	F.FNB = 000102   	IE.DNA= 177771   	IE.STK= 177706   	R.FIX = 000001
FD.BLK= 000010   	F.FTYP= 000116   	IE.DNR= 177775   	IE.VER= 177774   	R.VAR = 000002
FD.CCL= 000002   	F.FVER= 000120   	IE.DUN= 177767   	IE.WAC= 177743   	SETUP   000356R
FD.CR = 000002   	F.HIBK= 000004   	IE.DUP= 177707   	IE.WAT= 177741   	S$V2  = ****** GX
FD.DIR= 000010   	F.LUN = 000042   	IE.EBX= 177776   	IE.WER= 177737   	S$$LIB= 000000
FD.FTN= 000001   	F.MBCT= 000054   	IE.EOF= 177766   	IE.WLK= 177764   	S.FATT= 000016
FD.INS= 000010   	F.MBC1= 000055   	IE.EOT= 177702   	IE.2DV= 177720   	S.FDB = 000140
FD.PLC= 000004   	F.MBFG= 000056   	IE.EOV= 177765   	IS.BV = 000005   	S.FNAM= 000006
FD.RAH= 000001   	F.NRBD= 000024   	IE.EXP= 177676   	IS.CR = 006401   	S.FNB = 000036
FD.RAN= 000002   	F.NREC= 000030   	IE.FEX= 177717   	IS.ESC= 015401   	S.FNBW= 000017
FD.REC= 000001   	F.OVBS= 000030   	IE.FHE= 177705   	IS.PND= 000000   	S.FNTY= 000004
FD.RWM= 000001   	F.RACC= 000016   	IE.FOP= 177713   	IS.RDD= 000002   	S.FTYP= 000002
FD.SDI= 000020   	F.RATT= 000001   	IE.HFU= 177744   	IS.SUC= 000001   	S.NFEN= 000020
FD.SQD= 000040   	F.RCNM= 000034   	IE.IFC= 177776   	LB$DTY= ****** GX	WTERR   000334R
FD.TTY= 000004   	F.RCTL= 000017   	IE.IFU= 177747   	L$BUF = ****** GX	WTR     000060R
FD.WBH= 000002   	F.RSIZ= 000002   	IE.ILL= 177726   	L$ET  = ****** GX	$CVRL = ****** GX
FO.APD= 000106   	F.RTYP= 000000   	IE.ISQ= 177703   	L$MT  = ****** GX	$EPBLK= ****** GX
FO.MFY= 000002   	F.STBK= 000036   	IE.LCK= 177745   	NB.DEV= 000200   	$ERMSG= ****** GX
FO.RD = 000001   	F.UNIT= 000136   	IE.MBK= 177721   	NB.DIR= 000100   	$FIXLA= ****** GX
FO.UPD= 000006   	F.URBD= 000020   	IE.MOD= 177753   	NB.NAM= 000004   	$LBRPT= ****** GX
FO.WRT= 000016   	F.VBN = 000064   	IE.NBF= 177731   	NB.SD1= 000400   	$MNBLK= ****** GX
F.ALOC= 000040   	F.VBSZ= 000060   	IE.NBK= 177727   	NB.SD2= 001000   	$OUTBF= ****** GX
F.BBFS= 000062   	IE.ABO= 177761   	IE.NFI= 177704   	NB.SNM= 000040   	$SAVRG= ****** GX
F.BDB = 000070   	IE.ALN= 177736   	IE.NLN= 177733   	NB.STP= 000020   	$SWTCH= ****** GX
F.BGBC= 000057   	IE.BAD= 177777   	IE.NNC= 177674   	NB.SVR= 000010   	$WTHD   000000RG
F.BKDN= 000026   	IE.BBE= 177710   	IE.NOD= 177751   	NB.TYP= 000002   	$$    = 000067
F.BKDS= 000020   	IE.BDI= 177714   	IE.NSF= 177746   	NB.VER= 000001   	$$MSG = 000000
F.BKEF= 000050   	IE.BDR= 177716   	IE.OFL= 177677   	NU$PAR= ****** GX	.POINT= ****** GX
F.BKP1= 000051   	IE.BDV= 177711   	IE.ONP= 177773   	N.DID = 000024   	.PUT  = ****** G
F.BKST= 000024   	IE.BHD= 177700   	IE.OVR= 177756   	N.DVNM= 000032   	...GBL= 000000
F.BKVB= 000064   	IE.BLK= 177754   	IE.PRI= 177760   	N.FID = 000000   	...TPC= 000140

. ABS.	000000	   000
      	000404	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  3955 WORDS  ( 16 PAGES)
DYNAMIC MEMORY:  5216 WORDS  ( 20 PAGES)
ELAPSED TIME:  00:00:28
[42,10]LBRWHD,[42,20]LBRWHD/-SP=[42,30]LBRPRF,LBRWHD