FORMAT	MACRO M1110  22-AUG-78 02:13

TABLE OF CONTENTS



     1-  300	OBJECT LANGUAGE DEFS

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





    100						.TITLE	FORMAT

    200						.IDENT	/X0300/

    300						.SBTTL	OBJECT LANGUAGE DEFS

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

LIBPUT	MACRO M1110  22-AUG-78 02:13  PAGE 4





      1						.TITLE	LIBPUT

      2						.IDENT	/04/

      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 04

     23					;

     24					; WRITTEN BY:

     25					;	GEORGE W. BERRY

     26					;

     27					; MODIFIED BY:

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

     29					;	C.A. D'ELIA	02-JUL-74  (VIRTUAL TABLES)

     30					;	THOMAS J. MILLER 29-OCT-74

     31					;

     32					;

     33					; LOCAL STORAGE:

     34					;

     35	000000				VBLOCK:	.BLKW	10.		;+++STAR EDMSG CMD BLOCK STORAGE

LIBPUT	MACRO M1110  22-AUG-78 02:13  PAGE 5





     37					;+

     38					; **-PUT- PUT AN ENTRY IN A TABLE

     39					;

     40					; INPUTS:

     41					;

     42					;	R1 - POINTS TO FIRST BYTE OF NAME

     43					;	R2 - POINTS TO TABLE DESCRIPTOR BLOCK

     44					;	R4 - POINTS TO NUMBER OF ENTRIES AVAILABLE

     45					;

     46					;	WHERE THE FORMAT FOR THE DESCRIPTOR BLOCK IS

     47					;	AS FOLLOWS:

     48					;	       .WORD	SIZE

     49					;	       .WORD	ADDR

     50					;		.WORD	NUMBER

     51					;	  SIZE = SIZE OF ENTRIES

     52					;	  ADDR = ADDRESS OF FIRST ENTRY

     53					;	NUMBER = NUMBER OF ENTRIES IN THE TABLE

     54					;

     55					; OUTPUTS:

     56					;

     57					;	R0 AND R2 ARE LOST

     58					;	ALL OTHER REGISTERS PRESERVED

     59					;

     60					;-

     61

     62						.ENABL	LSB

     63

     64	000024	005714 			PUT::	TST	(R4)		;ARE ANY ENTRIES AVAILABLE?

     65	000026	001465 				BEQ	30$		;ERROR IF NOT

     66	000030					CALL	10$		;PUT THE ENTRY IN THE DESIRED TABLE

     67	000034	005314 				DEC	(R4)		;DECREMENT ENTRIES AVAILABLE COUNT

     68	000036					RETURN

     69

     70	000040				10$:	SAVRG			;SAVE R3-R5

     71	000044	010146 				MOV	R1,-(SP)	;SAVE ADDR OF SYMBO

     72	000046	010203 				MOV	R2,R3		;SAVE ADDR OF TABLE DESCRIPTOR BLOCK

     73	000050	010100 				MOV	R1,R0		;+++STAR SET UP R0 FOR CALL RO $FINDA

     74	000052					CALL	$FINDA		;SEARCH TABLE TO FIND SLOT FOR SYMBOL

     75	000056	103061 				BCC	REPLAC		;MATCH FOUND--THIS MAY REQUIRE A REPLACEMENT

     76	000060	005702 				TST	R2		;WAS A SLOT FOUND?

     77	000062	001403 				BEQ	20$		;BRANCH IF TRUE

     78	000064	012701 			15$:	MOV	(PC)+,R1	;ELSE, SYMBOL IS TOO BIG

     79	000066	   000G	   000G			.BYTE	E$R30,S$V2	;INVALID INPUT MODULE FORMAT

     80	000070	000446 				BR	35$		;FATAL ERROR

     81

     82	000072	005701 			20$:	TST	R1		;IS LINK TO SLOT A LIST HEAD?

     83	000074	001403 				BEQ	22$		;BRANCH IF TRUE

     84	000076	005760 	000002 			TST	T$HEAD+V$MEML(R0) ;+++STAR ELSE, IS LINK TO SLOT LOGICALLY DELETED?

     85	000102	001510 				BEQ	RPLAC0		;YES, TREAT AS A MODIFIED REPLACE

     86	000104	010004 			22$:	MOV	R0,R4		;PUT ADDR OF LINK TO SLOT IN R4

     87	000106	010105 				MOV	R1,R5		;PUT VIRTUAL LOCN OF LINK TO SLOT IN R5

     88	000110	001402 				BEQ	25$		;BRANCH IF LINK IS A LIST HEAD

     89	000112					CALL	$LCKPG		;ELSE, LOCK THE PAGE CONTAINING THE LINK

     90	000116	011301 			25$:	MOV	(R3),R1		;GET ENTRY SIZE IN R1

     91	000120	062701 	000002 			ADD	#V$MEML,R1	;+++STAR ADD IN ROOM FOR A LINK WORD

     92	000124					CALL	$ALVRT		;ALLOCATE VIRTUAL MEMORY FOR THE ENTRY + LINK

     93	000130					CALL	$NWLNK		;UNLOCK OLD LINK AND INSERT NEW ENTRY

LIBPUT	MACRO M1110  22-AUG-78 02:13  PAGE 5-1





     94	000134				PUT1:

     95	000134	012601 				MOV	(SP)+,R1	;+++STAR RESTORE ADDR OF SYMBOL

     96	000136	010103 				MOV	R1,R3		;+++STAR COPY ADDR INTO R3

     97	000140	016764 	000000G	000002 		MOV	L$NX,T$HEAD+V$MEML(R4) ;+++STAR MOVE MODULE HEADER ADDR...

     98	000146	016764 	000002G	000004 		MOV	L$NX+2,T$HEAD+2+V$MEML(R4) ;+++STAR   ...INTO NEW ENTRY

     99	000154	111305 				MOVB	(R3),R5		;+++STAR GET NAME LENGTH

    100	000156	005205 				INC	R5		;+++STAR ADD 1 FOR THE COUNT

    101	000160	062704 	000006 			ADD	#T$SMBL+V$MEML,R4 ;+++STAR POINT R4 AT NAME ENTRY AREA

    102	000164				27$:

    103	000164	112324 				MOVB	(R3)+,(R4)+	;+++STAR MOVE IN THE MODULE NAME

    104	000166					SOB	R5,27$		;+++STAR LOOP TIL DONE

    105	000172	052767 	000000G	000002G		BIS	#LB$DTY,$SWTCH+2 ;+++STAR INDICATE MODIFICATION

    106	000200					RETURN

    107

    108	000202	012701 			30$:	MOV	(PC)+,R1	;FATAL--EPT OR MNT FULL

    109	000204	   000G	   000G			.BYTE	E$R15,S$V2

    110	000206	016700 	000000G		35$:	MOV	$INPPT,R0	;POINT R0 TO INPUT FILE INFO

    111	000212	016002 	000000G			MOV	R$NAME(R0),R2	;FATAL ERROR

    112	000216	000167 	000000G		ERRXIT:	JMP	$ERMSG

    113

    114						.DSABL	LSB

    115

    116					;

    117					; A MATCH HAS BEEN FOUND IN THE TABLE.  IF IT IS NOT ALREADY

    118					; LOGICALLY DELETED, TREAT THIS AS A MODIFIED REPLACE.  IF THE

    119					; SYMBOL IS STILL ACTIVE, A CHECK MUST BE MADE TO SEE IF WE CAN

    120					; REPLACE IT.  IF THAT IS PERMISIBLE, PERFORM THE REPLACE.

    121					;

    122	000222	005760 	000002 		REPLAC:	TST	T$HEAD+V$MEML(R0) ;+++STAR IS THE SYMBOL STILL BOUND TO A MODULE?

    123	000226	001436 				BEQ	RPLAC0		;NO, IT'S LOGICALLY DELETED--INSERT NEW ONE

    124	000230	005767 	000000G			TST	RPMHD		;YES, IS A REPLACEMENT ALLOWABLE?

    125	000234	001444 				BEQ	KERR		;BRANCH IF NOT

    126	000236	022703 	000000G			CMP	#$EPBLK,R3	;O.K., IS THIS AN EPT OR AN MNT?

    127	000242	001410 				BEQ	20$		;BRANCH IF IT'S AN EPT

    128

    129	000244					CALL	MATCH		;SETUP MODULE REPLACE INFORMATION

    130	000250	103431 				BCS	EPTERR		;AN EPT ERROR HAS OCCURRED EARLIER

    131	000252	012704 	000000G			MOV	#RPMNT,R4	;SAVE NAME AS MNT ENTRY REPLACED

    132	000256	005267 	000000G			INC	L$MA		;UPDATE MNT AVAILABLE COUNT

    133	000262	000407 				BR	30$		;USE COMMON CODE TO INSERT NEW ENTRY

    134

    135	000264				20$:	CALL	MATCH		;MUST MATCH EARLIER MODULE REPLACE INFO

    136	000270	103426 				BCS	KERR		;ERROR IF WE DON'T

    137	000272	005267 	000000G			INC	L$EA		;UPDATE EPT AVAILABLE COUNT

    138	000276	012704 	000000G			MOV	#LASTEP,R4	;SAVE NAME AS LAST EPT ENTRY REPLACED

    139

    140	000302				30$:

    141	000302	010046 				MOV	R0,-(SP)	;+++STAR SAVE R0

    142	000304	062700 	000006 			ADD	#T$SLEN+V$MEML,R0	;+++STAR MOVE POINTER TO NAME

    143	000310	111005 				MOVB	(R0),R5		;+++STAR GET NAME LENGTH

    144	000312	005205 				INC	R5		;+++STAR ADD 1 FOR COUNT

    145	000314				40$:

    146	000314	112024 				MOVB	(R0)+,(R4)+	;+++STAR MOVE NAME

    147	000316					SOB	R5,40$		;+++STAR LOOP TIL DONE

    148	000322	012600 				MOV	(SP)+,R0		;+++STAR RESTORE R0

    149	000324				RPLAC0:	CALL	$WRMPG		;MARK THE PAGE DIRTY

    150	000330	010004 				MOV	R0,R4		;PNT R4 TO ADDR OF ENTRY WE'RE REPLACING

LIBPUT	MACRO M1110  22-AUG-78 02:13  PAGE 5-2





    151	000332	000700 				BR	PUT1		;USE NORMAL INSERT CODE

    152

    153

    154						.ENABL	LSB

    155

    156					;

    157					;+++STAR  THIS ROUTINE WAS REWRITTEN FOR STAR SOFTWARE

    158					;

    159	000334				EPTERR::

    160	000334	012700 	000000G			MOV	#LASTEP,R0	;ADDR OF NAME

    161	000340	012703 	000000G			MOV	#$EPBLK,R3	;SPECIFY GST ERROR MSG

    162	000344	000402 				BR	10$

    163	000346				KERR:

    164	000346	062700 	000006 			ADD	#T$SMBL+V$MEML,R0 ;+++STAR SKIP TO SYMBOL

    165	000352				10$:

    166	000352	012702 	000000'			MOV	#VBLOCK,R2	;ADDR OF $EDMSG CMD BLOCK

    167	000356	112022 				MOVB	(R0)+,(R2)+	;MOVE IN NAME LENGTH

    168	000360	105022 				CLRB	(R2)+		;ZERO HIGH BYTE

    169	000362	010022 				MOV	R0,(R2)+	;SAVE NAME ADDR

    170	000364	016705 	000000G			MOV	$INPPT,R5	;INPUT FILE INFO

    171	000370	016505 	000000G			MOV	R$NAME(R5),R5	;INPUT FILE NAME

    172	000374	012701 	000010 			MOV	#8.,R1		;LENGTH OF INPUT FILE NAME

    173	000400				20$:

    174	000400	012522 				MOV	(R5)+,(R2)+	;MOVE FILE NAME INTO CMD BLOCK

    175	000402					SOB	R1,20$

    176	000406	012702 	000000'			MOV	#VBLOCK,R2	;ADDR OF CMD BLOCK

    177	000412	012701 				MOV	(PC)+,R1	;ASSUME MNT ERROR

    178	000414	   000G	   000G			.BYTE	E$R16,S$V2

    179	000416	022703 	000000G			CMP	#$EPBLK,R3	;VERIFY CORRECT ASSUMPTION

    180	000422	001002 				BNE	30$		;BR IF CORRECT

    181	000424	012701 				MOV	(PC)+,R1	;GST ERROR

    182	000426	   000G	   000G			.BYTE	E$R23,S$V2	;

    183	000430				30$:

    184	000430	000672 				BR	ERRXIT		;FATAL ERROR

    185

    186						.DSABL	LSB

    187

    188

    189					;+

    190					; THIS ROUTINE MATCHES THE MODULE HEADER ADDRESS OF THE

    191					; ENTRY POINTED AT BY R0 WITH 'RPMHD' TO INSURE THAT WE'RE

    192					; REPLACING THE CORRECT MODULE AND ITS ENTRY POINTS.  NOTE

    193					; THAT 'RPMHD' IS INITIALLY ONE.

    194					;

    195					; INPUTS:

    196					;

    197					;	R0 = TABLE ENTRY ADDRESS

    198					;

    199					; OUTPUTS:

    200					;

    201					;	R4 IS TEMPORARY

    202					;	C-BIT IS SET IF MATCH FAILED

    203					;-

    204	000432	012704 	000000G		MATCH:	MOV	#RPMHD,R4

    205	000436	022714 	000001 			CMP	#1,(R4)		;IS THIS THE MNT CALL?

    206	000442	001410 				BEQ	10$		;BRANCH IF TRUE

    207	000444	022460 	000002 			CMP	(R4)+,T$HEAD+V$MEML(R0) ;+++STAR MATCH?

LIBPUT	MACRO M1110  22-AUG-78 02:13  PAGE 5-3





    208	000450	001003 				BNE	5$		;BRANCH IF NOT

    209	000452	021460 	000004 			CMP	(R4),T$HEAD+2+V$MEML(R0) ;+++STAR MATCH?

    210	000456	001406 				BEQ	20$		;EXIT IF MATCH

    211	000460	000261 			5$:	SEC			;BAD MATCH EXIT

    212	000462					RETURN

    213	000464	016024 	000002 		10$:	MOV	T$HEAD+V$MEML(R0),(R4)+ ;+++STAR STORE MODULE HEADER ADDRESS ...

    214	000470	016014 	000004 			MOV	T$HEAD+2+V$MEML(R0),(R4) ;+++STAR ... IN REPLACE INFO BLOCK

    215	000474	000257 			20$:	CCC

    216	000476					RETURN

    217		000001 				.END

LIBPUT	MACRO M1110  22-AUG-78 02:13  PAGE 5-4

SYMBOL TABLE



CTLGRP= 000120   	MHD$MX= 000111   	PF$GBL= 000020   	R$MXLN= 001000   	S$$LIB= 000000

EOM$MX= 000007   	MH$CPY= 000004   	PF$OVL= 000004   	R$NAME= ****** GX	TIRMAX= 000121

EPTERR  000334RG 	MH$GTX= 000006   	PF$PIC= 000001   	R$$11M= 000000   	T$CHAR= 000005

ERRXIT  000216R  	MH$LNM= 000001   	PF$RD = 000200   	SDF$MX= 000032   	T$HEAD= 000000

E$OMAD  000003      012	MH$MHD= 000000   	PF$REL= 000010   	SF$DEF= 000002   	T$SLEN= 000004

E$OMER  000001      012	MH$MTC= 000005   	PF$SHR= 000040   	SF$REL= 000010   	T$SMBL= 000004

E$OMPS  000002      012	MH$SRC= 000002   	PF$UNI= 000002   	SF$UNI= 000004   	VBLOCK  000000R

E$R15 = ****** GX	MH$TTL= 000003   	PF$WRT= 000001   	SF$VAL= 000020   	V$MEML= 000002

E$R16 = ****** GX	MTC$MX= 000213   	PF$XEQ= 000100   	SF$WK = 000001   	$     = 000000      012

E$R23 = ****** GX	M$HDMS  000003      003	PSD$MX= 000031   	SRF$MX= 000025   	$ALVRT= ****** GX

E$R30 = ****** GX	M$HDNM  000005      003	PUT     000024RG 	STAGRP= 000000   	$EPBLK= ****** GX

GS$ARG= 000003   	M$HDSL  000002      003	PUT1    000134R  	STOGRP= 000024   	$ERMSG= ****** GX

GS$EPM= 000002   	M$HDST  000001      003	P$SALI  000002      006	S$DNAM  000013      011	$FINDA= ****** GX

GS$PSC= 000000   	M$TCPN  000002      004	P$SALO  000005      006	S$DNLN  000012      011	$INPPT= ****** GX

GS$SYM= 000001   	OBJ$SL= 000000   	P$SFL0  000003      006	S$DPSI  000005      011	$LCKPG= ****** GX

G$SDTY  000001      005	OB$DBG= 000004   	P$SFL1  000004      006	S$DVAL  000006      011	$NWLNK= ****** GX

KERR    000346R  	OB$EOM= 000003   	P$SNAM  000012      006	S$MXLN= 000017   	$SAVRG= ****** GX

LASTEP= ****** GX	OB$GSD= 000001   	P$SNLN  000011      006	S$RNAM  000006      010	$SWTCH= ****** GX

LB$DTY= ****** GX	OB$HDR= 000000   	Q$$CMO= 000000   	S$RNLN  000005      010	$WRMPG= ****** GX

L$EA  = ****** GX	OB$LNK= 000005   	REPLAC  000222R  	S$SDTY  000002      007	$$    = 000001

L$MA  = ****** GX	OB$TIR= 000002   	RPLAC0  000324R  	S$SFL0  000003      007	$$S   = 000005

L$NX  = ****** GX	OPRGRP= 000062   	RPMHD = ****** GX	S$SFL1  000004      007	$$0   = 000002

MATCH   000432R  	O$BJTY  000000      002	RPMNT = ****** GX	S$V2  = ****** GX	$$1   = 000002

MAXALI= 000011   	PAGALI= 000011



. ABS.	000000	   000

      	000500	   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:  1104 WORDS  ( 5 PAGES)

DYNAMIC MEMORY:  2772 WORDS  ( 10 PAGES)

ELAPSED TIME:  00:00:10

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

