FORMAT	MACRO M1110  22-AUG-78 02:08

TABLE OF CONTENTS



     1-  300	OBJECT LANGUAGE DEFS

FORMAT	MACRO M1110  22-AUG-78 02:08  PAGE 1





    100						.TITLE	FORMAT

    200						.IDENT	/X0300/

    300						.SBTTL	OBJECT LANGUAGE DEFS

FORMAT	MACRO M1110  22-AUG-78 02:08  PAGE 3





      1					; COPYRIGHT (C) 1976, 1977

      2					; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

      3					;

      4					; THIS SOFTWARE IS FURNISHED UNDER  A LICENSE FOR USE ONLY  ON  A

      5					; SINGLE COMPUTER SYSTEM AND MAY BE  COPIED ONLY WITH  THE INCLU-

      6					; SION OF  THE  ABOVE  COPYRIGHT NOTICE.  THIS SOFTWARE,  OR  ANY

      7					; OTHER COPIES THEREOF, MAY NOT BE  PROVIDED  OR  OTHERWISE  MADE

      8					; AVAILABLE TO ANY OTHER PERSON EXCEPT  FOR  USE  ON  SUCH SYSTEM

      9					; AND TO  ONE WHO AGREES  TO  THESE LICENSE  TERMS.  TITLE TO AND

     10					; OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.

     11					;

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

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

     14					; EQUIPMENT CORPORATION.

     15					;

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

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

LIBCM	MACRO M1110  22-AUG-78 02:08  PAGE 4





      1						.TITLE	LIBCM

      2						.IDENT	/X04.01/

      3

      4					; COPYRIGHT (C) 1976, 1977

      5					; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

      6					;

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

      8					; SINGLE COMPUTER SYSTEM AND MAY BE  COPIED ONLY WITH  THE INCLU-

      9					; SION OF  THE  ABOVE  COPYRIGHT NOTICE.  THIS SOFTWARE,  OR  ANY

     10					; OTHER COPIES THEREOF, MAY NOT BE  PROVIDED  OR  OTHERWISE  MADE

     11					; AVAILABLE TO ANY OTHER PERSON EXCEPT  FOR  USE  ON  SUCH SYSTEM

     12					; AND TO  ONE WHO AGREES  TO  THESE LICENSE  TERMS.  TITLE TO AND

     13					; OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.

     14					;

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

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

     17					; EQUIPMENT CORPORATION.

     18					;

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

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

     21					;

     22					; VERSION: X04.01

     23					;

     24					; WRITTEN BY:

     25					;	GEORGE W. BERRY

     26					;

     27					; MODIFIED BY:

     28					;	C.A. D'ELIA	16-JUN-74

     29					;	C.A. D'ELIA	30-JUN-74  (VIRTUAL TABLES)

     30					;	C.A. D'ELIA	01-AUG-74

     31					;	THOMAS J. MILLER 07-NOV-74

     32					;			12-NOV-74

     33					;			18-MAR-75

     34					;	T. J. MILLER 24-JAN-76

     35					;

     36					;		TM002 -- ADDITION OF ENTRY POINT SWITCH (/EP).

     37					;

     38					;	K. D. MORSE 30-NOV-76

     39					;

     40					;		KM001 -- STAR CHANGES FOR GST AND MNT ENTRY SIZES

     41					;

     42					;

     43					;

     44

     45					;

     46					; MACRO LIBRARY CALLS

     47					;

     48

     49						.MCALL	FDOFF$

     50	000000					FDOFF$	DEF$L

     51						.MCALL	IOERR$

     52	000000					IOERR$

     53

     54

     61

     62						.MCALL	FCSBT$

     63	000000					FCSBT$

LIBCM	MACRO M1110  22-AUG-78 02:08  PAGE 4-1





     64						.MCALL	CLOSE$,GET$S,PUT$

     65

     66

     68

     69

     70					;

     71					; FILE POINTERS FOR COMPRESS

     72					;

     73

     74	000000				IPOINT:	.BLKW	2

     75	000004				OPOINT:	.BLKW	2

     76

     77					;

     78					; INPUT BUFFER FOR COMPRESS

     79					;

     80		001000 			BUFIZ	=512.			;BUFFER SIZE IN BYTES

     81

     82	000010				RECBUF:	.BLKB	BUFIZ

     83

     84					;+

     85					;

     86					; **-$CMP-COMPRESS OPTION

     87					;

     88					; THE COMPRESS OPTION REMOVES LOGICALLY DELETED SPACE FROM A LIBRARY FILE

     89					; BY COPYING IT ONTO A NEW LIBRARY FILE.  DURING THE COPY

     90					; OPERATION THE SPACE ALLOCATED TO THE MNT AND EPT MAY BE CHANGED.

     91					;

     92					; INPUTS:

     93					;

     94					;	$LIBPT	=NEW LIBRARY FILE FDB, ETC

     95					;

     96					; OUTPUTS:

     97					;

     98					;	NONE

     99					;

    100					;-

    101

    102	001010				$CMP::	SAVRG			;SAVE R3-R5

    103	001014	012704 	000000G			MOV	#$CMPPT,R4	;POINT R4 TO COMPRESS FDB, ETC

    104	001020	012714 	000000G			MOV	#CMPPT,(R4)	;RESTORE PROPER ADDRESS

    105	001024	011400 				MOV	(R4),R0		;GET INPUT FDB ADDR FOR COMPRESS

    106	001026	012701 	000000G			MOV	#$CSIBK,R1	;PUT ADDR OF CSI BLOCK IN R1

    107	001032					CALL	$SCANI		;GET INPUT FILE SPECIFICATION

    108	001036	103004 				BCC	20$		;BRANCH IF FILE WAS PRESENT

    109	001040	012701 			10$:	MOV	(PC)+,R1	;INPUT FILE ERROR WITH /CO??

    110	001042	   000G	   000G			.BYTE	E$R26,S$V2

    111	001044	000167 	000000G			JMP	$ERMSG		;FATAL ERROR EXIT

    112	001050	005700 			20$:	TST	R0		;INSURE ONLY ONE INPUT FILE

    113	001052	001772 				BEQ	10$		;ERROR IF NOT

    114	001054	016746 	000000G			MOV	$LIBPT,-(SP)	;EXCHANGE $LIBPT AND $CMPPT

    115	001060	011467 	000000G			MOV	(R4),$LIBPT

    116	001064	012701 	000001 			MOV	#FO.RD,R1	;SPECIFY OPEN FOR READ

    117	001070	016767 	000014G	000014G		MOV	LIBNAM+N.FTYP,CMPNAM+N.FTYP ;COPY DEFAULT EXTENSION

    118	001076					CALL	$RDLHD		;READ LIB HEADER

    119	001102	116700 	000000G			MOVB	L$TYP,R0	;PICK UP LIB TYPE FROM HEADER

    120	001106	006300 				ASL	R0		;CONVERT TO WORD OFFSET

    121	001110	016067 	000000G	000014G		MOV	LIBTAB(R0),LIBNAM+N.FTYP ;SET DEFAULT OUTPUT EXTENSION

LIBCM	MACRO M1110  22-AUG-78 02:08  PAGE 4-2





    122	001116	012600 				MOV	(SP)+,R0	;OUTPUT FDB PTR TO R0

    123	001120	010014 				MOV	R0,(R4)		;AND TO $CMPPT

    124	001122	005767 	000000G			TST	$SIZ		;USE DEFAULT SIZE?

    125	001126	001003 				BNE	CREATE		;BRANCH IF NOT

    126	001130	016767 	000006G	000000G		MOV	CMPPT+F.HIBK+2,$SIZ ;SET UP DEFAULT SIZE

    127	001136	016760 	000000G	000034 	CREATE:	MOV	$SIZ,F.CNTG(R0)	;SET FILE SIZE (CONTIGUOUS)

    128

    129

    136

    137	001144	012701 	000016 			MOV	#FO.WRT,R1	;SPECIFY OPEN FOR WRITE

    138	001150					CALL	$OPEN		;PARSE FILENAME AND OPEN FILE

    139

    140

    142

    143

    144	001154	103004 				BCC	READLH		;BRANCH IF OPEN SUCCEEDED

    145	001156	012701 			OERR:	MOV	(PC)+,R1	;FILE OPEN FAILURE

    146	001160	   000G	   000G			.BYTE	E$R11,S$V2

    147	001162	000167 	000672 		JMPERR:	JMP	ERRNM		;BRANCH TO COMMON ERROR EXIT

    148

    149	001166	010067 	000000G		READLH:	MOV	R0,$OPNFL	;INDICATE FILE OPEN ON 'CMPPT'

    150	001172	005004 				CLR	R4		;++KM001 COMPUTE THE NUMBER OF ENTRIES

    151	001174	012703 	000000G			MOV	#L$MS,R3	;POINT R3 TO SIZE OF MNT ENTRIES

    152	001200	112300 				MOVB	(R3)+,R0	;++KM001 GET MNT ENTRY SIZE

    153	001202	001417 				BEQ	4$		;++KM001 BRANCH IF ENTRY SIZE IS ZERO

    154	001204	005203 				INC	R3		;++KM001 SKIP UNUSED BYTE

    155	001206	012705 	001000 			MOV	#512.,R5	;++KM001 PER BLOCK

    156	001212					DIV	R0,R4		;++KM001 BY DIVIDING BY THE ENTRY SIZE

    157	001216	010400 				MOV	R4,R0		;++KM001 NOW DIVIDE THIS ANSWER INTO

    158	001220	005004 				CLR	R4		;++KM001 THE NUMBER OF ENTRIES

    159	001222	016305 	000002 			MOV	2(R3),R5	;++KM001 ALLOCATED TO PRODUCE THE

    160	001226					DIV	R0,R4		;++KM001 IF THERE IS ANY REMAINDER,

    161	001232	005705 				TST	R5		;++KM001 THEN AN EXTRA BLOCK

    162	001234	001403 				BEQ	5$		;++KM001 MUST BE ADDED.

    163	001236	005204 				INC	R4		;++KM001

    164	001240	000401 				BR	5$		;++KM001 BRANCH AROUND NO ENTRY SIZE

    165	001242	005203 			4$:	INC	R3		;++KM001 SET POINTER TO FIRST MODULE VBN

    166	001244	061304 			5$:	ADD	(R3),R4		;++KM001 CALC FIRST MODULE VBN IN CUR LIBR

    167	001246	010467 	176526 			MOV	R4,IPOINT	;++KM001 STORE IN POINTER BLOCK

    168	001252	005067 	176524 			CLR	IPOINT+2	;CLEAR BYTE-IN-BLOCK

    169	001256	016700 	000000G			MOV	$EPT,R0		;GET NEW # OF EPT ENTRIES TO ALLOCATE

    170	001262	012702 	000000G			MOV	#L$ES,R2	;POINT R2 TO SIZE OF EPT ENTRIES

    171	001266	032767 	000000G	000000G		BIT	#EP$SW,$SWTCH	;/-EP SPECIFIED?                        ; TM002

    172	001274	001405 				BEQ	1$		;IF EQ NO                               ; TM002

    173	001276	005000 				CLR	R0		;CLEAR NEW NUMBER OF EPT'S              ; TM002

    174	001300	005067 	000000G			CLR	L$EI		;CLEAR OLD NUMBER ALLOCATED             ; TM002

    175	001304	005067 	000000G			CLR	L$EA		;CLEAR OLD NUMBER AVAILABLE             ; TM002

    176	001310				1$:	CALL	COMP		;COMPUTE NEW L$EI AND L$EA              ; TM002

    177	001314	010546 				MOV	R5,-(SP)	;SAVE VBN OF NEW MNT                    ;**-1

    178	001316					CALL	$RDEP		;READ THE EPT INTO VIRTUAL MEMORY

    179	001322	016700 	000000G			MOV	$MNT,R0		;GET NEW NUMBER OF MNT ENTRIES TO ALLOC

    180	001326	012702 	000000G			MOV	#L$MT,R2	;PNT R2 TO CURRENT START VBN OF MNT

    181	001332	011246 				MOV	(R2),-(SP)	;SAVE CURRENT MNT VBN

    182	001334	016612 	000002 			MOV	2(SP),(R2)	;SET L$MT TO NEW MNT VBN

    183	001340	005742 				TST	-(R2)		;POINT R2 TO SIZE OF MNT ENTRIES  (L$MS)

    184	001342					CALL	COMP		;COMPUTE NEW L$MI AND L$MA

    185	001346	012667 	000000G			MOV	(SP)+,L$MT	;RESTORE L$MT TO READ OLD MNT

LIBCM	MACRO M1110  22-AUG-78 02:08  PAGE 4-3





    186	001352					CALL	$RDMN		;READ THE MNT INTO VIRTUAL MEMORY

    187	001356	012667 	000000G			MOV	(SP)+,L$MT	;RESTORE L$MT TO NEW START VBN OF MNT

    188	001362	010567 	176416 			MOV	R5,OPOINT	;STORE VBN OF FIRST MODULE HEADER

    189	001366	005067 	176414 			CLR	OPOINT+2	;CLEAR BYTE-IN-BLOCK OFFSET

    190	001372	010502 				MOV	R5,R2		;GET VBN FOR POINT

    191	001374	016700 	000000G			MOV	$CMPPT,R0	;GET ADDR OF COMPRESS FDB IN R0

    192	001400	005001 				CLR	R1		;HIGH VBN=0

    193	001402	005003 				CLR	R3		;BYTE IN BLOCK=0

    194	001404					CALL	.POINT		;POINT TO FIRST MODULE IN OUTPUT FILE

    195	001410	103006 				BCC	2$		;BRANCH IF .POINT IS OK

    196	001412	122760 	177766 	000052 		CMPB	#IE.EOF,F.ERR(R0) ;IGNORE EXPECTED EOF ERROR

    197	001420	001402 				BEQ	2$

    198	001422	000167 	000404 			JMP	PERR		;BRANCH IF OTHER ERROR

    199	001426	112760 	000002 	000000 	2$:	MOVB	#R.VAR,F.RTYP(R0)  ;VARIABLE LENGTH WRITES

    200	001434	105060 	000001 			CLRB	F.RATT(R0)	;++KM001 SET TO CROSS BLOCK BOUNDRIES

    201					;

    202					; MAIN LOOP OF COMPRESS

    203					;

    204	001440	012701 	000000'		10$:	MOV	#IPOINT,R1	;GET CURRENT INPUT RECORD ADDR

    205	001444	010105 				MOV	R1,R5		;SAVE R1

    206	001446	021167 	000000G			CMP	(R1),L$NX	;END-OF-FILE?

    207	001452	103406 				BLO	11$		;NO...

    208	001454	101174 				BHI	CERR		;FATAL COMPRESS ERROR

    209	001456	026167 	000002 	000002G		CMP	2(R1),L$NX+2

    210	001464	001525 				BEQ	DONE		;END-OF-FILE REACHED

    211	001466	101167 				BHI	CERR		;FATAL COMPRESS ERROR

    212	001470				11$:	CALL	$RDMH		;READ MODULE HEADER

    213	001474	103567 				BCS	RERR		;FATAL READ ERROR

    214	001476	105767 	000000G			TSTB	$MHST		;IS THIS A DELETED MODULE?

    215	001502	001010 				BNE	12$		;YES, SKIP TABLE FIXUP

    216	001504	012702 	000000G			MOV	#$EPBLK,R2

    217	001510					CALL	FIXTAB		;FIX EPT

    218	001514	012702 	000000G			MOV	#$MNBLK,R2

    219	001520					CALL	FIXTAB		;FIX MNT

    220	001524	012501 			12$:	MOV	(R5)+,R1	;GET VBN

    221	001526	011502 				MOV	(R5),R2		;GET BYTE-IN-BLOCK

    222	001530					CALL	$NEXT		;COMPUTE NEXT MODULE HEADER

    223	001534	010215 				MOV	R2,(R5)		;SAVE NEXT MODULE HEADER ADDRESS

    224	001536	010145 				MOV	R1,-(R5)

    225	001540	105767 	000000G			TSTB	$MHST		;DELETED MODULE?

    226	001544	001335 				BNE	10$		;YES, PROCEED WITH COMPRESS

    227	001546	016701 	000000G			MOV	$LIBPT,R1	;GET INPUT FDB

    228	001552	016700 	000000G			MOV	$CMPPT,R0

    229	001556					PUT$	R0,#$MHBUF,F.NRBD(R1)  ;WRITE OUT MODULE HEADER

    230	001576	103455 				BCS	WERR

    231	001600				20$:	CALL	.MARK		;COMPUTE OUTPUT FILE POINTER

    232	001604	010267 	176174 			MOV	R2,OPOINT	;SAVE (LO) VBN

    233	001610	010367 	176172 			MOV	R3,OPOINT+2	;AND BYTE-IN-BLOCK OF NEXT RECORD

    234	001614	016700 	000000G			MOV	$LIBPT,R0	;GET INPUT FDB

    235	001620					CALL	.MARK		;GET INPUT FILE POINTER (CURRENT)

    236	001624	020327 	001000 			CMP	R3,#1000	;TEST FOR EXACT END OF BLOCK

    237	001630	001002 				BNE	25$		;BRANCH IF IT DOES NOT APPLY

    238	001632	005003 				CLR	R3		;ELSE, CONVERT POINTER TO START ...

    239	001634	005202 				INC	R2		;... OF NEXT BLOCK

    240	001636	020267 	176136 		25$:	CMP	R2,IPOINT	;CHECK FOR END-OF-MODULE

    241	001642	103405 				BLO	27$		;NOT THERE YET

    242	001644	101100 				BHI	CERR		;PAST EOM--FATAL ERROR

LIBCM	MACRO M1110  22-AUG-78 02:08  PAGE 4-4





    243	001646	020367 	176130 			CMP	R3,IPOINT+2

    244	001652	001672 				BEQ	10$		;AT EOM--GO BACK TO MAIN LOOP

    245	001654	101074 				BHI	CERR		;PAST EOM--FATAL ERROR

    246	001656				27$:

    247

    248

    255

    256	001656					GET$S	R0,#RECBUF,#BUFIZ  ;READ RECORD

    257

    258

    260

    261

    262	001676	103466 				BCS	RERR		;READ ERROR

    263	001700	016701 	000000G			MOV	$LIBPT,R1

    264	001704					PUT$	$CMPPT,#RECBUF,F.NRBD(R1)  ;WRITE RECORD

    265	001730	103323 				BCC	20$

    266	001732	012701 			WERR:	MOV	(PC)+,R1	;FATAL OUTPUT ERROR

    267	001734	   000G	   000G			.BYTE	E$R02,S$V2

    268	001736	000450 				BR	ERRNM		;INDICATE FILE NAME

    269					;

    270					; COMPRESS EXIT

    271					;

    272	001740	016700 	000000G		DONE:	MOV	$LIBPT,R0

    273	001744	112760 	000001 	000000 		MOVB	#R.FIX,F.RTYP(R0)  ;REST OLD LIB TO FIXED LENGTH RECORD

    274	001752					CLOSE$	R0		;CLOSE OLD LIBRARY FILE

    275	001756	016767 	000000G	000000G		MOV	$CMPPT,$LIBPT	;SWITCH TO NEW LIBRARY FILE

    276	001764	005067 	000000G			CLR	$OPNFL		;INDICATE LIBRARY IS ONLY OPEN FILE

    277	001770	016767 	176010 	000000G		MOV	OPOINT,L$NX	;UPDATE NEXT MODULE INSERT ADDR (L$NX)

    278	001776	016767 	176004 	000002G		MOV	OPOINT+2,L$NX+2

    279	002004	005067 	000000G			CLR	L$LD		;CLEAR RECOVERABLE DELETED SPACE (L$LD)

    280	002010	005067 	000002G			CLR	L$LD+2

    281	002014					CALL	$FIXLA		;RECOMPUTE FILE SPACE AVAILABLE (L$LA)

    282	002020	052767 	000000C	000002G		BIS	#IN$COR!LB$DTY,$SWTCH+2 ;SET IN-CORE AND DIRTY FLAGS

    283	002026	000167 	000000G			JMP	$WTHD		;WRITE OUT HEADER, EPT, AND MNT

    284									;AND EXIT (THROUGH $WTHD)

    285

    286

    287					;

    288					; COMPRESS ERRORS

    289					;

    290	002032	012701 			PERR:	MOV	(PC)+,R1	;ERROR FROM .POINT

    291	002034	   000G	   000G			.BYTE	E$R14,S$V2

    292	002036	000410 				BR	ERRNM

    293

    294	002040	012701 			ZERR:	MOV	(PC)+,R1	;NOT ENOUGH EPT OR MNT SPACE

    295	002042	   000G	   000G			.BYTE	E$R28,S$V2

    296	002044	000407 				BR	ERR

    297

    298	002046	012701 			CERR:	MOV	(PC)+,R1	;FATAL COMPRESS ERROR

    299	002050	   000G	   000G			.BYTE	E$R27,S$V2

    300	002052	000404 				BR	ERR

    301

    302	002054	012701 			RERR:	MOV	(PC)+,R1	;READ ERROR

    303	002056	   000G	   000G			.BYTE	E$R01,S$V2

    304	002060	016002 	000000G		ERRNM:	MOV	R$NAME(R0),R2	;GET FILE NAME

    305	002064	000167 	000000G		ERR:	JMP	$ERMSG		;FATAL ERROR EXIT

    306

LIBCM	MACRO M1110  22-AUG-78 02:08  PAGE 4-5





    307

    308					;+

    309					;

    310					; THIS ROUTINE COMPUTES THE SIZE OF THE NEW EPT

    311					; OR MNT.

    312					;

    313					; INPUTS:

    314					;

    315					;	R0 = REQUESTED NEW SIZE (0 IF NO CHANGE)

    316					;	R2 = ADDRESS OF L$ES OR L$MS

    317					;

    318					; OUTPUTS:

    319					;

    320					;	R5 CONTAINS THE START VBN OF TABLE + LENGTH OF TABLE IN BLOCKS

    321					;

    322					; THIS ROUTINE CHANGED COMPLETELY FOR STAR. ++KM001

    323					;

    324					;

    325					;-

    326	002070	105712 			COMP:	TSTB	(R2)		;++KM001 IS ENTRY SIZE ZERO?

    327	002072	001442 				BEQ	7$		;++KM001 YES, DON'T BOTHER COMPUTING

    328	002074	010046 				MOV	R0,-(SP)	;++KM001 SAVE NUMBER OF ENTRIES TO ALLOCATE

    329	002076	112200 				MOVB	(R2)+,R0	;++KM001 GET ENTRY SIZE IN R0  (L$?S)

    330	002100	005202 				INC	R2		;SKIP UNUSED BYTE

    331	002102	012203 				MOV	(R2)+,R3	;++KM001 SAVE START BLOCK  (L$?T)

    332	002104	012705 	001000 			MOV	#512.,R5	;++KM001 CALCULATE THE NUMBER OF

    333	002110	005004 				CLR	R4		;++KM001 ENTRIES PER

    334	002112					DIV	R0,R4		;++KM001 BLOCK. SAVE THIS NUMBER

    335	002116	010400 				MOV	R4,R0		;++KM001 FOR FUTURE USE AND ALSO

    336									;++KM001 DIVIDE IT INTO THE NUMBER

    337	002120	005004 				CLR	R4		;++KM001 OF TABLE ENTRIES REQUESTED.

    338	002122	012605 				MOV	(SP)+,R5	;++KM001 GET NUMBER OF ENTRIES.

    339	002124	001001 				BNE	1$		;BRANCH IF CHANGING TABLE SIZE

    340	002126	011205 				MOV	(R2),R5		;NO CHANGE...USE CURRENT SIZE  (L$?I)

    341	002130				1$:	DIV	R0,R4		;++KM001 GET NUMBER OF BLOCKS NEEDED.

    342	002134	005705 				TST	R5		;++KM001 IF THERE IS A REMAINDER,

    343	002136	001401 				BEQ	2$		;++KM001 ADD ONE MORE BLOCK.

    344	002140	005204 				INC	R4		;++KM001

    345	002142	060403 			2$:	ADD	R4,R3		;++KM001 GET VBN + LENGTH IN BLOCKS

    346									;++KM001 GET NUMBER OF ENTRIES ACTUALLY

    347									;++KM001 ALLOCATED BY MULTIPLYING BY THE

    348									;++KM001 NUMBER OF BLOCKS BY THE

    349	002144					MUL	R0,R4		;++KM001 NUMBER OF ENTRIES PER BLOCK.

    350	002150	161205 				SUB	(R2),R5		;COMPUTE DIFFERENCE IN SIZES  (- L$?I)

    351	002152	103005 				BHIS	5$		;BRANCH IF NOT MAKING THE TABLE SMALLER

    352	002154	005405 				NEG	R5

    353	002156	020562 	000002 			CMP	R5,2(R2)	;CHECK FOR ROOM IN TABLE  (L$?A)

    354	002162	101326 				BHI	ZERR		;BRANCH IF NO ROOM

    355	002164	005405 				NEG	R5

    356	002166	060562 	000002 		5$:	ADD	R5,2(R2)	;UPDATE ENTRIES AVAILABLE  (L$?A)

    357	002172	060512 				ADD	R5,(R2)		;UPDATE ENTRIES ALLOCATED (L$?I)

    358	002174	010305 				MOV	R3,R5		;++KM001 RESTORE R5 TO VBN + LENGTH

    359	002176	000402 				BR	10$		;++KM001 SKIP ZERO ENTRY SIZE CALC.

    360	002200	016205 	000002 		7$:	MOV	2(R2),R5	;++KM001 GET START VBN

    361	002204				10$:	RETURN

    362

    363

LIBCM	MACRO M1110  22-AUG-78 02:08  PAGE 4-6





    364					;+

    365					; SUBROUTINE TO FIX EPT & MNT TABLES.  ALL REFERENCES

    366					; TO A MODULE ARE LOCATED IN THE TABLE AND ARE

    367					; MODIFIED AS NEEDED.

    368					;

    369					; INPUTS:

    370					;

    371					;	R2 = TABLE DESCRIPTOR

    372					;

    373					; OUTPUTS:

    374					;

    375					;	R0,R1,R2  ARE LOST

    376					;-

    377	002206	016700 	175566 		FIXTAB:	MOV	IPOINT,R0	;PUT INPUT LIBRARY VBN IN R0

    378	002212	016701 	175564 			MOV	IPOINT+2,R1	;AND BYTE-IN-BLOCK OFFSET IN R1

    379	002216	020067 	175562 			CMP	R0,OPOINT	;IF THAT INFORMATION EXACTLY MATCHES ...

    380	002222	001003 				BNE	10$		;... THE OUTPUT LIBRARY FILE ...

    381	002224	020167 	175556 			CMP	R1,OPOINT+2	;... INFORMATION, THEN BYPASS ...

    382	002230	001420 				BEQ	25$		;... THE TABLE FIXUP

    383	002232				10$:	CALL	$FINDC		;ELSE, FIND A MATCHING ENTRY

    384	002236	103415 				BCS	25$		;EXIT IF NONE FOUND

    385	002240	016760 	175540 	000002 	20$:	MOV	OPOINT,T$HEAD+V$MEML(R0) ;+++STAR AND UPDATE IT

    386	002246	016760 	175534 	000004 		MOV	OPOINT+2,T$HEAD+2+V$MEML(R0) ;+++STAR

    387	002254	005460 	000004 			NEG	T$HEAD+2+V$MEML(R0) ;+++STAR NEGATE BYTE IN BLOCK POINTER TO MAKE UNIQUE

    388									;   FROM OLD POINTERS

    389	002260					CALL	$WRMPG		;MARK PAGE DIRTY

    390	002264					CALL	$FINDN		;FIND NEXT ONE

    391	002270	103363 				BCC	20$		;CONTINUE UNTIL DONE

    392	002272				25$:	RETURN 			;ALL DONE

    393

    394

    395					;

    396		000001 				.END

LIBCM	MACRO M1110  22-AUG-78 02:08  PAGE 4-7

SYMBOL TABLE



BUFIZ = 001000   	FD.SQD= 000040   	F.SPUN= 000074   	IE.NBK= 177727   	L$EA  = ****** GX

CERR    002046R  	FD.TTY= 000004   	F.STBK= 000036   	IE.NDR= 177670   	L$EI  = ****** GX

CH.AND= 000001   	FD.WBH= 000002   	F.UNIT= 000136   	IE.NFI= 177704   	L$ES  = ****** GX

CMPNAM= ****** GX	FF.CHR= 000005   	F.URBD= 000020   	IE.NFW= 177673   	L$LD  = ****** GX

CMPPT = ****** GX	FF.NV = 000003   	F.VBN = 000064   	IE.NLK= 177661   	L$MS  = ****** GX

COMP    002070R  	FF.POE= 000002   	F.VBSZ= 000060   	IE.NLN= 177733   	L$MT  = ****** GX

CREATE  001136R  	FF.RWD= 000001   	GS$ARG= 000003   	IE.NNC= 177663   	L$NX  = ****** GX

CTLGRP= 000120   	FF.RWF= 000006   	GS$EPM= 000002   	IE.NNL= 177662   	L$TYP = ****** GX

DONE    001740R  	FF.SPC= 000004   	GS$PSC= 000000   	IE.NNN= 177674   	MAXALI= 000011

EOM$MX= 000007   	FIXTAB  002206R  	GS$SYM= 000001   	IE.NOD= 177751   	MHD$MX= 000111

EP$SW = ****** GX	FO.APD= 000106   	G$SDTY  000001      005	IE.NSF= 177746   	MH$CPY= 000004

ERR     002064R  	FO.MFY= 000002   	IE.ABO= 177761   	IE.NST= 177660   	MH$GTX= 000006

ERRNM   002060R  	FO.RD = 000001   	IE.ALC= 177654   	IE.OFL= 177677   	MH$LNM= 000001

E$OMAD  000003      012	FO.UPD= 000006   	IE.ALN= 177736   	IE.ONP= 177773   	MH$MHD= 000000

E$OMER  000001      012	FO.WRT= 000016   	IE.AST= 177660   	IE.OVR= 177756   	MH$MTC= 000005

E$OMPS  000002      012	F.ACTL= 000076   	IE.BAD= 177777   	IE.PES= 177655   	MH$SRC= 000002

E$R01 = ****** GX	F.ALOC= 000040   	IE.BBE= 177710   	IE.PRI= 177760   	MH$TTL= 000003

E$R02 = ****** GX	F.BBFS= 000062   	IE.BCC= 177676   	IE.RAC= 177724   	MTC$MX= 000213

E$R11 = ****** GX	F.BDB = 000070   	IE.BDI= 177714   	IE.RAT= 177723   	M$HDMS  000003      003

E$R14 = ****** GX	F.BGBC= 000057   	IE.BDR= 177716   	IE.RBG= 177730   	M$HDNM  000005      003

E$R26 = ****** GX	F.BKDN= 000026   	IE.BDV= 177711   	IE.RCN= 177722   	M$HDSL  000002      003

E$R27 = ****** GX	F.BKDS= 000020   	IE.BHD= 177700   	IE.RER= 177740   	M$HDST  000001      003

E$R28 = ****** GX	F.BKEF= 000050   	IE.BLB= 177672   	IE.RNM= 177715   	M$TCPN  000002      004

FA.APD= 000100   	F.BKP1= 000051   	IE.BLK= 177754   	IE.RSU= 177757   	NB.DEV= 000200

FA.CRE= 000010   	F.BKST= 000024   	IE.BNM= 177712   	IE.SNC= 177735   	NB.DIR= 000100

FA.DLK= 001000   	F.BKVB= 000064   	IE.BTF= 177664   	IE.SPC= 177772   	NB.NAM= 000004

FA.ENB= 100000   	F.CHR = 000075   	IE.BTP= 177725   	IE.SQC= 177734   	NB.SD1= 000400

FA.EXC= 002000   	F.CNTG= 000034   	IE.BVR= 177701   	IE.SRE= 177762   	NB.SD2= 001000

FA.EXT= 000004   	F.DFNB= 000046   	IE.BYT= 177755   	IE.STK= 177706   	NB.SNM= 000040

FA.NSP= 000100   	F.DSPT= 000044   	IE.CKS= 177742   	IE.TMM= 177671   	NB.STP= 000020

FA.POS= 010000   	F.DVNM= 000134   	IE.CLO= 177732   	IE.TMO= 177666   	NB.SVR= 000010

FA.RD = 000001   	F.EFBK= 000010   	IE.CNR= 177667   	IE.ULK= 177653   	NB.TYP= 000002

FA.RWD= 004000   	F.EFN = 000050   	IE.CON= 177752   	IE.VER= 177774   	NB.VER= 000001

FA.SEQ= 040000   	F.EOBB= 000032   	IE.DAA= 177770   	IE.WAC= 177743   	N.DID = 000024

FA.SHR= 000040   	F.ERR = 000052   	IE.DAO= 177763   	IE.WAT= 177741   	N.DVNM= 000032

FA.TMP= 000020   	F.FACC= 000043   	IE.DFU= 177750   	IE.WCK= 177652   	N.FID = 000000

FA.WCK= 020000   	F.FFBY= 000014   	IE.DNA= 177771   	IE.WER= 177737   	N.FNAM= 000006

FA.WRT= 000002   	F.FNAM= 000110   	IE.DNR= 177775   	IE.WLK= 177764   	N.FTYP= 000014

FD.BLK= 000010   	F.FNB = 000102   	IE.DUN= 177767   	IE.2DV= 177720   	N.FVER= 000016

FD.CCL= 000002   	F.FTYP= 000116   	IE.DUP= 177707   	IN$COR= ****** GX	N.NEXT= 000022

FD.COM= 020000   	F.FVER= 000120   	IE.EOF= 177766   	IPOINT  000000R  	N.STAT= 000020

FD.CR = 000002   	F.HIBK= 000004   	IE.EOT= 177702   	IS.BV = 000005   	N.UNIT= 000034

FD.DIR= 000010   	F.LUN = 000042   	IE.EOV= 177765   	IS.CC = 001401   	OBJ$SL= 000000

FD.FTN= 000001   	F.MBCT= 000054   	IE.EXP= 177665   	IS.CR = 006401   	OB$DBG= 000004

FD.F11= 040000   	F.MBC1= 000055   	IE.FEX= 177717   	IS.EOT= 002001   	OB$EOM= 000003

FD.INS= 000010   	F.MBFG= 000056   	IE.FHE= 177705   	IS.ESC= 015401   	OB$GSD= 000001

FD.ISP= 002000   	F.NRBD= 000024   	IE.FLN= 177657   	IS.ESQ= 115401   	OB$HDR= 000000

FD.MNT= 100000   	F.NREC= 000030   	IE.FOP= 177713   	IS.PES= 100001   	OB$LNK= 000005

FD.OSP= 004000   	F.OVBS= 000030   	IE.HFU= 177744   	IS.PND= 000000   	OB$TIR= 000002

FD.PLC= 000004   	F.RACC= 000016   	IE.IES= 177656   	IS.RDD= 000002   	OERR    001156R

FD.PRN= 000004   	F.RATT= 000001   	IE.IFC= 177776   	IS.SUC= 000001   	OPOINT  000004R

FD.PSE= 010000   	F.RCNM= 000034   	IE.IFU= 177747   	IS.TAB= 004401   	OPRGRP= 000062

FD.RAH= 000001   	F.RCTL= 000017   	IE.ILL= 177726   	IS.TMO= 000002   	O$BJTY  000000      002

FD.RAN= 000002   	F.RSIZ= 000002   	IE.ISQ= 177703   	JMPERR  001162R  	PAGALI= 000011

FD.REC= 000001   	F.RTYP= 000000   	IE.LCK= 177745   	LB$DTY= ****** GX	PAR$$$= 000000

FD.RWM= 000001   	F.SEQN= 000100   	IE.MOD= 177753   	LIBNAM= ****** GX	PERR    002032R

FD.SDI= 000020   	F.SPDV= 000072   	IE.NBF= 177731   	LIBTAB= ****** GX	PF$GBL= 000020

LIBCM	MACRO M1110  22-AUG-78 02:08  PAGE 4-8

SYMBOL TABLE



PF$OVL= 000004   	R$$11M= 000000   	S$SFL0  000003      007	$CMP    001010RG 	$RDMH = ****** GX

PF$PIC= 000001   	R.FIX = 000001   	S$SFL1  000004      007	$CMPPT= ****** GX	$RDMN = ****** GX

PF$RD = 000200   	R.SEQ = 000003   	S$V2  = ****** GX	$CSIBK= ****** GX	$SAVRG= ****** GX

PF$REL= 000010   	R.VAR = 000002   	S$$LIB= 000000   	$EPBLK= ****** GX	$SCANI= ****** GX

PF$SHR= 000040   	SDF$MX= 000032   	S.FATT= 000016   	$EPT  = ****** GX	$SIZ  = ****** GX

PF$UNI= 000002   	SF$DEF= 000002   	S.FDB = 000140   	$ERMSG= ****** GX	$SWTCH= ****** GX

PF$WRT= 000001   	SF$REL= 000010   	S.FNAM= 000006   	$FINDC= ****** GX	$WRMPG= ****** GX

PF$XEQ= 000100   	SF$UNI= 000004   	S.FNB = 000036   	$FINDN= ****** GX	$WTHD = ****** GX

PSD$MX= 000031   	SF$VAL= 000020   	S.FNBW= 000017   	$FIXLA= ****** GX	$$    = 000001

P$SALI  000002      006	SF$WK = 000001   	S.FNTY= 000004   	$LDIV = ****** GX	$$MSG = 000000

P$SALO  000005      006	SRF$MX= 000025   	S.FTYP= 000002   	$LIBPT= ****** GX	$$S   = 000005

P$SFL0  000003      006	STAGRP= 000000   	S.NFEN= 000020   	$LMUL2= ****** GX	$$0   = 000002

P$SFL1  000004      006	STOGRP= 000024   	TIRMAX= 000121   	$MHBUF= ****** GX	$$1   = 000002

P$SNAM  000012      006	S$DNAM  000013      011	T$CHAR= 000005   	$MHST = ****** GX	.CLOSE= ****** G

P$SNLN  000011      006	S$DNLN  000012      011	T$HEAD= 000000   	$MNBLK= ****** GX	.GETSQ= ****** G

Q$$CMO= 000000   	S$DPSI  000005      011	T$SLEN= 000004   	$MNT  = ****** GX	.MARK = ****** GX

READLH  001166R  	S$DVAL  000006      011	T$SMBL= 000004   	$NEXT = ****** GX	.POINT= ****** GX

RECBUF  000010R  	S$MXLN= 000017   	V$MEML= 000002   	$OPEN = ****** GX	.PUT  = ****** G

RERR    002054R  	S$RNAM  000006      010	WERR    001732R  	$OPNFL= ****** GX	...GBL= 000000

R$MXLN= 001000   	S$RNLN  000005      010	ZERR    002040R  	$RDEP = ****** GX	...TPC= 000140

R$NAME= ****** GX	S$SDTY  000002      007	$     = 000000      012	$RDLHD= ****** GX



. ABS.	000000	   000

      	002274	   001

OBJREC	000001	   002

MHDREC	000111	   003

MTCREC	000213	   004

GSDREC	000002	   005

PSDEF 	000031	   006

SYMBOL	000005	   007

SYMREF	000025	   010

SYMDEF	000032	   011

EOMREC	000007	   012

ERRORS DETECTED:  0



VIRTUAL MEMORY USED:  4025 WORDS  ( 16 PAGES)

DYNAMIC MEMORY:  4884 WORDS  ( 18 PAGES)

ELAPSED TIME:  00:00:24

OBJ$:LIBCM,LIS$:LIBCM/-SP=SRC$:NEWFORMAT.,LIBPRE,LIBCM

