FORMAT	MACRO M1110  22-AUG-78 02:07

TABLE OF CONTENTS



     1-  300	OBJECT LANGUAGE DEFS

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





    100						.TITLE	FORMAT

    200						.IDENT	/X0300/

    300						.SBTTL	OBJECT LANGUAGE DEFS

FORMAT	MACRO M1110  22-AUG-78 02:07  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.

LIB	MACRO M1110  22-AUG-78 02:07  PAGE 4





      1						.TITLE	LIB

      2					; COPYRIGHT (C) 1976, 1977

      3					; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

      4					;

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

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

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

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

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

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

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

     12					;

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

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

     15					; EQUIPMENT CORPORATION.

     16					;

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

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

     19					;

     20					; VERSION X129.0

     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 LIB SIZE)

     34					;

     35					;	T. J. MILLER 11-JAN-76

     36					;

     37					;		TM001 -- ADDITION OF EXTRACT SWITCH (/EX).

     38					;

     39					;	T. J. MILLER 22-JAN-76

     40					;

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

     42					;

     43					;

     44					;

     45					;

     46					; LIBRARIAN ROOT SEGMENT.

     47					;

     48

     49

     50					;

     51					; LIBRARIAN VERSION IDENTIFICATION

     52					;

     53

     54						.MACRO	VERSN	VER

     55						.IDENT	/VER/

     56					$VRSN::	.RAD50	/VER/

     57						.IIF EQ	<.-2-$VRSN>,	.WORD	0

LIB	MACRO M1110  22-AUG-78 02:07  PAGE 4-1





     58						.IIF B	<VER>,	.ERROR		;LIB VERSION MUST BE SPECIFIED

     59						.ENDM

     60

     61

     62	000000					VERSN	<X129.0>	;+++STAR

     63					;

     64					; LOCAL DATA

     65					;

     66

     67	000004				SPSAV:	.BLKW	1		;SAVED INITIAL STACK POINTER

     68

     69					;

     70					; MACRO LIBRARY CALLS

     71					;

     72

     73						.MCALL	EXIT$S,FINIT$

     74

     75

     77

     78						.MCALL	OFNB$,FDOFF$

     79	000006					FDOFF$	DEF$L

     80

     82

     83

     89

     90

     91					;+

     92					;

     93					; **-$LIB- ENTRY TO RSX11D/M LIBRARIAN

     94					;

     95					;-

     96

     97	000006				$LIB::	FINIT$			;INITIALIZE FCS

     98

     99

    108

    109

    110	000012	010667 	177766 			MOV	SP,SPSAV	;SAVE FOR REENTRY

    111

    112	000016	016706 	177762 		$RSTRT::MOV	SPSAV,SP	;RESTART ENTRY

    113	000022					CALL	$INIT		;INIT LIB AND GET COMMAND LINE

    114	000026					CALL	$DECD		;GET OPTIONS

    115	000032	032715 	000000G			BIT	#CR$SW,(R5)	;/CR?

    116	000036	001402 				BEQ	10$

    117	000040					CALL	$CRE

    118

    119	000044	032715 	000000G		10$:	BIT	#DL$SW,(R5)	;/DE?

    120	000050	001402 				BEQ	20$

    121	000052					CALL	$DEL

    122

    123	000056	032715 	000000G		20$:	BIT	#IN$SW,(R5)	;/IN?

    124	000062	001402 				BEQ	30$

    125	000064					CALL	$INS

    126

    127	000070	032715 	000000G		30$:	BIT	#CO$SW,(R5)	;/CO?

    128	000074	001402 				BEQ	40$

    129	000076					CALL	$CMP		;PERFORM FILE COMPRESS

LIB	MACRO M1110  22-AUG-78 02:07  PAGE 4-2





    130

    131	000102	032715 	000000G		40$:	BIT	#EX$SW,(R5)	;/EX?                                           ; TM001

    132	000106	001402 				BEQ	50$                                                             ; TM001

    133	000110					CALL	$EXT		;PERFORM MODULE EXTRACTION                      ; TM001

    134					                                                                                ; TM001

    135	000114	000167 	000000G		50$:	JMP	$LISCD		;CHECK FOR LISTING AND ...                      ; TM001

    136									;... CLOSE LIBRARY FILE                         ;**-1

    137

    138

    139

    140	000120				$QUIT::

    141

    142

    150

    151

    152	000120					EXIT$S			;CALL RSX11D

    153

    154

    155

    156					;+

    157					;

    158					; THIS ROUTINE CLEARS A DESIGNATED AREA.

    159					;

    160					; CALLED BY:

    161					;

    162					;	JSR	R5,$CLEAR

    163					;	.WORD	START-OF-AREA-TO-CLEAR

    164					;	.WORD	NUMBER-OF-WORDS-TO-CLEAR

    165					;

    166					;-

    167	000126	012501 			$CLEAR::MOV	(R5)+,R1	;GET START OF AREA

    168	000130	012502 				MOV	(R5)+,R2	;GET NUMBER OF WORDS

    169	000132	005021 			10$:	CLR	(R1)+		;CLEAR DESIGNATED AREA

    170	000134					SOB	R2,10$		;

    171	000140	000205 				RTS	R5

    172

    173

    175

    176

    177					;+

    178					;

    179					; *-$OPEN-*-PARSE FILENAME AND OPEN FILE

    180					;

    181					; INPUTS:

    182					;	R0=ADDRESS OF FDB

    183					;	R1=FILE OPEN FUNCTION, E.G.  #FO.WRT , ETC

    184					;

    185					;-

    186

    187	000142				$OPEN::	SAVRG			;SAVE R3-R5

    188	000146	010104 				MOV	R1,R4		;COPY FUNCTION INTO R4

    189	000150	010001 				MOV	R0,R1		;POINT R1 TO THE FILE NAME BLOCK

    190	000152	062701 	000102 			ADD	#F.FNB,R1	;

    191	000156	016002 	000044 			MOV	F.DSPT(R0),R2	;POINT R2 TO FILE DESCRIPTOR

    192	000162	016003 	000046 			MOV	F.DFNB(R0),R3	;POINT R3 TO DEFAULT FILENAME BLOCK

    193	000166					CALL	.PARSE		;PARSE FILENAME, CREATING FILENAME BLK

    194	000172	103404 				BCS	10$		;SKIP ON ERROR

LIB	MACRO M1110  22-AUG-78 02:07  PAGE 4-3





    195	000174					OFNB$	R0,R4		;OPEN FILE (WITH DESIRED FUNCTION)

    196	000204				10$:	RETURN			;

    197

    198

    200

    201

    203

    204

    205					;+

    206					;

    207					; *-$LMUL1-*-MULTIPLY WITH A SINGLE WORD RESULT

    208					; *-$LMUL2-*-MULTIPLY WITH A DOUBLE WORD RESULT

    209					; *-$LDIV-*-DIVIDE

    210					;

    211					; $LMUL1 PERFORMS AS 'MUL  R0,R3'

    212					; $LMUL2 PERFORMS AS 'MUL  R0,R4'

    213					; $LDIV  PERFORMS AS 'DIV  R0,R4'

    214					;

    215					;-

    216

    217	000206	010446 			$LMUL1::MOV	R4,-(SP)	;SAVE R4 AND R5

    218	000210	010546 				MOV	R5,-(SP)	;

    219	000212	010304 				MOV	R3,R4		;COPY MULTIPLICAND INTO R4

    220	000214					CALL	$LMUL2		;PERFORM 2-WORD RESULT MULTIPLY

    221	000220	010503 				MOV	R5,R3		;PUT SINGLE PRECISION ANSWER IN R3

    222	000222	012605 				MOV	(SP)+,R5	;RESTORE R5 AND R4

    223	000224	012604 				MOV	(SP)+,R4	;

    224	000226					RETURN

    225

    226	000230	010046 			$LMUL2::MOV	R0,-(SP)	;SAVE R0

    227	000232	010146 				MOV	R1,-(SP)	;SAVE R1

    228	000234	010446 				MOV	R4,-(SP)	;COPY MULTIPLICAND INTO STACK

    229	000236	005001 				CLR	R1		;INIT HIGH WORD OF MULTIPLIER

    230	000240	005004 				CLR	R4		;INITIALIZE THE DOUBLE WORD RESULT

    231	000242	005005 				CLR	R5		;

    232	000244	005716 			10$:	TST	(SP)		;TEST REMAINDER OF MULTIPLICAND

    233	000246	001410 				BEQ	30$		;IF ZERO, WE'RE DONE

    234	000250	006016 				ROR	(SP)		;DIVIDE MULTIPLICAND BY TWO

    235	000252	103003 				BCC	20$		;SKIP IF BIT-0 WAS ZERO

    236	000254	060005 				ADD	R0,R5		;ELSE, ADD THE MULTIPLIER ...

    237	000256	005504 				ADC	R4		;... TO THE DOUBLE WORD RESULT

    238	000260	060104 				ADD	R1,R4

    239	000262	006300 			20$:	ASL	R0		;DOUBLE THE MULTIPLIER

    240	000264	006101 				ROL	R1		;...DOUBLE PRECISION

    241	000266	000766 				BR	10$		;AND REPEAT

    242	000270	005726 			30$:	TST	(SP)+		;CLEAN THE STACK

    243	000272	012601 				MOV	(SP)+,R1	;RESTORE R1

    244	000274	012600 				MOV	(SP)+,R0	;RESTORE R0

    245	000276	005704 				TST	R4		;EXAMINE HIGH ORDER OF RESULT

    246	000300	001002 				BNE	40$		;IF NOT NULL, SET CARRY

    247	000302	005705 				TST	R5		;ELSE, EXAMINE LOW ORDER OF RESULT

    248	000304	100001 				BPL	50$		;IF NOT NEGATIVE, LEAVE

    249	000306	000261 			40$:	SEC			;SET CARRY

    250	000310				50$:	RETURN

    251

    252

    253	000312	010346 			$LDIV::	MOV	R3,-(SP)	;SAVE R3

LIB	MACRO M1110  22-AUG-78 02:07  PAGE 4-4





    254	000314	012746 	000040 			MOV	#32.,-(SP)	;DIVIDEND HAS 32. BITS

    255	000320	005003 				CLR	R3		;INITIALIZE THE REMAINDER

    256	000322	006305 			10$:	ASL	R5		;SHIFT THE REMAINING DIVIDEND ...

    257	000324	006104 				ROL	R4		;... LEFT AND INTO THE REMAINDER

    258	000326	006103 				ROL	R3		;

    259	000330	020300 				CMP	R3,R0		;COMPARE REMAINDER W/ DIVISOR

    260	000332	103402 				BLO	20$		;SKIP IF IT'S LESS

    261	000334	160003 				SUB	R0,R3		;SUBTRACT DIVISOR FROM REMAINDER

    262	000336	005205 				INC	R5		;AND INCREMENT THE QUOTIENT

    263	000340	005316 			20$:	DEC	(SP)		;DECREMENT ITERATION COUNTER

    264	000342	001367 				BNE	10$		;CONTINUE UNTIL IT'S ZERO

    265	000344	005726 				TST	(SP)+		;PURGE ITERATION COUNT FROM STACK

    266	000346	010504 				MOV	R5,R4		;PUT QUOTIENT IN R4

    267	000350	010305 				MOV	R3,R5		;PUT REMAINDER IN R5

    268	000352	012603 				MOV	(SP)+,R3	;RESTORE R3

    269	000354					RETURN

    270

    271

    273

    274

    275					;+

    276					; **-$NWLNK-*-INSERT ELEMENT INTO VIRTUAL MEMORY TABLE

    277					;

    278					; THIS ROUTINE INSERTS AN ELEMENT INTO A LINKED-LIST VIRTUAL MEMORY

    279					; TABLE.  IT UNLOCKS AND MARKS DIRTY THE PAGE CONTAINING THE LINK OF

    280					;  THE CURRENT TABLE ENTRY, IF NECESSARY.  FINALLY, THE NEWLY INSERTED

    281					; ENTRY BECOMES THE CURRENT ENTRY.

    282					;

    283					; INPUTS:

    284					;	R0 = ADDRESS OF NEW ENTRY

    285					;	R1 = VIRTUAL MEMORY LOCATION OF NEW ENTRY

    286					;	R4 = ADDRESS OF CURRENT ENTRY

    287					;	R5 = VIRTUAL MEMORY LOCATION OF CURRENT ENTRY

    288					;

    289					; OUTPUTS:

    290					;	R0 & R1 ARE LOST

    291					;	R4 = ADDRESS OF NEW CURRENT ENTRY

    292					;	R5 = VIRTUAL MEMORY LOCATION OF NEW CURRENT ENTRY

    293					;

    294					;-

    295

    296	000356	011410 			$NWLNK::MOV	(R4),(R0)	;LINK NEXT ELEMENT TO NEW ENTRY

    297	000360	010114 				MOV	R1,(R4)		;LINK NEW ENTRY TO CURRENT ELEMENT

    298	000362	010546 				MOV	R5,-(SP)	;SAVE VIRTUAL LOCATION OF CURRENT ELE

    299	000364	010004 				MOV	R0,R4		;NEW ENTRY BECOMES CURRENT ELEMENT ...

    300	000366	010105 				MOV	R1,R5		;... BY STORING ITS ADDR AND V.L.

    301	000370	012601 				MOV	(SP)+,R1	;PUT VIRTUAL LOCN OF OLD ELE IN R1

    302	000372	001404 				BEQ	10$		;BRANCH IF IT WAS A LIST HEAD

    303	000374					CALL	$WRMPG		;ELSE, MARK DIRTY AND ...

    304	000400					CALL	$UNLPG		;... UNLOCK PAGE WITH OLD LINK

    305	000404				10$:	RETURN

    306

    307

    308		000006'				.END	$LIB

LIB	MACRO M1110  22-AUG-78 02:07  PAGE 4-5

SYMBOL TABLE



CO$SW = ****** GX	F.MBCT= 000054   	M$HDNM  000005      003	P$SFL0  000003      006	TIRMAX= 000121

CR$SW = ****** GX	F.MBC1= 000055   	M$HDSL  000002      003	P$SFL1  000004      006	T$CHAR= 000005

CTLGRP= 000120   	F.MBFG= 000056   	M$HDST  000001      003	P$SNAM  000012      006	T$HEAD= 000000

DL$SW = ****** GX	F.NRBD= 000024   	M$TCPN  000002      004	P$SNLN  000011      006	T$SLEN= 000004

EOM$MX= 000007   	F.NREC= 000030   	N.DID = 000024   	Q$$CMO= 000000   	T$SMBL= 000004

EX$SW = ****** GX	F.OVBS= 000030   	N.DVNM= 000032   	R$MXLN= 001000   	V$MEML= 000002

E$OMAD  000003      012	F.RACC= 000016   	N.FID = 000000   	R$$11M= 000000   	$     = 000000      012

E$OMER  000001      012	F.RATT= 000001   	N.FNAM= 000006   	SDF$MX= 000032   	$CLEAR  000126RG

E$OMPS  000002      012	F.RCNM= 000034   	N.FTYP= 000014   	SF$DEF= 000002   	$CMP  = ****** GX

F.ACTL= 000076   	F.RCTL= 000017   	N.FVER= 000016   	SF$REL= 000010   	$CRE  = ****** GX

F.ALOC= 000040   	F.RSIZ= 000002   	N.NEXT= 000022   	SF$UNI= 000004   	$DECD = ****** GX

F.BBFS= 000062   	F.RTYP= 000000   	N.STAT= 000020   	SF$VAL= 000020   	$DEL  = ****** GX

F.BDB = 000070   	F.SEQN= 000100   	N.UNIT= 000034   	SF$WK = 000001   	$EXT  = ****** GX

F.BGBC= 000057   	F.SPDV= 000072   	OBJ$SL= 000000   	SPSAV   000004R  	$INIT = ****** GX

F.BKDN= 000026   	F.SPUN= 000074   	OB$DBG= 000004   	SRF$MX= 000025   	$INS  = ****** GX

F.BKDS= 000020   	F.STBK= 000036   	OB$EOM= 000003   	STAGRP= 000000   	$LDIV   000312RG

F.BKEF= 000050   	F.UNIT= 000136   	OB$GSD= 000001   	STOGRP= 000024   	$LIB    000006RG

F.BKP1= 000051   	F.URBD= 000020   	OB$HDR= 000000   	S$DNAM  000013      011	$LISCD= ****** GX

F.BKST= 000024   	F.VBN = 000064   	OB$LNK= 000005   	S$DNLN  000012      011	$LMUL1  000206RG

F.BKVB= 000064   	F.VBSZ= 000060   	OB$TIR= 000002   	S$DPSI  000005      011	$LMUL2  000230RG

F.CHR = 000075   	GS$ARG= 000003   	OPRGRP= 000062   	S$DVAL  000006      011	$NWLNK  000356RG

F.CNTG= 000034   	GS$EPM= 000002   	O$BJTY  000000      002	S$MXLN= 000017   	$OPEN   000142RG

F.DFNB= 000046   	GS$PSC= 000000   	PAGALI= 000011   	S$RNAM  000006      010	$QUIT   000120RG

F.DSPT= 000044   	GS$SYM= 000001   	PAR$$$= 000000   	S$RNLN  000005      010	$RSTRT  000016RG

F.DVNM= 000134   	G$SDTY  000001      005	PF$GBL= 000020   	S$SDTY  000002      007	$SAVRG= ****** GX

F.EFBK= 000010   	IN$SW = ****** GX	PF$OVL= 000004   	S$SFL0  000003      007	$UNLPG= ****** GX

F.EFN = 000050   	MAXALI= 000011   	PF$PIC= 000001   	S$SFL1  000004      007	$VRSN   000000RG

F.EOBB= 000032   	MHD$MX= 000111   	PF$RD = 000200   	S$$LIB= 000000   	$WRMPG= ****** GX

F.ERR = 000052   	MH$CPY= 000004   	PF$REL= 000010   	S.FATT= 000016   	$$    = 000001

F.FACC= 000043   	MH$GTX= 000006   	PF$SHR= 000040   	S.FDB = 000140   	$$S   = 000005

F.FFBY= 000014   	MH$LNM= 000001   	PF$UNI= 000002   	S.FNAM= 000006   	$$0   = 000002

F.FNAM= 000110   	MH$MHD= 000000   	PF$WRT= 000001   	S.FNB = 000036   	$$1   = 000002

F.FNB = 000102   	MH$MTC= 000005   	PF$XEQ= 000100   	S.FNBW= 000017   	.FINIT= ****** G

F.FTYP= 000116   	MH$SRC= 000002   	PSD$MX= 000031   	S.FNTY= 000004   	.OPFNB= ****** G

F.FVER= 000120   	MH$TTL= 000003   	P$SALI  000002      006	S.FTYP= 000002   	.PARSE= ****** GX

F.HIBK= 000004   	MTC$MX= 000213   	P$SALO  000005      006	S.NFEN= 000020   	...TPC= 000140

F.LUN = 000042   	M$HDMS  000003      003



. ABS.	000000	   000

      	000406	   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:  2557 WORDS  ( 10 PAGES)

DYNAMIC MEMORY:  3828 WORDS  ( 14 PAGES)

ELAPSED TIME:  00:00:14

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

