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.

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





      1						.TITLE	LIBCR

      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 01-NOV-74

     31					;

     32					;	K. D. MORSE	30-NOV-76	++KM001

     33					;

     34					;		 MODIFIED GST AND MNT COMPUTE DUE TO NEW ENTRY SIZE FOR STAR

     35					;	K. D. MORSE	16-JUN-78	++KM002

     36					;

     37					;		FIXED BUG IN COMP ROUTINE FOR R3 = 0.

     38					;

     39

     40					;

     41					; MACRO LIBRARY CALLS

     42					;

     43

     44						.MCALL	GTIM$S

     45

     46					;

     47					; LOCAL DATA

     48					;

     49

     50	000000				TIME:	.BLKW	8.		;DATE AND TIME VALUES

     51

     52

     53					;+

     54					; **-$CRE-CREATE LIBRARY OUTPUT FILE

     55					;

     56					; THIS ROUTINE ALLOCATES THE INITIAL BLANK EPT, MNT AND

     57					; LIBRARY HEADER RECORDS.

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





     58					;

     59					;

     60					; INPUT:

     61					;

     62					;	$SIZ=SIZE OF .LBR FILE IN BLOCKS (HIGHEST RELATIVE BLOCK+1)

     63					;	$EPT=EPT ENTRIES ALLOCATED

     64					;	$MNT=MNT ENTRIES ALLOCATED

     65					;	$TYP=TYPE OF LIBRARY

     66					;	$VRSN=VERSION IDENTIFIER OF LIBRARIAN (2 WORDS)

     67					;

     68					; OUTPUTS:

     69					;

     70					;	NONE

     71					;

     72					;

     73					;-

     74	000020				$CRE::	SAVRG			;SAVE R3-R5

     75	000024	004567 	000000G			JSR	R5,$CLEAR	;CLEAR FIRST 256 WORDS OF L$BUF

     76	000030	000000G				.WORD	L$BUF

     77	000032	000400 				.WORD	256.

     78	000034	016705 	000000G			MOV	$TYP,R5		;GET FILE TYPE

     79					; LOAD TYPE DEPENDENT INFORMATION

     80	000040	110567 	000000G			MOVB	R5,L$TYP	;LOAD TYPE

     81	000044	116567 	000000G	000000G		MOVB	TY$ES(R5),L$ES	;LOAD EPT ENTRY SIZE

     82	000052	116567 	000000G	000000G		MOVB	TY$MS(R5),L$MS	;LOAD MNT ENTRY SIZE

     83	000060	012767 	000000G	000000G		MOV	#EPTBLK,L$ET	;LOAD EPT STARTING BLOCK

     84

     85	000066	112767 	000000G	000000G		MOVB	#ID$,L$ID	;LOAD ID BYTE

     86	000074	016767 	000000G	000000G		MOV	$VRSN,L$VER	;LOAD VERSION IDENTIFICATION

     87	000102	016767 	000002G	000002G		MOV	$VRSN+2,L$VER+2

     88	000110	012704 	000000'			MOV	#TIME,R4

     89	000114					GTIM$S	R4		;GENERATE TIME

     90	000124	103446 				BCS	60$		;OUTPUT TIME ERROR

     91

     92	000126	012705 	000000G		75$:	MOV	#L$DAT,R5	;STORE AT L$DAT

     93	000132	012703 	000006 			MOV	#6,R3		;6 WORDS

     94

     95	000136	012425 			55$:	MOV	(R4)+,(R5)+

     96	000140					SOB	R3,55$

     97	000144	012701 	000000G			MOV	#$EPBLK,R1	;POINT TO $EPBLK TO SET IT UP

     98	000150	016703 	000000G			MOV	$EPT,R3		;GET NUMBER OF ENTRIES REQUESTED

     99	000154					CALL	COMP		;COMPUTE NUMBER TO ACTUALLY ALLOCATE

    100	000160	012767 	000000G	000000G		MOV	#$EPTHL,$EPADR	;SET ADDR OF EPT PARTITION LIST HEADS

    101	000166	066703 	000000G			ADD	L$ET,R3		;COMPUTE MNT START BLOCK

    102	000172	010367 	000000G			MOV	R3,L$MT		;AND STORE IN LIBRARY HEADER

    103	000176	012701 	000000G			MOV	#$MNBLK,R1	;POINT TO $MNBLK TO SET IT UP

    104	000202	016703 	000000G			MOV	$MNT,R3		;GET NUMBER OF ENTRIES REQUESTED

    105	000206					CALL	COMP		;COMPUTE NUMBER TO ACTUALLY ALLOCATE

    106	000212	012767 	000000G	000000G		MOV	#$MNTHL,$MNADR	;SET ADDR OF MNT PARTITION LIST HEADS

    107	000220	066703 	000000G			ADD	L$MT,R3		;COMPUTE FIRST ACTUAL BLOCK OF FILE

    108

    109	000224	010367 	000000G			MOV	R3,L$NX		;SET BLOCK FOR FIRST MODULE INSERT

    110

    111	000230	052767 	000000C	000002G		BIS	#IN$COR!LB$DTY,$SWTCH+2 ;INDICATE THAT THE HEADER, MNT AND EPT

    112									;ARE SET UP.  WE WILL LET $INS WRITE THEM OUT

    113									;NOTE-$WTHD ALSO COMPUTES L$LA!

    114	000236					CALLR	$WTHD		;WRITE HEADER EPT AND MNT AND EXIT

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





    115

    116	000242	012701 			60$:	MOV	(PC)+,R1	;GTIM$S FAILED

    117	000244	   000G	   000G			.BYTE	E$R17,S$V2

    118	000246	000167 	000000G		ERROR:	JMP	$ERMSG		;FATAL ERROR EXIT

    119

    120	000252	012701 			ZERR:	MOV	(PC)+,R1	;SIZE ERROR

    121	000254	   000G	   000G			.BYTE	E$R13,S$V2

    122	000256	000773 				BR	ERROR		;FATAL ERROR EXIT

    123

    124

    125

    126

    127

    128					;+

    129					; THIS ROUTINE COMPUTES THE NUMBER OF EPT OR MNT ENTRIES

    130					; TO ACTUALLY ALLOCATE (IT FILLS OUT THE TABLE TO THE NEXT

    131					; HIGHEST EVEN BLOCK BOUNDARY).

    132					;

    133					; INPUTS:

    134					;

    135					;	R1 = ADDRESS OF $EPBLK OR $MNBLK

    136					;	R3 = # OF ENTRIES REQUESTED

    137					;	R5 = ADDRESS OF ENTRY SIZE IN L$BUF

    138					;

    139					; OUTPUTS:

    140					;

    141					;	R5 = R5+8.

    142					;	R3 = # OF 256. WORD BLOCKS USED

    143					;	$EPBLK OR $MNBLK IS SET UP PROPERLY

    144					;

    145					;

    146					; ++KM001 THIS ROUTINE MODIFIED COMPLETELY FOR STAR.

    147					;

    148					;-

    149

    150	000260	005004 			COMP:	CLR	R4		;INITIALIZE R4

    151	000262	010546 				MOV	R5,-(SP)	;++KM001 SAVE L$BUF ADDRESS

    152	000264	111500 				MOVB	(R5),R0		;GET ENTRY SIZE (L$?S)

    153	000266	010021 				MOV	R0,(R1)+	;SAVE ENTRY SIZE IN DESCRIPTOR BLOCK

    154	000270	001425 				BEQ	8$		;++KM001 SKIP IF ENTRY SIZE IS ZERO

    155	000272	005721 				TST	(R1)+		;SKIP ADDR OF PARTITION LIST HEADS

    156	000274	012705 	001000 			MOV	#512.,R5	;++KM001 COMPUTE NUMBER OF ENTRIES

    157	000300					DIV	R0,R4		;++KM001 PER BLOCK.

    158	000304	010446 				MOV	R4,-(SP)	;++KM001 SAVE THIS VALUE.

    159	000306	010400 				MOV	R4,R0		;++KM001 NOW DIVIDE THIS VALUE INTO

    160	000310	005004 				CLR	R4		;++KM001 THE NUMBER OF ENTRIES REQUESTED

    161	000312	010305 				MOV	R3,R5		;++KM001 TO GET THE NUMBER OF BLOCKS NEEDED.

    162	000314	001415 				BEQ	9$		;++KM002 IF NONE, DON'T BOTHER COMPUTING.

    163	000316					DIV	R0,R4		;++KM001 NOW CHECK FOR A REMAINDER

    164	000322	005705 				TST	R5		;++KM001 WHICH WOULD INDICATE ANOTHER

    165	000324	001401 				BEQ	5$		;++KM001 BLOCK MUST BE ADDED.

    166	000326	005204 				INC	R4		;++KM001

    167	000330	010400 			5$:	MOV	R4,R0		;++KM001 SAVE NUMBER OF BLOCKS

    168	000332	012604 				MOV	(SP)+,R4	;++KM001 FIND NUMBER OF ENTRIES THAT

    169	000334					MUL	R0,R4		;++KM001 ARE IN THIS NUMBER OF BLOCKS.

    170	000340	010504 				MOV	R5,R4		;++KM001 PUT ANS INTO R4

    171	000342	000404 				BR	15$		;++KM001 SKIP AROUND NO ALLOCATION

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





    172	000344	005721 			8$:	TST	(R1)+		;++KM001 POINT TO TABLE ALLOCN IN DESCRP. BLOCK

    173	000346	000401 				BR	10$		;++KM002 DON'T POP STACK

    174	000350	005726 			9$:	TST	(SP)+		;++KM002 POP OFF # ENTRIES ALLOCATED

    175	000352	005004 			10$:	CLR	R4		;++KM001 NO BLOCKS TO ALLOCATE

    176	000354	012605 			15$:	MOV	(SP)+,R5	;++KM001 RESTORE L$BUF ADDRESS

    177	000356	062705 	000004 			ADD	#4,R5		;++KM001 POINT TO L$?I

    178	000362	010425 				MOV	R4,(R5)+	;STORE ENTRIES ALLOCATED (L$?I)

    179	000364	010425 				MOV	R4,(R5)+	;STORE ENTRIES AVAILABLE (L$?A)

    180	000366	010411 				MOV	R4,(R1)		;SAVE TABLE ALLOCN IN DESCRIPTOR BLOCK

    181	000370	010003 				MOV	R0,R3		;++KM001 SET NUMBER OF BLOCKS USED

    182	000372					RETURN

    183

    184

    185					;

    186		000001 				.END

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

SYMBOL TABLE



COMP    000260R  	L$DAT = ****** GX	OB$GSD= 000001   	SF$DEF= 000002   	T$SMBL= 000004

CTLGRP= 000120   	L$ES  = ****** GX	OB$HDR= 000000   	SF$REL= 000010   	V$MEML= 000002

EOM$MX= 000007   	L$ET  = ****** GX	OB$LNK= 000005   	SF$UNI= 000004   	ZERR    000252R

EPTBLK= ****** GX	L$ID  = ****** GX	OB$TIR= 000002   	SF$VAL= 000020   	$     = 000000      012

ERROR   000246R  	L$MS  = ****** GX	OPRGRP= 000062   	SF$WK = 000001   	$CLEAR= ****** GX

E$OMAD  000003      012	L$MT  = ****** GX	O$BJTY  000000      002	SRF$MX= 000025   	$CRE    000020RG

E$OMER  000001      012	L$NX  = ****** GX	PAGALI= 000011   	STAGRP= 000000   	$EPADR= ****** GX

E$OMPS  000002      012	L$TYP = ****** GX	PF$GBL= 000020   	STOGRP= 000024   	$EPBLK= ****** GX

E$R13 = ****** GX	L$VER = ****** GX	PF$OVL= 000004   	S$DNAM  000013      011	$EPT  = ****** GX

E$R17 = ****** GX	MAXALI= 000011   	PF$PIC= 000001   	S$DNLN  000012      011	$EPTHL= ****** GX

GS$ARG= 000003   	MHD$MX= 000111   	PF$RD = 000200   	S$DPSI  000005      011	$ERMSG= ****** GX

GS$EPM= 000002   	MH$CPY= 000004   	PF$REL= 000010   	S$DVAL  000006      011	$LDIV = ****** GX

GS$PSC= 000000   	MH$GTX= 000006   	PF$SHR= 000040   	S$MXLN= 000017   	$LMUL2= ****** GX

GS$SYM= 000001   	MH$LNM= 000001   	PF$UNI= 000002   	S$RNAM  000006      010	$MNADR= ****** GX

G$SDTY  000001      005	MH$MHD= 000000   	PF$WRT= 000001   	S$RNLN  000005      010	$MNBLK= ****** GX

G.TICP= 000016   	MH$MTC= 000005   	PF$XEQ= 000100   	S$SDTY  000002      007	$MNT  = ****** GX

G.TICT= 000014   	MH$SRC= 000002   	PSD$MX= 000031   	S$SFL0  000003      007	$MNTHL= ****** GX

G.TIDA= 000004   	MH$TTL= 000003   	P$SALI  000002      006	S$SFL1  000004      007	$SAVRG= ****** GX

G.TIHR= 000006   	MTC$MX= 000213   	P$SALO  000005      006	S$V2  = ****** GX	$SWTCH= ****** GX

G.TIMI= 000010   	M$HDMS  000003      003	P$SFL0  000003      006	S$$LIB= 000000   	$TYP  = ****** GX

G.TIMO= 000002   	M$HDNM  000005      003	P$SFL1  000004      006	TIME    000000R  	$VRSN = ****** GX

G.TISC= 000012   	M$HDSL  000002      003	P$SNAM  000012      006	TIRMAX= 000121   	$WTHD = ****** GX

G.TIYR= 000000   	M$HDST  000001      003	P$SNLN  000011      006	TY$ES = ****** GX	$$    = 000001

ID$   = ****** GX	M$TCPN  000002      004	Q$$CMO= 000000   	TY$MS = ****** GX	$$S   = 000005

IN$COR= ****** GX	OBJ$SL= 000000   	R$MXLN= 001000   	T$CHAR= 000005   	$$$OST= 000020

LB$DTY= ****** GX	OB$DBG= 000004   	R$$11M= 000000   	T$HEAD= 000000   	$$0   = 000002

L$BUF = ****** GX	OB$EOM= 000003   	SDF$MX= 000032   	T$SLEN= 000004   	$$1   = 000002



. ABS.	000000	   000

      	000374	   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:  1616 WORDS  ( 7 PAGES)

DYNAMIC MEMORY:  2772 WORDS  ( 10 PAGES)

ELAPSED TIME:  00:00:09

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

