P5CRF	MACRO M1110  22-AUG-78 01:54  PAGE 3





      1						.TITLE	P5CRF

      2						.IDENT	/02/

      3

      4					;

      5					; COPYRIGHT (C) 1976,1977

      6					; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

      7					;

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

      9					; SINGLE COMPUTER SYSTEM AND MAY  BE  COPIED   ONLY  WITH  THE

     10					; INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE,  OR

     11					; ANY OTHER COPIES THEREOF, MAY NOT BE PROVIDED  OR  OTHERWISE

     12					; MADE AVAILABLE TO ANY OTHER PERSON   EXCEPT FOR  USE ON SUCH

     13					; SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE  TERMS.  TITLE

     14					; TO AND OWNERSHIP OF THE SOFTWARE SHALL AT ALL  TIMES  REMAIN

     15					; IN 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					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF

     22					; ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

     23					;

     24					; VERSION 02

     25					;

     26					; C. MONIA 15-JAN-75

     27					;

     28					; MODIFICATIONS:

     29					;

     30					; NO.		DATE		PROGRAMMER

     31					; ---		----		----------

     32					;

     33					; 056		08-APR-76	C. MONIA

     34					; JAK110	09-SEP-77	CHANGE THE START UP OF CREF

     35					;

     36					;

     37					; PHASE 5 CREF OUTPUT

     38					;

     39					; MACRO LIBRARY CALLS

     40					;

     41

     42						.MCALL	CLOSE$,DIR$,OFNB$W,RQST$,SDAT$

     43

     44					;

     45					; EQUATED SYMBOLS

     46					;

     47

     48

     49		000001 			CRSPL=000001			; CREF SPOOLING FLAG

     50

     51					;

     52					; LOCAL DATA

     53					;

     54					;

     55															;**-10

     56					;

     57					; SEND DATA BUFFER

P5CRF	MACRO M1110  22-AUG-78 01:54  PAGE 3-1





     58					;

     59

     60	000000				SNDBF:	.BLKW	13.		;

     61

     62					;+

     63					; **-$P5CRF-CREATE CREF OUTPUT FILE

     64					;

     65					; THIS SUBROUTINE IS CALLED AFTER THE MAP FILE HAS BEEN OUTPUT

     66					; TO WRITE THE CREF OUTPUT FILE AND INVOKE THE CREF TASK. IF NO CREF WAS

     67					; REQUESTED, THE MAP FILE IS SPOOLED(IF SPECIFIED) AND CLOSED.

     68					;

     69					; INPUTS:

     70					;

     71					;	TABLES CONSTRUCTED IN PHASE 3

     72					;	MAP FILE FDB (FILE MUST BE OPEN)

     73					;

     74					; OUTPUTS:

     75					;

     76					;	IF A CREF FILE IS TO BE PRODUCED, THE APPROPRIATE SUBROUTINES

     77					;	ARE CALLED TO CREATE THE FILE AND THE CREF TASK IS INVOKED.

     78					;	ELSE, THE MAP FILE IS CLOSED AND THE SPOOLER IS REQUESTED.

     79					;

     80					;-

     81

     82	000032				$P5CRF::			;

     83	000032					SAVRG			; SAVE THE NON-VOLATILE REGISTERS

     84	000036	012705 	000000G			MOV	#$SWTCH,R5	; GET ADDRESS OF SWITCH WORD

     85	000042	032715 	000000G			BIT	#MA$PF,(R5)	; MAP FILE SPECIFIED?

     86	000046	001542 				BEQ	50$		; IF EQ NO

     87	000050	032715 	000000G			BIT	#CR$EF,(R5)	; CREF FILE SPECIFIED?

     88	000054	001526 				BEQ	40$		; IF EQ NO

     89	000056	012700 	000000'			MOV	#SNDBF,R0	; GET ADDRESS OF SEND BUFFER

     90	000062	016701 	000000G			MOV	$MAPPT,R1	; GET ADDRESS OF MAP FILE FDB

     91	000066	016120 	000110 			MOV	F.FNB+N.FNAM(R1),(R0)+ ; COPY FILE NAME

     92	000072	016120 	000112 			MOV	F.FNB+N.FNAM+2(R1),(R0)+ ; ...

     93	000076	016120 	000114 			MOV	F.FNB+N.FNAM+4(R1),(R0)+ ; ...

     94	000102	016120 	000116 			MOV	F.FNB+N.FTYP(R1),(R0)+ ; COPY FILE TYPE

     95	000106	016120 	000120 			MOV	F.FNB+N.FVER(R1),(R0)+ ; COPY FILE VERSION

     96	000112	016120 	000126 			MOV	F.FNB+N.DID(R1),(R0)+ ; COPY DIRECTORY I/D

     97	000116	016120 	000130 			MOV	F.FNB+N.DID+2(R1),(R0)+ ; ...

     98	000122	016120 	000132 			MOV	F.FNB+N.DID+4(R1),(R0)+ ; ...

     99	000126	016120 	000134 			MOV	F.FNB+N.DVNM(R1),(R0)+ ; COPY DEVICE NAME

    100	000132	116120 	000136 			MOVB	F.FNB+N.UNIT(R1),(R0)+ ; COPY UNIT NUMBER

    101	000136	105010 				CLRB	(R0)		; CLEAR FLAGS BYTE

    102	000140	032715 	000000G			BIT	#SP$OL,(R5)	; SPOOL OUTPUT?

    103	000144	001002 				BNE	10$		; IF NE NO

    104	000146	152710 	000001 			BISB	#CRSPL,(R0)	; SET SPOOL FLAG

    105	000152				10$:				;

    106	000152	062700 	000003 			ADD	#3,R0		; STEP TO ACTUAL OUTPUT DEV.

    107	000156	016720 	000000G			MOV	$CRODV,(R0)+	; SET SPECIAL CREF OUTPUT DEVICE

    108	000162	116720 	000000G			MOVB	$CROUN,(R0)+	; SET SPECIAL OUTPUT UNIT

    109	000166	105020 				CLRB	(R0)+		; CLEAR FLAGS BYTE

    110	000170					CLOSE$	R1		; CLOSE MAP FILE

    111	000176	103003 				BCC	20$		; IF C/C CLOSED SUCCEEDED

    112	000200	042715 	000000C			BIC	#<MA$PF!CR$EF>,(R5) ; CLEAR MAP, CREF SWITCHES

    113	000204	000463 				BR	50$		; EXIT

    114	000206				20$:				;

P5CRF	MACRO M1110  22-AUG-78 01:54  PAGE 3-2





    115	000206	016700 	000000G			MOV	$CRFPT,R0	; GET ADDRESS OF CREF FDB

    116	000212	010004 				MOV	R0,R4		; SAVE FDB ADDRESS

    117	000214					CALL	$STRCB		; SETUP CREF RECORD BLOCK

    118	000220					OFNB$W	R4		; OPEN CREF FILE FOR OUTPUT

    119	000234	016467 	000120 	177562 		MOV	F.FNB+N.FVER(R4),SNDBF+<10.*2> ; SET CREF VERSION

    120	000242	103011 				BCC	30$		; IF C/C OK

    121	000244	042715 	000000G			BIC	#CR$EF,(R5)	; CLEAR CREF FLAG

    122	000250	016402 	000000G			MOV	R$NAME(R4),R2	; GET ADDRESS OF NAMEBLOCK

    123	000254	012701 	000000C			MOV	#<S$V0*400!E$R11>,R1 ; GET ERROR/SEVERITY

    124	000260					CALL	$ERMSG		; OUTPUT ERROR MESSAGE

    125	000264	000433 				BR	50$		;

    126	000266				30$:				;

    127	000266					CALL	$CRFHD		; OUTPUT THE CREF HEADER RECORD

    128	000272	012700 	000356'			MOV	#P5CRF,R0	; GET PHASE DEPENDANT ROUTINE ADDRESS

    129	000276					CALL	$PCTRL		; CALL PHASE DEPENDANT ROUTINE

    130	000302					CLOSE$	$CRFPT		; CLOSE CREF OUTPUT FILE

    131	000312	103420 				BCS	50$		; IF C/S EXIT NOW

    132	000314	012700 	012626 			MOV	#^RCRF,R0	; NAME OF ROUTINE TO DISPATCH			;JAK110

    133	000320	012701 	000000'			MOV	#SNDBF,R1	; DATA BUFFER					;JAK110

    134	000324					CALL	$DSPAT		; START UP CREF					;JAK110

    135	000330	000411 				BR	50$		;						;**-3

    136	000332				40$:				;

    137	000332	016700 	000000G			MOV	$MAPPT,R0	; GET ADDRESS OF MAP FILE FDB

    138	000336	032715 	000000G			BIT	#SP$OL,(R5)	; SPOOL OUTPUT?

    139	000342	001002 				BNE	45$		; IF NE NO

    140	000344					CALL	.PRINT		; SUBMIT MAP FILE FOR PRINTING

    141	000350				45$:				;

    142	000350					CLOSE$	R0		; CLOSE MAP FILE

    143	000354				50$:				;

    144	000354					RETURN			;

    145

    146					;

    147					; OUTPUT THE CREF FILE

    148					;

    149

    150	000356				P5CRF:				;

    151	000356					SAVRG			; SAVE THE NON-VOLATILE REGISTERS

    152	000362	012746 	000000G			MOV	#$STIMP,-(SP)	; PUSH ADDRESS OF FILE SETUP ROUTINE

    153	000366				10$:				;

    154	000366					CALL	@(SP)+		; SETUP NEXT INPUT FILE

    155	000370	103411 				BCS	20$		; IF C/S COMPLETED ALL FILES IN THIS SEGMENT

    156	000372	016700 	000000G			MOV	$CRELM,R0	; GET ADDRESS OF CURRENT ELEMENT

    157	000376	032760 	000000G	000000G		BIT	#SW$MA,E$LSWT(R0) ; ELEMENT IN MAP?

    158	000404	001370 				BNE	10$		; IF NE NO

    159	000406					CALL	$P5CEL		; GENERATE CREF OUTPUT FOR THIS FILE

    160	000412	000765 				BR	10$		; GO AGAIN

    161	000414				20$:				;

    162	000414					RETURN			;

    163

    164

    165		000001 				.END

P5CRF	MACRO M1110  22-AUG-78 01:54  PAGE 3-3

SYMBOL TABLE



B.BBFS= 000010   	FD.OSP= 004000   	F.CHR = 000075   	F.URBD= 000020   	SP$OL = ****** GX

B.BFST= 000015   	FD.PLC= 000004   	F.CNTG= 000034   	F.VBN = 000064   	SW$MA = ****** GX

B.NXBD= 000012   	FD.PRN= 000004   	F.DFNB= 000046   	F.VBSZ= 000060   	S$V0  = ****** GX

B.VBN = 000004   	FD.PSE= 010000   	F.DSPT= 000044   	HT    = 000011   	S.BFHD= 000020

CH.AND= 000001   	FD.RAH= 000001   	F.DVNM= 000134   	LF    = 000012   	S.FATT= 000016

CR    = 000015   	FD.RAN= 000002   	F.EFBK= 000010   	MA$PF = ****** GX	S.FDB = 000140

CRSPL = 000001   	FD.REC= 000001   	F.EFN = 000050   	NB.DEV= 000200   	S.FNAM= 000006

CR$EF = ****** GX	FD.RWM= 000001   	F.EOBB= 000032   	NB.DIR= 000100   	S.FNB = 000036

E$LSWT= ****** GX	FD.SDI= 000020   	F.ERR = 000052   	NB.NAM= 000004   	S.FNBW= 000017

E$R11 = ****** GX	FD.SQD= 000040   	F.FACC= 000043   	NB.SD1= 000400   	S.FNTY= 000004

FA.APD= 000100   	FD.TTY= 000004   	F.FFBY= 000014   	NB.SD2= 001000   	S.FTYP= 000002

FA.CRE= 000010   	FD.WBH= 000002   	F.FNAM= 000110   	NB.SNM= 000040   	S.NFEN= 000020

FA.DLK= 001000   	FF    = 000014   	F.FNB = 000102   	NB.STP= 000020   	VT    = 000013

FA.ENB= 100000   	FF.CHR= 000005   	F.FTYP= 000116   	NB.SVR= 000010   	$CRELM= ****** GX

FA.EXC= 002000   	FF.NV = 000003   	F.FVER= 000120   	NB.TYP= 000002   	$CRFHD= ****** GX

FA.EXT= 000004   	FF.POE= 000002   	F.HIBK= 000004   	NB.VER= 000001   	$CRFPT= ****** GX

FA.NSP= 000100   	FF.RWD= 000001   	F.LUN = 000042   	N.DID = 000024   	$CRODV= ****** GX

FA.POS= 010000   	FF.RWF= 000006   	F.MBCT= 000054   	N.DVNM= 000032   	$CROUN= ****** GX

FA.RD = 000001   	FF.SPC= 000004   	F.MBC1= 000055   	N.FID = 000000   	$DSPAT= ****** GX

FA.RWD= 004000   	FO.APD= 000106   	F.MBFG= 000056   	N.FNAM= 000006   	$ERMSG= ****** GX

FA.SEQ= 040000   	FO.MFY= 000002   	F.NRBD= 000024   	N.FTYP= 000014   	$MAPPT= ****** GX

FA.SHR= 000040   	FO.RD = 000001   	F.NREC= 000030   	N.FVER= 000016   	$PCTRL= ****** GX

FA.TMP= 000020   	FO.UPD= 000006   	F.OVBS= 000030   	N.NEXT= 000022   	$P5CEL= ****** GX

FA.WCK= 020000   	FO.WRT= 000016   	F.RACC= 000016   	N.STAT= 000020   	$P5CRF  000032RG

FA.WRT= 000002   	F.ACTL= 000076   	F.RATT= 000001   	N.UNIT= 000034   	$SAVRG= ****** GX

FD.BLK= 000010   	F.ALOC= 000040   	F.RCNM= 000034   	PAR$$$= 000000   	$STIMP= ****** GX

FD.CCL= 000002   	F.BBFS= 000062   	F.RCTL= 000017   	P5CRF   000356R  	$STRCB= ****** GX

FD.COM= 020000   	F.BDB = 000070   	F.RSIZ= 000002   	R$NAME= ****** GX	$SWTCH= ****** GX

FD.CR = 000002   	F.BGBC= 000057   	F.RTYP= 000000   	R$$11M= 000000   	$$    = 000001

FD.DIR= 000010   	F.BKDN= 000026   	F.SEQN= 000100   	R.FIX = 000001   	.CLOSE= ****** G

FD.FTN= 000001   	F.BKDS= 000020   	F.SPDV= 000072   	R.SEQ = 000003   	.OPFNB= ****** G

FD.F11= 040000   	F.BKEF= 000050   	F.SPUN= 000074   	R.VAR = 000002   	.PRINT= ****** GX

FD.INS= 000010   	F.BKP1= 000051   	F.STBK= 000036   	SNDBF   000000R  	...GBL= 000000

FD.ISP= 002000   	F.BKST= 000024   	F.UNIT= 000136   	SPA   = 000040   	...TPC= 000140

FD.MNT= 100000   	F.BKVB= 000064



. ABS.	000000	   000

      	000416	   001

ERRORS DETECTED:  0



VIRTUAL MEMORY USED:  2683 WORDS  ( 11 PAGES)

DYNAMIC MEMORY:  3828 WORDS  ( 14 PAGES)

ELAPSED TIME:  00:00:21

OBJ$:P5CRF,LIS$:P5CRF/-SP=SRC$:MACFLM,FCSPR,P5CRF

