Google
 

Trailing-Edge - PDP-10 Archives - bb-x141b-bb - logxfr.l91
There are 2 other files named logxfr.l91 in the archive. Click here to see a list.
LOGXFR -- PARSER.LOG ERROR FILE	MACRO M1113  03-APR-86 21:33
TABLE OF CONTENTS

     4-   42	DEFINITIONS -- MACRO AND PARAMETER DEFINITIONS
     5-   92	LOGXFR -- TRANSFER ROUTINE
     6-  156	XFRBLK -- TRANSFER THE BLOCK TO THE KL
     7-  224	TYPERR -- TYPE OUT ERROR CODE
    10-   40	FILE INTERFACE DATA
    11-  138	.FNDIR -- ROUTINE TO FIND DIRECTORY FILE ID
    12-  201	.LOKUP -- ROUTINE TO LOOK UP A FILE TO GET ITS FID
    13-  265	.ENTER -- ROUTINE TO ENTER A FILE
    14-  315	.OPEN -- ROUTINE TO OPEN A FILE
    15-  370	.EXTND -- ROUTINE TO EXTEND A FILE
    16-  419	.CLOSE -- ROUTINE TO CLOSE A FILE
    17-  483	.SETFN -- ROUTINE TO SET A FILE NAME IN A FILE NAME BLOCK
    18-  522	.READR -- ROUTINE TO READ A RECORD
    19-  578	.READW -- READ A WORD FROM A FILE
    20-  615	.READB -- READ A BYTE FROM A FILE
    21-  648	.READ -- ROUTINE TO READ A BLOCK
    22-  696	.WRITR -- ROUTINE TO WRITE A RECORD
    23-  752	.WRITW -- WRITE A WORD TO A FILE
    24-  788	.WRITB -- WRITE A BYTE TO A FILE
    25-  819	.WRITZ -- WRITE OUT CURRENT BLOCK
    26-  860	.WRITE -- ROUTINE TO WRITE A BLOCK
LOGXFR -- PARSER.LOG ERROR FILE	MACRO M1113  03-APR-86 21:33  PAGE 2


      1						.TITLE	LOGXFR -- PARSER.LOG ERROR FILE TRANSFER PROGRAM
      2						.IDENT	/014430/
      3						.LIST	MEB,SYM
      4						.NLIST	CND
      5						.ENABL	AMA
      6					;                             COPYRIGHT (C) 1980, 1985 BY
      7					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      8					;			ALL RIGHTS RESERVED.
      9					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
     10					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
     11					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     12					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     13					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     14					;
     15					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     16					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     17					;       CORPORATION.
     18					;
     19					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     20					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     21					;
     22					;		MODULE: PARSER.LOG TRANSFER PROGRAM
     23					;
     24					;		VERSION: 14-43
     25					;
     26					;		AUTHOR: K. LEFEBVRE
     27					;
     28					;		DATE: 11-FEB-80
     29					;
     30					;
     31					;	MODIFIED BY:
     32					;
     33					; 29-MAY-80	S. LEAPLINE	FIX TRANSFERR SIZE TO XFERR 4 PACKETS/BLOCK
     34					; 12-NOV-80	S. LEAPLINE	ONLY XFERR 1 BLOCK PER SECOND TO TRY TO SOLVE
     35					;				A TOPS-20 BUG OR DEFICENCY
     36					; 04-MAR-81	S. LEAPLINE	CUT THE DATA SIZE PER XFERR TO 64 SO RELEASE
     37					;				4 WON'T HAVE TO BE PATCHED FOR FILED TEST.
     38					; 08-JUN-81	S. LEAPLINE	ADD CONDITIONAL SLEEP FOR TOPS-20/TOPS-10
     39					;
     40						.MCALL	DIR$,QIOW$,EXIT$S,ALUN$,CLEF$S,WSIG$S,MRKT$S,WTSE$S
LOGXFR -- PARSER.LOG ERROR FILE	MACRO M1113  03-APR-86 21:33  PAGE 3
DEFINITIONS -- MACRO AND PARAMETER DEFINITIONS

     42						.SBTTL	DEFINITIONS -- MACRO AND PARAMETER DEFINITIONS
     43
     44						.MACRO	ERROR$	CODE
     45						 MOV	#^R'CODE,ERRCOD
     46						 SEC
     47						 RETURN
     48						.ENDM	ERROR$
     49
     50						.MACRO	ERRENT	CODE,MES
     51						 .PSECT	DATA
     52						.IF	B,CODE
     53						 .WORD	0
     54						.IFF
     55						 .WORD	^R'CODE
     56						.ENDC
     57						 .WORD	ERR'CODE
     58						 .WORD	LEN'CODE
     59						 .PSECT	MESSAG
     60					ERR'CODE:	.ASCII	%MES%
     61					LEN'CODE=.-ERR'CODE
     62						 .PSECT	DATA
     63						.ENDM	ERRENT
     64
     65						.MACRO	PUSH	ARG
     66						.IRP	A,<ARG>
     67						 MOV	A,-(SP)
     68						.ENDR
     69						.ENDM	PUSH
     70
     71						.MACRO	POP	ARG
     72						.IRP	A,<ARG>
     73						 MOV	(SP)+,A
     74						.ENDR
     75						.ENDM	POP
     76
     77		000001 				TTYLUN=1
     78		000002 				INDLUN=2
     79		000003 				LOGLUN=3
     80
     81		000006 				E.FFIL=6
     82
     83		100000 				BIT15=100000
     84
     85	000000					.PSECT	DATA
     86
     87	000000	000000 			.OUTLG:	.WORD	0		; DUMMY VARIABLE
     88	000002	000207 			.TYMSG:	RETURN			; DUMMY ROUTINE
     89
     90	000000					.PSECT
LOGXFR -- PARSER.LOG ERROR FILE	MACRO M1113  03-APR-86 21:33  PAGE 4
LOGXFR -- TRANSFER ROUTINE

     92						.SBTTL	LOGXFR -- TRANSFER ROUTINE
     93
     94					;+
     95					;
     96					; LOGXFR -- ROUTINE TO TRANSFER PARSER.LOG ERROR FILE TO KL
     97					;
     98					; THIS ROUTINE WHEN REQUESTED TO RUN WILL LOOKUP THE FILE PARSER.LOG.
     99					; IF THE FILE EXISTS IT WILL TRANSFER IT ACROSS THE DTE TO THE KL AND
    100					; THEN DELETE THE FILE. IF IT DOESN'T EXIST THEN THE PROGRAM EXITS.
    101					;
    102					; INPUT ARGUMENTS:
    103					;
    104					;	NONE
    105					;
    106					; OUTPUT ARGUMENTS:
    107					;
    108					;	NONE
    109					;
    110					; ERRORS RETURNED:
    111					;
    112					;	NONE
    113					;-
    114
    115	000000				LOGXFR::
    116	000000					DIR$	#.ASCTY		; ASSIGN CTY
	000000	012746 	000000'			MOV	#.ASCTY,-(SP)
	000004	104375 				EMT	375
    117	000006	103444 				BCS	5$		; PROCESS ERROR
    118	000010	012737 	062072 	001054'		MOV	#^RPAR,.INFN	; ERROR LOG FILE NAME
    119	000016	012737 	073632 	001056'		MOV	#^RSER,.INFN+2	; PARSER
    120	000024	012737 	046537 	001062'		MOV	#^RLOG,.INFN+6	; .LOG
    121	000032	012700 	001054'			MOV	#.INFN,R0	; INPUT FILE NAME PTR
    122	000036	012701 	002104'			MOV	#.INFNB,R1	; INPUT FILE NAME BLOCK PTR
    123	000042	012702 	000002 			MOV	#INDLUN,R2	; INPUT FILE LUN
    124	000046	012704 	000000G			MOV	#IO.ACR,R4	; READ ACCESS
    125	000052	004737 	000746'			CALL	.REMOV		; LOOK UP INPUT FILE AND REMOVE
    126	000056	103420 				BCS	5$		; PROCESS ERROR
    127	000060	004737 	001130'			CALL	.OPEN		; OPEN FILE FOR READ
    128	000064	103542 				BCS	TYPERR		; PROCESS ERROR
    129	000066	005237 	001046'			INC	.INDFG		; FLAG FILE OPEN
    130	000072	013737 	002144'	000014'		MOV	.INATT+6,TOTBLK	; GET TOTAL BLOCK SIZE
    131	000100	006337 	000014'			ASL	TOTBLK		; THAT WILL BE TRANSFERRED
    132	000104	006337 	000014'			ASL	TOTBLK		;
    133	000110	006337 	000014'			ASL	TOTBLK		;
    134	000114	004737 	001302'			CALL	.DELET		; MARK FILE FOR DELETE ON CLOSE
    135	000120	103524 			5$:	BCS	TYPERR		; PROCESS ERROR
    136	000122	005737 	002150'			TST	.INATT+12	; EMPTY FILE?
    137	000126	001007 				BNE	10$		; NO -- GO ON
    138	000130	005737 	002146'			TST	.INATT+10	; MAYBE -- FILE HUGE?
    139	000134	001004 				BNE	10$		; YES -- GO ON
    140	000136	012737 	020446 	000004'		MOV	#^RELF,ERRCOD	; NO -- EMPTY LOG FILE ERROR
    141	000144	000512 				BR	TYPERR		; GO PROCESS ERROR
    142	000146	005037 	001074'		10$:	CLR	.INVBN		; READ FIRST BLOCK
    143	000152	005037 	001076'			CLR	.INVBN+2	; READ FIRST BLOCK
    144	000156	004737 	001646'		20$:	CALL	.READ		; READ A BLOCK
    145	000162	103503 				BCS	TYPERR		; PROCESS ERROR
    146	000164	004737 	000172'			CALL	XFRBLK		; TRANSFER BLOCK TO KL
LOGXFR -- PARSER.LOG ERROR FILE	MACRO M1113  03-APR-86 21:33  PAGE 4-1
LOGXFR -- TRANSFER ROUTINE

    147	000170	000772 				BR	20$		; NEXT BLOCK
    148
    149	000004				.PSECT	DATA
    150
    151	000004				ERRCOD::			; ERROR CODE
    152	000004	000000 				.WORD	0
    153
    154	000172				.PSECT
LOGXFR -- PARSER.LOG ERROR FILE	MACRO M1113  03-APR-86 21:33  PAGE 5
XFRBLK -- TRANSFER THE BLOCK TO THE KL

    156						.SBTTL	XFRBLK -- TRANSFER THE BLOCK TO THE KL
    157
    158					;+
    159					;
    160					; XFRBLK -- ROUTINE TO TRANSFER A BLOCK TO THE KL ACROSS THE DTE
    161					;
    162					; THIS ROUTINE WILL TRANSFER THE BLOCK IN .INBUF WITH A BLOCK NUMBER
    163					; IN .INPOS TO THE KL FOR ADDITION TO SYSERR.
    164					;
    165					; INPUT ARGUMENTS:
    166					;
    167					;	NONE
    168					;
    169					; OUTPUT ARGUMENTS:
    170					;
    171					;	NONE
    172					;
    173					; ERRORS RETURNED:
    174					;
    175					;	NONE
    176					;-
    177
    178	000172				XFRBLK:
    179	000172	012700 	000400 			MOV	#400,R0		; BLOCK SIZE
    180	000176	012701 	001104'			MOV	#.INBUF,R1	; CURRENT BLOCK ADDR
    181	000202	012702 	000016'			MOV	#XFRBUF,R2	; TRANSFER BUFFER
    182	000206	012122 			5$:	MOV	(R1)+,(R2)+	; MOV MORD TO TRANSMIT BUFFER
    183	000210	077002 				SOB	R0,5$		; DONE?
    184	000212	012701 	100000G			MOV	#BIT15+BC.HDS,R1 ; SET FUNCTION
    185	000216	012702 	000002 			MOV	#2,R2		; SET EVENT FLAG FOR ..STIN
    186	000222	012703 	000000G			MOV	#D.CLOG,R3	; SET DEVICE CODE
    187	000226					CLEF$S	R2		; INITIALIZE FUNCTION EVENT FLAG
	000226	010246 				MOV	R2,-(SP)
	000230	012746 				MOV	(PC)+,-(SP)
	000232	   037 	   002 			.BYTE	31.,2
	000234	104375 				EMT	375
    188	000236	012700 	000006'			MOV	#HEADER,R0	; POINT TO BUFFER
    189	000242	012704 	000010 			MOV	#512./64.,R4	; SET LOOP COUNT
    190	000246	012710 	000106 		7$:	MOV	#64.+6.,(R0)	; SET BYTE SIZE OF XFERR
    191	000252	012760 	000000G	000002 		MOV	#DV.LOG,2(R0)	; ALSO INDICATE ERROR LOG REQUEST
    192	000260	005237 	000012'			INC	BLKNUM		; COUNT THIS BLOCK
    193	000264	013760 	000012'	000004 		MOV	BLKNUM,4(R0)	; SET IN BUFFER
    194	000272	013760 	000014'	000006 		MOV	TOTBLK,6(R0)	; OF TOTAL BLOCKS
    195	000300	004737 	000000G			CALL	..STIN		; SEND TO KL
    196	000304	103004 				BCC	10$		; NO ERROR
    197	000306	012737 	035545 	000004'		MOV	#^RITE,ERRCOD	; INDIRECT TRANSFER ERROR
    198	000314	000426 				BR	TYPERR		; PROCESS ERROR
    199	000316				10$:	CLEF$S	R2		; TEST AND CLEAR FUNCTION EVENT FLAG
	000316	010246 				MOV	R2,-(SP)
	000320	012746 				MOV	(PC)+,-(SP)
	000322	   037 	   002 			.BYTE	31.,2
	000324	104375 				EMT	375
    200	000326	022737 	000000G	000000G		CMP	#IS.SET,$DSW	; WAS IT SET ?
    201	000334	001412 				BEQ	20$		; YES -- GO ON TO NEXT
    202	000336					WSIG$S			; NO -- WAIT FOR THE BIG EVENT
	000336	012746 				MOV	(PC)+,-(SP)
	000340	   061 	   001 			.BYTE	49.,1
LOGXFR -- PARSER.LOG ERROR FILE	MACRO M1113  03-APR-86 21:33  PAGE 5-1
XFRBLK -- TRANSFER THE BLOCK TO THE KL

	000342	104375 				EMT	375
    203	000344	005737 	000002G			TST	.COMEF+2	; PRIMARY PROTOCOL RUNNING ?
    204	000350	100762 				BMI	10$		; BRANCH IF YES
    205	000352	012737 	063102 	000004'		MOV	#^RPNR,ERRCOD	; PROTOCOL NOT RUNNING
    206	000360	000404 				BR	TYPERR		; PROCESS THE ERROR
    207	000362	062700 	000100 		20$:	ADD	#64.,R0		; BUMP THE BUFFER ADDRESS
    208	000366	077451 				SOB	R4,7$		; DO ALL THE BUFFER
    213	000370	000207 				RETURN			; YES -- DONE
    214
    215	000006				.PSECT	DATA
    216
    217	000006				HEADER:	.BLKW	2		; PACKET HEADER
    218	000012	000000 			BLKNUM:	.WORD	0		; BLOCK NO.
    219	000014	000000 			TOTBLK:	.WORD	0		; TOTAL BLOCK SIZE OF FILE*4
    220	000016				XFRBUF:	.BLKW	400		; TRANSMIT BUFFER
    221
    222	000372				.PSECT
LOGXFR -- PARSER.LOG ERROR FILE	MACRO M1113  03-APR-86 21:33  PAGE 6
TYPERR -- TYPE OUT ERROR CODE

    224						.SBTTL	TYPERR -- TYPE OUT ERROR CODE
    225
    226					;+
    227					;
    228					; TYPERR -- ROUTINE TO TYPE OUT ERROR CODE ON CTY
    229					;
    230					; THIS ROUTINE WILL ATTACH THE CTY AND TYPE OUT A RAD50 ERROR
    231					; CODE. IT ALSO CLOSES/DELETES THE LOG FILE AND EXITS FROM THE TASK.
    232					;
    233					; INPUT ARGUMENTS:
    234					;
    235					;	NONE
    236					;
    237					; OUTPUT ARGUMENTS:
    238					;
    239					;	NONE
    240					;
    241					; ERRORS RETURNED:
    242					;
    243					;	NONE
    244					;-
    245
    246	000372				TYPERR:
    247	000372	005737 	000004'			TST	ERRCOD		; ANY ERROR CODE?
    248	000376	001455 				BEQ	10$		; NO -- EXIT
    249	000400					DIR$	#.ATCTY		; YES -- ATTACH CTY
	000400	012746 	000010'			MOV	#.ATCTY,-(SP)
	000404	104375 				EMT	375
    250	000406	103451 				BCS	10$		; PROCESS ERROR
    251	000410	012737 	000116'	000040'		MOV	#PRE,.CDOBP	; PREAMBLE PTR
    252	000416	012737 	000007 	000042'		MOV	#PRELEN,.CDOBC	; BYTE COUNT
    253	000424					DIR$	#.CDOUT		; OUTPUT IT
	000424	012746 	000024'			MOV	#.CDOUT,-(SP)
	000430	104375 				EMT	375
    254	000432	103437 				BCS	10$		; PROCESS ERROR
    255	000434	012700 	001016'			MOV	#ERRTAB,R0	; ERROR TABLE
    256	000440	012001 			5$:	MOV	(R0)+,R1	; ERROR CODE
    257	000442	001406 				BEQ	7$		; END OF TABLE
    258	000444	023701 	000004'			CMP	ERRCOD,R1	; THIS ERROR?
    259	000450	001403 				BEQ	7$		; YES -- OUTPUT IT
    260	000452	062700 	000004 			ADD	#4,R0		; NO -- NEXT CODE
    261	000456	000770 				BR	5$		; NEXT
    262	000460	012037 	000040'		7$:	MOV	(R0)+,.CDOBP	; MESSAGE ADDRESS
    263	000464	011037 	000042'			MOV	(R0),.CDOBC	; MESSAGE BYTE COUNT
    264	000470					DIR$	#.CDOUT		; OUTPUT BUFFER
	000470	012746 	000024'			MOV	#.CDOUT,-(SP)
	000474	104375 				EMT	375
    265	000476	103415 				BCS	10$		; PROCESS ERROR
    266	000500	012737 	000125'	000040'		MOV	#CR,.CDOBP	; MESSAGE ADDRESS
    267	000506	012737 	000002 	000042'		MOV	#CRLEN,.CDOBC	; MESSAGE BYTE COUNT
    268	000514					DIR$	#.CDOUT		; OUTPUT BUFFER
	000514	012746 	000024'			MOV	#.CDOUT,-(SP)
	000520	104375 				EMT	375
    269	000522	103403 				BCS	10$		; PROCESS ERROR
    270	000524					DIR$	#.DTCTY		; DETACH CTY
	000524	012746 	000046'			MOV	#.DTCTY,-(SP)
	000530	104375 				EMT	375
LOGXFR -- PARSER.LOG ERROR FILE	MACRO M1113  03-APR-86 21:33  PAGE 6-1
TYPERR -- TYPE OUT ERROR CODE

    271	000532	005737 	001046'		10$:	TST	.INDFG		; FILE OPEN
    272	000536	001427 				BEQ	20$		; NO -- EXIT
    273	000540	005037 	001046'			CLR	.INDFG		; YES -- CLEAR FLAG
    274	000544	012701 	100000G			MOV	#BIT15+BC.HDS,R1 ; SET FUNCTION
    275	000550	012700 	000006'			MOV	#HEADER,R0	; POINT TO BUFFER
    276	000554	012710 	000004 			MOV	#4,(R0)		; SET BYTE COUNT
    277	000560	012703 	000000G			MOV	#D.CLOG,R3	; SET DEVICE CODE
    278	000564	012760 	000000C	000002 		MOV	#DV.LOG!DV.EOF,2(R0) ; INDICATE ERROR LOG REQUEST AND EOF
    279	000572	005002 				CLR	R2		; NO EVENT FLAG
    280	000574	004737 	000000G			CALL	..STIN		; SEND TO KL
    281	000600	012701 	002136'			MOV	#.INATT,R1	; FILE ATTRIBUTE BLOCK
    282	000604	012702 	000002 			MOV	#INDLUN,R2	; FILE LUN
    283	000610	004737 	001316'			CALL	.CLOSE		; DEACCESS FILE AND CLOSE/DELETE
    284	000614	103666 				BCS	TYPERR		; PROCESS ERROR
    285	000616				20$:	EXIT$S			; EXIT
	000616	012746 				MOV	(PC)+,-(SP)
	000620	   063 	   001 			.BYTE	51.,1
	000622	104375 				EMT	375
    286
    287	001016				.PSECT	DATA
    288
    289	001016				ERRTAB:
    290	001016					ERRENT	ELF,<EMPTY LOG FILE>
	001016	020446 				 .WORD	^RELF
	001020	000000'				 .WORD	ERRELF
	001022	000016 				 .WORD	LENELF
	000000	   105 	   115 	   120 	ERRELF:	.ASCII	%EMPTY LOG FILE%
	000003	   124 	   131 	   040
	000006	   114 	   117 	   107
	000011	   040 	   106 	   111
	000014	   114 	   105
    291	001024					ERRENT	ITE,<INDIRECT TRANSFER ERROR>
	001024	035545 				 .WORD	^RITE
	001026	000016'				 .WORD	ERRITE
	001030	000027 				 .WORD	LENITE
	000016	   111 	   116 	   104 	ERRITE:	.ASCII	%INDIRECT TRANSFER ERROR%
	000021	   111 	   122 	   105
	000024	   103 	   124 	   040
	000027	   124 	   122 	   101
	000032	   116 	   123 	   106
	000035	   105 	   122 	   040
	000040	   105 	   122 	   122
	000043	   117 	   122
    292	001032					ERRENT	PNR,<PRIMARY PROTOCOL NOT RUNNING>
	001032	063102 				 .WORD	^RPNR
	001034	000045'				 .WORD	ERRPNR
	001036	000034 				 .WORD	LENPNR
	000045	   120 	   122 	   111 	ERRPNR:	.ASCII	%PRIMARY PROTOCOL NOT RUNNING%
	000050	   115 	   101 	   122
	000053	   131 	   040 	   120
	000056	   122 	   117 	   124
	000061	   117 	   103 	   117
	000064	   114 	   040 	   116
	000067	   117 	   124 	   040
	000072	   122 	   125 	   116
	000075	   116 	   111 	   116
	000100	   107
LOGXFR -- PARSER.LOG ERROR FILE	MACRO M1113  03-APR-86 21:33  PAGE 6-2
TYPERR -- TYPE OUT ERROR CODE

    293	001040					ERRENT	,<UNKNOWN ERROR>
	001040	000000 				 .WORD	0
	001042	000101'				 .WORD	ERR
	001044	000015 				 .WORD	LEN
	000101	   125 	   116 	   113 	ERR:	.ASCII	%UNKNOWN ERROR%
	000104	   116 	   117 	   127
	000107	   116 	   040 	   105
	000112	   122 	   122 	   117
	000115	   122
    294
    295	000116				.PSECT	MESSAG
    296
    297	000116	   130 	   106 	   122 	PRE:	.ASCII	%XFR -- %
	000121	   040 	   055 	   055
	000124	   040
    298		000007 			PRELEN=.-PRE
    299	000125	   015 	   012 		CR:	.BYTE	15,12
    300		000002 			CRLEN=.-CR
    301
    302	000624				.PSECT
LOGXFR -- PARSER.LOG ERROR FILE	MACRO M1113  03-APR-86 21:33  PAGE 7
TYPERR -- TYPE OUT ERROR CODE

    304	000000				.PSECT	DPBS
    305
    306	000000				.ASCTY:				; ASSIGN LUN TO CTY
    307
    308	000000					ALUN$	TTYLUN,TT,0
	000000	   007 	   004 			.BYTE	7,4
	000002	000001 				.WORD	TTYLUN
	000004	   124 				.ASCII	/T/
	000005	   124 				.ASCII	/T/
	000006	000000 				.WORD	0
    309
    310	000010				.ATCTY:				; ATTACH CTY
    311
    312	000010					QIOW$	IO.ATT,TTYLUN,1,0,0,0
	000010	   003 	   006 			.BYTE	3,$$$ARG
	000012	000000G				.WORD	IO.ATT
	000014	000001 				.WORD	TTYLUN
	000016	   001 	   000 			.BYTE	1,0
	000020	000000 				.WORD	0
	000022	000000 				.WORD	0
    313
    314	000024				.CDOUT:				; OUTPUT TO CTY
    315
    316	000024					QIOW$	IO.WLB,TTYLUN,1,0,0,0,<0,0,0>
	000024	   003 	   011 			.BYTE	3,$$$ARG
	000026	000000G				.WORD	IO.WLB
	000030	000001 				.WORD	TTYLUN
	000032	   001 	   000 			.BYTE	1,0
	000034	000000 				.WORD	0
	000036	000000 				.WORD	0
	000040	000000 				.WORD	0
	000042	000000 				.WORD	0
	000044	000000 				.WORD	0
    317
    318		000040'			.CDOBP=.CDOUT+Q.IOPL		; CONSOLE OUTPUT BYTE POINTER
    319		000042'			.CDOBC=.CDOUT+Q.IOPL+2		; CONSOLE OUTPUT BYTE COUNT
    320
    321	000046				.DTCTY:				; DETACH CTY
    322
    323	000046					QIOW$	IO.DET,TTYLUN,1,0,0,0
	000046	   003 	   006 			.BYTE	3,$$$ARG
	000050	000000G				.WORD	IO.DET
	000052	000001 				.WORD	TTYLUN
	000054	   001 	   000 			.BYTE	1,0
	000056	000000 				.WORD	0
	000060	000000 				.WORD	0
    324
    325	000624				.PSECT
    326
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 8
TYPERR -- TYPE OUT ERROR CODE

      1					.TITLE	FILIO -- FILE INTERFACE ROUTINES
      2
      3						.IDENT	"006150"
      4
      5					;                             COPYRIGHT (C) 1975, 1984, 1985 BY
      6					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      7					;			ALL RIGHTS RESERVED.
      8					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
      9					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
     10					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     11					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     12					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     13					;
     14					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     15					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     16					;       CORPORATION.
     17					;
     18					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     19					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     20					;
     21					;		MODULE: PARSER FILE INTERFACE ROUTINES
     22					;
     23					;		VERSION: 06-15
     24					;
     25					;		AUTHOR: K. LEFEBVRE
     26					;
     27					;		DATE: 29-AUG-79
     28					;
     29					;	THIS MODULE CONTAINS:
     30					;
     31					;	1) FILE ACCESSING ROUTINES
     32					;	2) FILE READ ROUTINES
     33					;	3) FILE WRITE ROUTINES
     34					;
     35					;
     36					;		THESE ROUTINES WERE ADDED FOR TCO 5.1000
     37
     38						.MCALL	DIR$,ALUN$,QIOW$,QIOW$S
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 9
FILE INTERFACE DATA

     40					.SBTTL	FILE INTERFACE DATA
     41
     42	001046				.PSECT	DATA
     43
     45
     46	001046				.INDFG::			; INDIRECT COMMAND FILE FLAG
     47	001046	000000 				.WORD	0
     48
     50	001050				.FISTS::			; FILE I/O STATUS BLOCK
     51	001050	000000 	000000 			.WORD	0,0
     52
     53		001000 			.BUFSZ==1000			; BUFFER SIZE
     54
     56
     57	001054				.INFN::				; INDIRECT COMMAND FILE NAME
     58	001054	000000 	000000 	000000 		.WORD	0,0,0			; FILE NAME
     59	001062	012314 				.RAD50	/CMD/			; EXTENSION
     60	001064	000000 				.WORD	0			; VERSION
     61	001066	   005 	   005 			.BYTE	5,5			; OWNER
     62	001070	054523 				.WORD	"SY			; DEVICE
     63	001072	000000 				.WORD	0			; UNIT
     64
     65	001074				.INVBN::			; CURRENT VIRTUAL BLOCK NO.
     66	001074	000000 	000000 			.WORD	0,0
     67	001100				.INBBC::			; INPUT BUFFER BYTE COUNT
     68	001100	000000 				.WORD	0
     69	001102				.INPOS::			; INPUT BUFFER CURRENT POSITION
     70	001102	000000 				.WORD	0
     71	001104				.INBUF::			; INPUT BUFFER
     72	001104					.BLKW	.BUFSZ/2
     73
     74	002104				.INFNB::			; INPUT FILE NAME BLOCK
     75	002104	000000 	000000 	000000 		.WORD	0,0,0			; N.FID
     76	002112	140123 	140123 	000000 		.RAD50	/005005   /		; N.FNAM
     77	002120	015172 				.RAD50	/DIR/			; N.FTYP
     78	002122	000000 				.WORD	0			; N.FVER
     79	002124	000000 				.WORD	0			; N.STAT
     80	002126	000000 				.WORD	0			; N.NEXT
     81	002130	177777 	177777 			.WORD	-1,-1			; DIRECTORY FID
     82	002134	   005 	   005 			.BYTE	5,5			; OWNER
     83
     84	002136				.INATT::			; FILE ATTRIBUTES
     85	002136	   000 				.BYTE	0			; RECORD TYPE
     86	002137	   000 				.BYTE	0			; RECORD ATTRIBUTES
     87	002140	000000 				.WORD	0			; LARGEST RECORD SIZE
     88	002142	000000 	000000 			.WORD	0,0			; HIGHEST ALLOCATED BLOCK
     89	002146	000000 	000000 			.WORD	0,0			; HIGHEST USED BLOCK
     90	002152	000000 				.WORD	0			; FIRST FREE BYTE
     91
     93
     94	002154				.OTFN::				; LOG FILE NAME
     95	002154	062072 	073632 	000000 		.RAD50	/PARSER   /		; FILE NAME
     96	002162	046537 				.RAD50	/LOG/			; EXTENSION
     97	002164	000000 				.WORD	0			; VERSION
     98	002166	   005 	   005 			.BYTE	5,5			; OWNER
     99	002170	054523 				.WORD	"SY			; DEVICE
    100	002172	000000 				.WORD	0			; UNIT
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 9-1
FILE INTERFACE DATA

    101
    102	002174				.OTVBN::			; CURRENT VIRTUAL BLOCK NO.
    103	002174	000000 	000000 			.WORD	0,0
    104	002200				.OTBBC::			; OUTPUT BUFFER BYTE COUNT
    105	002200	000000 				.WORD	0
    106	002202				.OTPOS::			; OUTPUT BUFFER CURRENT POSITION
    107	002202	000000 				.WORD	0
    108	002204				.OTBUF::			; OUTPUT BUFFER
    109	002204					.BLKW	.BUFSZ/2
    110
    111	003204				.OTFNB::			; OUTPUT FILE NAME BLOCK
    112	003204	000000 	000000 	000000 		.WORD	0,0,0			; N.FID
    113	003212	140123 	140123 	000000 		.RAD50	/005005   /		; N.FNAM
    114	003220	015172 				.RAD50	/DIR/			; N.FTYP
    115	003222	000000 				.WORD	0			; N.FVER
    116	003224	000000 				.WORD	0			; N.STAT
    117	003226	000000 				.WORD	0			; N.NEXT
    118	003230	177777 	177777 			.WORD	-1,-1			; DIRECTORY FID
    119	003234	   005 	   005 			.BYTE	5,5			; OWNER
    120
    121	003236				.OTATT::			; FILE ATTRIBUTES
    122	003236	   000 				.BYTE	0			; RECORD TYPE
    123	003237	   000 				.BYTE	0			; RECORD ATTRIBUTES
    124	003240	000000 				.WORD	0			; LARGEST RECORD SIZE
    125	003242	000000 	000000 			.WORD	0,0			; HIGHEST ALLOCATED BLOCK
    126	003246	000000 	000000 			.WORD	0,0			; HIGHEST USED BLOCK
    127	003252	000000 				.WORD	0			; FIRST FREE BYTE
    128
    129	003254				.RECNT::			; CURRENT RECORD SIZE
    130	003254	000000 				.WORD	0
    131	003256				.RECPT::			; CURRENT RECORD POSITION POINTER
    132	003256	003260'				.WORD	.RECRD
    133	003260				.RECRD::
    134	003260					.BLKB	80.		; CURRENT RECORD
    135
    136	000624				.PSECT
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 10
.FNDIR -- ROUTINE TO FIND DIRECTORY FILE ID

    138					.SBTTL	.FNDIR -- ROUTINE TO FIND DIRECTORY FILE ID
    139
    140					;+
    141					;
    142					; .FNDIR -- ROUTINE TO FIND THE [5,5] DIRECTORY FILE ID
    143					;
    144					; THIS ROUTINE WILL FIND THE FILE ID FOR THE [5,5] DIRECTORY IF
    145					; IT HAS NOT ALREADY BEEN FOUND. IT WILL ALSO ASSIGN A LUN TO THE
    146					; SYSTEM DEVICE.
    147					;
    148					; INPUT ARGUMENTS:
    149					;
    150					;	R1=FILE NAME BLOCK
    151					;	R2=LUN
    152					;
    153					; OUTPUT ARGUMENTS:
    154					;
    155					;	NONE
    156					;
    157					; ERROR CODES RETURNED:
    158					;
    159					;	CAL -- CAN'T ASSIGN LUN
    160					;	DNF -- DIRECTORY FILE NOT FOUND
    161					;-
    162
    163	000624				.FNDIR::
    164	000624	026127 	000024 	177777 		CMP	24(R1),#-1	; DIRECTORY FID ALREADY FOUND?
    165	000632	001032 				BNE	10$		; YES -- EXIT
    166	000634	010237 	000064'			MOV	R2,FNDALU	; NO -- SET UP LUN
    167	000640					DIR$	#FNDALN		; ASSIGN LUN
	000640	012746 	000062'			MOV	#FNDALN,-(SP)
	000644	104375 				EMT	375
    168	000646	103425 				BCS	FNDCAL		; ERROR IF CC-C IS SET
    169	000650	010237 	000076'			MOV	R2,FNDLUN	; SET LUN
    170	000654	010137 	000120'			MOV	R1,FNDFNB	; SET FNB
    171	000660					DIR$	#FNDFNA		; GET FID
	000660	012746 	000072'			MOV	#FNDFNA,-(SP)
	000664	104375 				EMT	375
    172	000666	103422 				BCS	FNDDNF		; ERROR IF CC-C IS SET
    173	000670	105737 	001050'			TSTB	.FISTS		; DID WE REALLY SUCCEED?
    174	000674	002417 				BLT	FNDDNF		; NO -- ERROR
    175	000676	016161 	000000 	000024 		MOV	0(R1),24(R1)	; SAVE DIRECTORY FID
    176	000704	016161 	000002 	000026 		MOV	2(R1),26(R1)	; SAVE DIRECTORY FID
    177	000712	016161 	000004 	000030 		MOV	4(R1),30(R1)	; SAVE DIRECTORY FID
    178	000720	000207 			10$:	RETURN			; DONE
    179						;
    180	000722				FNDCAL:
    181	000722					ERROR$	CAL		; ERROR -- CAN'T ASSIGN LUN
	000722	012737 	011364 	000004'		 MOV	#^RCAL,ERRCOD
	000730	000261 				 SEC
	000732	000207 				 RETURN
    182	000734				FNDDNF:
    183	000734					ERROR$	DNF		; ERROR -- DIRECTORY FILE NOT FOUND
	000734	012737 	015466 	000004'		 MOV	#^RDNF,ERRCOD
	000742	000261 				 SEC
	000744	000207 				 RETURN
    184						;
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 10-1
.FNDIR -- ROUTINE TO FIND DIRECTORY FILE ID

    185
    186	000062				.PSECT	DPBS
    187
    188	000062				FNDALN:				; ASSIGN LUN DIRECTIVE
    189	000062					ALUN$	0,SY,0
	000062	   007 	   004 			.BYTE	7,4
	000064	000000 				.WORD	0
	000066	   123 				.ASCII	/S/
	000067	   131 				.ASCII	/Y/
	000070	000000 				.WORD	0
    190
    191		000064'			FNDALU=FNDALN+A.LULU
    192
    193	000072				FNDFNA:				; FIND FID DIRECTIVE
    194	000072					QIOW$	IO.FNA,,E.FFIL,,.FISTS,,<,,,,,0>
	000072	   003 	   014 			.BYTE	3,$$$ARG
	000074	000000G				.WORD	IO.FNA
	000076	000000 				.WORD
	000100	   006 	   000 			.BYTE	E.FFIL,
	000102	001050'				.WORD	.FISTS
	000104	000000 				.WORD
	000106	000000 				.WORD
	000110	000000 				.WORD
	000112	000000 				.WORD
	000114	000000 				.WORD
	000116	000000 				.WORD
	000120	000000 				.WORD	0
    195
    196		000076'			FNDLUN=FNDFNA+Q.IOLU
    197		000120'			FNDFNB=FNDFNA+Q.IOPL+12
    198
    199	000746				.PSECT
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 11
.LOKUP -- ROUTINE TO LOOK UP A FILE TO GET ITS FID

    201					.SBTTL	.LOKUP -- ROUTINE TO LOOK UP A FILE TO GET ITS FID
    202
    203					;+
    204					; .LOKUP -- ROUTINE TO LOOK UP A FILE TO GET ITS FILE ID
    205					;
    206					; THIS ROUTINE WILL LOOK UP A FILE TO GET ITS FILE ID SO THAT ALL
    207					; FUTURE OPERATIONS CAN BE DONE BY FILE ID. IF THE FILE IS NOT
    208					; FOUND THEN THE CC-C BIT IS SET AND THE ROUTINE RETURNS.
    209					;
    210					; INPUT ARGUMENTS:
    211					;
    212					;	R0=FILE NAME
    213					;	R1=FILE NAME BLOCK
    214					;	R2=LUN
    215					;
    216					; OUTPUT ARGUMENTS:
    217					;
    218					;	CC-C IS SET IF FILE NOT FOUND
    219					;
    220					; ERROR CODES RETURNED:
    221					;
    222					;	CAL -- CAN'T ASSIGN LUN
    223					;	DNF -- DIRECTORY FILE NOT FOUND
    224					;	FLF -- FILE LOOKUP FAILURE
    225					;-
    226
    227						.ENABL	LSB
    228
    229	000746				.REMOV::
    230	000746	012737 	000000G	000124'		MOV	#IO.RNA,LOKIOF	; REMOVE FROM DIRECTORY
    231	000754	000403 				BR	3$		; GO ON
    232	000756				.LOKUP::
    233	000756	012737 	000000G	000124'		MOV	#IO.FNA,LOKIOF	; FIND DIRECTORY
    234	000764	004737 	000624'		3$:	CALL	.FNDIR		; FIND THE DIRECTORY FID
    235	000770	004737 	001374'			CALL	.SETFN		; SET THE FILE NAME IN THE FNB
    236	000774	010237 	000126'			MOV	R2,LOKLUN	; SET LUN
    237	001000	010137 	000150'			MOV	R1,LOKFNB	; SET FNB
    238	001004					DIR$	#LOKFNA		; GET FID
	001004	012746 	000122'			MOV	#LOKFNA,-(SP)
	001010	104375 				EMT	375
    239	001012	103412 				BCS	LOKFLF		; ERROR IF CC-C IS SET
    240	001014	105737 	001050'			TSTB	.FISTS		; DID WE REALLY SUCCEED?
    241	001020	002401 				BLT	10$		; NO -- SEE WHY
    242	001022	000207 			5$:	RETURN			; YES -- RETURN
    243	001024	122737 	000000G	001050'	10$:	CMPB	#IE.NSF,.FISTS	; NO SUCH FILE?
    244	001032	001002 				BNE	LOKFLF		; NO -- ERROR
    245	001034	000261 				SEC			; YES -- SET CC-C
    246	001036	000207 				RETURN			; DONE
    247
    248						.DSABL	LSB
    249						;
    250	001040				LOKFLF:
    251	001040					ERROR$	FLF		; ERROR -- FILE LOOKUP FAILURE
	001040	012737 	023546 	000004'		 MOV	#^RFLF,ERRCOD
	001046	000261 				 SEC
	001050	000207 				 RETURN
    252						;
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 11-1
.LOKUP -- ROUTINE TO LOOK UP A FILE TO GET ITS FID

    253
    254	000122				.PSECT	DPBS
    255
    256	000122				LOKFNA:				; GET FID DIRECTIVE
    257	000122					QIOW$	0,,E.FFIL,,.FISTS,,<,,,,,0>
	000122	   003 	   014 			.BYTE	3,$$$ARG
	000124	000000 				.WORD	0
	000126	000000 				.WORD
	000130	   006 	   000 			.BYTE	E.FFIL,
	000132	001050'				.WORD	.FISTS
	000134	000000 				.WORD
	000136	000000 				.WORD
	000140	000000 				.WORD
	000142	000000 				.WORD
	000144	000000 				.WORD
	000146	000000 				.WORD
	000150	000000 				.WORD	0
    258
    259		000124'			LOKIOF=LOKFNA+Q.IOFN
    260		000126'			LOKLUN=LOKFNA+Q.IOLU
    261		000150'			LOKFNB=LOKFNA+Q.IOPL+12
    262
    263	001052				.PSECT
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 12
.ENTER -- ROUTINE TO ENTER A FILE

    265					.SBTTL	.ENTER -- ROUTINE TO ENTER A FILE
    266
    267					;+
    268					; .ENTER -- ROUTINE TO ENTER A FILE INTO A DIRECTORY
    269					;
    270					; THIS ROUTINE WILL CREATE A FILE OF A GIVEN NAME AND THEN ENTER IT
    271					; INTO A DIRECTORY.
    272					;
    273					; INPUT ARGUMENTS:
    274					;
    275					;	NONE
    276					;
    277					; OUTPUT ARGUMENTS:
    278					;
    279					;	NONE
    280					;
    281					; ERROR CODES RETURNED:
    282					;
    283					;	FEN -- FILE ENTER FAILURE
    284					;-
    285
    286	001052				.ENTER::
    287	001052					DIR$	#ENTCRE		; CREATE THE FILE
	001052	012746 	000152'			MOV	#ENTCRE,-(SP)
	001056	104375 				EMT	375
    288	001060	103416 				BCS	ENTFEN		; ERROR IF CC-C IS SET
    289	001062	105737 	001050'			TSTB	.FISTS		; DID WE REALLY SUCCEED?
    290	001066	002413 				BLT	ENTFEN		; NO -- ERROR
    291	001070					DIR$	#ENTENA		; YES -- ENTER THE FILE IN A DIRECTORY
	001070	012746 	000176'			MOV	#ENTENA,-(SP)
	001074	104375 				EMT	375
    292	001076	103404 				BCS	10$		; ERROR IF CC-C IS SET
    293	001100	105737 	001050'			TSTB	.FISTS		; DID WE REALLY SUCCEED
    294	001104	002401 				BLT	10$		; NO -- ERROR
    295	001106	000207 				RETURN			; RETURN
    296	001110				10$:	DIR$	#ENTDEL		; DELETE NEW FILE
	001110	012746 	000226'			MOV	#ENTDEL,-(SP)
	001114	104375 				EMT	375
    297						;
    298	001116				ENTFEN:
    299	001116					ERROR$	FEN		; ERROR -- FILE ENTER FAILURE
	001116	012737 	023126 	000004'		 MOV	#^RFEN,ERRCOD
	001124	000261 				 SEC
	001126	000207 				 RETURN
    300						;
    301
    302	000152				.PSECT	DPBS
    303
    304	000152				ENTCRE:				; CREATE FILE DIRECTIVE
    305	000152					QIOW$	IO.CRE,LOGLUN,E.FFIL,,.FISTS,,<.OTFNB,,BIT15,1>
	000152	   003 	   012 			.BYTE	3,$$$ARG
	000154	000000G				.WORD	IO.CRE
	000156	000003 				.WORD	LOGLUN
	000160	   006 	   000 			.BYTE	E.FFIL,
	000162	001050'				.WORD	.FISTS
	000164	000000 				.WORD
	000166	003204'				.WORD	.OTFNB
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 12-1
.ENTER -- ROUTINE TO ENTER A FILE

	000170	000000 				.WORD
	000172	100000 				.WORD	BIT15
	000174	000001 				.WORD	1
    306
    307	000176				ENTENA:				; ENTER FILE DIRECTIVE
    308	000176					QIOW$	IO.ENA,LOGLUN,E.FFIL,,.FISTS,,<,,,,,.OTFNB>
	000176	   003 	   014 			.BYTE	3,$$$ARG
	000200	000000G				.WORD	IO.ENA
	000202	000003 				.WORD	LOGLUN
	000204	   006 	   000 			.BYTE	E.FFIL,
	000206	001050'				.WORD	.FISTS
	000210	000000 				.WORD
	000212	000000 				.WORD
	000214	000000 				.WORD
	000216	000000 				.WORD
	000220	000000 				.WORD
	000222	000000 				.WORD
	000224	003204'				.WORD	.OTFNB
    309
    310	000226				ENTDEL:				; DELETE FILE DIRECTIVE
    311	000226					QIOW$	IO.DEL,LOGLUN,E.FFIL
	000226	   003 	   006 			.BYTE	3,$$$ARG
	000230	000000G				.WORD	IO.DEL
	000232	000003 				.WORD	LOGLUN
	000234	   006 	   000 			.BYTE	E.FFIL,
	000236	000000 				.WORD
	000240	000000 				.WORD
    312
    313	001130				.PSECT
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 13
.OPEN -- ROUTINE TO OPEN A FILE

    315					.SBTTL	.OPEN -- ROUTINE TO OPEN A FILE
    316
    317					;+
    318					; .OPEN -- ROUTINE TO OPEN A FILE WITH SOME ACCESS FUNCTION
    319					;
    320					; THIS ROUTINE WILL OPEN A FILE WITH SOME SPECIFIED ACCESS RIGHTS.
    321					; IT WILL ALSO READ THE FILE ATTRIBUTES.
    322					;
    323					; INPUT ARGUMENTS:
    324					;
    325					;	R1=FILE NAME BLOCK (FIRST 2 WORDS ARE FILE ID)
    326					;	R2=LUN
    327					;	R4=ACCESS FUNCTION
    328					;
    329					; OUTPUT ARGUMENTS:
    330					;
    331					;	NONE
    332					;
    333					; ERROR CODES RETURNED:
    334					;
    335					;	FOF -- FILE OPEN FAILURE
    336					;-
    337
    338	001130				.OPEN::
    339	001130	010437 	000244'			MOV	R4,OPEFUN	; SET FUNCTION
    340	001134	010237 	000246'			MOV	R2,OPELUN	; SET LUN
    341	001140	010137 	000256'			MOV	R1,OPEFID	; SET FID
    342	001144	010137 	000272'			MOV	R1,OPEATT	; SET FILE ATTRIBUTES
    343	001150	062737 	000032 	000272'		ADD	#32,OPEATT	; POINT TO CORRECT ADDR
    344	001156					DIR$	#OPEACC		; OPEN THE FILE WITH SOME ACCESS
	001156	012746 	000242'			MOV	#OPEACC,-(SP)
	001162	104375 				EMT	375
    345	001164	103401 				BCS	OPEFOF		; ERROR IF CC-C IS SET
    346	001166	000207 				RETURN
    347						;
    348	001170				OPEFOF:
    349	001170					ERROR$	FOF		; ERROR -- FILE OPEN FAILURE
	001170	012737 	023736 	000004'		 MOV	#^RFOF,ERRCOD
	001176	000261 				 SEC
	001200	000207 				 RETURN
    350						;
    351
    352	000242				.PSECT	DPBS
    353
    354	000242				OPEACC:				; OPEN FILE DIRECTIVE
    355	000242					QIOW$	0,0,E.FFIL,,.FISTS,,<0,OPERAT,,,BIT15>
	000242	   003 	   013 			.BYTE	3,$$$ARG
	000244	000000 				.WORD	0
	000246	000000 				.WORD	0
	000250	   006 	   000 			.BYTE	E.FFIL,
	000252	001050'				.WORD	.FISTS
	000254	000000 				.WORD
	000256	000000 				.WORD	0
	000260	000270'				.WORD	OPERAT
	000262	000000 				.WORD
	000264	000000 				.WORD
	000266	100000 				.WORD	BIT15
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 13-1
.OPEN -- ROUTINE TO OPEN A FILE

    356
    357		000244'			OPEFUN=OPEACC+Q.IOFN
    358		000246'			OPELUN=OPEACC+Q.IOLU
    359		000256'			OPEFID=OPEACC+Q.IOPL
    360
    361	000270				OPERAT:
    362	000270	   374 	   016 			.BYTE	-4,16
    363	000272	000000 				.WORD	0
    364	000274	   000 	   000 			.BYTE	0,0
    365
    366		000272'			OPEATT=OPERAT+2
    367
    368	001202				.PSECT
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 14
.EXTND -- ROUTINE TO EXTEND A FILE

    370					.SBTTL	.EXTND -- ROUTINE TO EXTEND A FILE
    371
    372					;+
    373					; .EXTND -- ROUTINE TO EXTEND A FILE BY ONE BLOCK
    374					;
    375					; THIS ROUTINE WILL EXTEND A CURRENTLY OPEN FILE WITH EXTEND ACCESS
    376					; BY ONE BLOCK.
    377					;
    378					; INPUT ARGUMENTS:
    379					;
    380					;	NONE
    381					;
    382					; OUTPUT ARGUMENTS:
    383					;
    384					;	NONE
    385					;
    386					; ERROR CODES RETURNED:
    387					;
    388					;	FEF -- FILE EXTEND FAILURE
    389					;-
    390
    391	001202				.EXTND::
    392	001202					DIR$	#EXTEXT		; EXTEND THE FILE
	001202	012746 	000276'			MOV	#EXTEXT,-(SP)
	001206	104375 				EMT	375
    393	001210	103411 				BCS	EXTFEF		; ERROR IF CC-C IS SET
    394	001212	105737 	001050'			TSTB	.FISTS		; DID WE REALLY SUCCEED?
    395	001216	002406 				BLT	EXTFEF		; NO -- ERROR
    396	001220	062737 	000001 	003244'		ADD	#1,.OTATT+6	; INCREASE BLOCKS ALLOCATED
    397	001226	005537 	003242'			ADC	.OTATT+4	; PROPAGATE CARRY
    398	001232	000207 				RETURN			; DONE
    399						;
    400	001234				EXTFEF:
    401	001234	013737 	002202'	003252'		MOV	.OTPOS,.OTATT+14	; SET NEXT FREE BYTE
    402	001242	162737 	002204'	003252'		SUB	#.OTBUF,.OTATT+14	; MAKE RELATIVE
    403	001250	012701 	003236'			MOV	#.OTATT,R1		; SET ATTRIBUTE ADDR
    404	001254	012702 	000003 			MOV	#LOGLUN,R2		; SET LUN
    406	001260	105037 	000000'			CLRB	.OUTLG			; INDICATE FILE CLOSED
    408	001264	004737 	001316'			CALL	.CLOSE			; CLOSE FILE
    409	001270					ERROR$	FEF		; ERROR -- FILE EXTEND FAILURE
	001270	012737 	023116 	000004'		 MOV	#^RFEF,ERRCOD
	001276	000261 				 SEC
	001300	000207 				 RETURN
    410						;
    411
    412	000276				.PSECT	DPBS
    413
    414	000276				EXTEXT:				; FILE EXTEND DIRECTIVE
    415	000276					QIOW$	IO.EXT,LOGLUN,E.FFIL,,.FISTS,,<,,BIT15,1>
	000276	   003 	   012 			.BYTE	3,$$$ARG
	000300	000000G				.WORD	IO.EXT
	000302	000003 				.WORD	LOGLUN
	000304	   006 	   000 			.BYTE	E.FFIL,
	000306	001050'				.WORD	.FISTS
	000310	000000 				.WORD
	000312	000000 				.WORD
	000314	000000 				.WORD
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 14-1
.EXTND -- ROUTINE TO EXTEND A FILE

	000316	100000 				.WORD	BIT15
	000320	000001 				.WORD	1
    416
    417	001302				.PSECT
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 15
.CLOSE -- ROUTINE TO CLOSE A FILE

    419					.SBTTL	.CLOSE -- ROUTINE TO CLOSE A FILE
    420
    421					;+
    422					; .CLOSE -- ROUTINE TO CLOSE A SPECIFIED FILE
    423					;
    424					; THIS ROUTINE WILL CLOSE AND DEACCESS A SPECIFIED FILE.
    425					; IT WILL ALSO WRITE OUT THE CURRENT ATTRIBUTES.
    426					;
    427					; INPUT ARGUMENTS:
    428					;
    429					;	R1=ATTRIBUTE BLOCK
    430					;	R2=LUN
    431					;
    432					; OUTPUT ARGUMENTS:
    433					;
    434					;	NONE
    435					;
    436					; ERROR CODES RETURNED:
    437					;
    438					;	FCF -- FILE CLOSE FAILURE
    439					;-
    440
    441						.ENABL	LSB
    442
    443	001302				.DELET::
    444	001302	012737 	000000G	000324'		MOV	#IO.DEL,CLOIOF	; I/O FUNCTION FOR DELETE
    445	001310	005037 	000340'			CLR	CLOATR		; NO ATTRIBUTES
    446	001314	000406 				BR	5$		; DO IT
    447	001316				.CLOSE::
    448	001316	012737 	000000G	000324'		MOV	#IO.DAC,CLOIOF	; I/O FUNCTION FOR DEACCESS
    449	001324	012737 	000342'	000340'		MOV	#CLOWAT,CLOATR	; WRITE ATTRIBUTES
    450	001332	010237 	000326'		5$:	MOV	R2,CLOLUN	; SET LUN
    451	001336	010137 	000344'			MOV	R1,CLOATT	; SET FILE ATTRIBUTES
    452	001342					DIR$	#CLODAC		; CLOSE FILE
	001342	012746 	000322'			MOV	#CLODAC,-(SP)
	001346	104375 				EMT	375
    453	001350	103404 				BCS	CLOFCF		; ERROR IF CC-C IS SET
    454	001352	105737 	001050'			TSTB	.FISTS		; DID WE REALLY SUCCEED?
    455	001356	002401 				BLT	CLOFCF		; NO -- ERROR
    456	001360	000207 				RETURN			; YES -- DONE
    457						;
    458
    459						.DSABL	LSB
    460
    461	001362				CLOFCF:
    462	001362					ERROR$	FCF		; ERROR -- FILE CLOSE FAILURE
	001362	012737 	022776 	000004'		 MOV	#^RFCF,ERRCOD
	001370	000261 				 SEC
	001372	000207 				 RETURN
    463						;
    464
    465	000322				.PSECT	DPBS
    466
    467	000322				CLODAC:				; FILE CLOSE DIRECTIVE
    468	000322					QIOW$	0,0,E.FFIL,,.FISTS,,<0,0>
	000322	   003 	   010 			.BYTE	3,$$$ARG
	000324	000000 				.WORD	0
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 15-1
.CLOSE -- ROUTINE TO CLOSE A FILE

	000326	000000 				.WORD	0
	000330	   006 	   000 			.BYTE	E.FFIL,
	000332	001050'				.WORD	.FISTS
	000334	000000 				.WORD
	000336	000000 				.WORD	0
	000340	000000 				.WORD	0
    469
    470		000324'			CLOIOF=CLODAC+Q.IOFN
    471		000326'			CLOLUN=CLODAC+Q.IOLU
    472		000340'			CLOATR=CLODAC+Q.IOPL+2
    473
    474	000342				CLOWAT:
    475	000342	   004 	   016 			.BYTE	4,16
    476	000344	000000 				.WORD	0
    477	000346	   000 	   000 			.BYTE	0,0
    478
    479		000344'			CLOATT=CLOWAT+2
    480
    481	001374				.PSECT
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 16
.SETFN -- ROUTINE TO SET A FILE NAME IN A FILE NAME BLOCK

    483					.SBTTL	.SETFN -- ROUTINE TO SET A FILE NAME IN A FILE NAME BLOCK
    484
    485					;+
    486					; .SETFN -- ROUTINE TO SET A FILE NAME IN A FILE NAME BLOCK
    487					;
    488					; THIS ROUTINE WILL INITIALIZE A FILE NAME BLOCK WITH A FILE NAME,
    489					; VERSION NUMBER, AND STATUS VALUES.
    490					;
    491					; INPUT ARGUMENTS:
    492					;
    493					;	R0=FILE NAME PTR
    494					;	R1=FILE NAME BLOCK ADDR
    495					;
    496					; OUTPUT ARGUMENTS:
    497					;
    498					;	NONE
    499					;
    500					; ERROR CODES RETURNED:
    501					;
    502					;	NONE
    503					;-
    504
    505	001374				.SETFN::
    506	001374					PUSH	<R1,R0>		; SAVE R0,R1
	001374	010146 				 MOV	R1,-(SP)
	001376	010046 				 MOV	R0,-(SP)
    507	001400	005021 				CLR	(R1)+		; CLEAR FID
    508	001402	005021 				CLR	(R1)+		; CLEAR FID
    509	001404	005021 				CLR	(R1)+		; CLEAR FID
    510	001406	012021 				MOV	(R0)+,(R1)+	; FILE NAME
    511	001410	012021 				MOV	(R0)+,(R1)+	; FILE NAME
    512	001412	012021 				MOV	(R0)+,(R1)+	; FILE NAME
    513	001414	012021 				MOV	(R0)+,(R1)+	; EXTENSION
    514	001416	012021 				MOV	(R0)+,(R1)+	; VERSION
    515	001420	005021 				CLR	(R1)+		; STATUS
    516	001422	005011 				CLR	(R1)		; NEXT PTR
    517	001424					POP	<R0,R1>		; RESTORE R0,R1
	001424	012600 				 MOV	(SP)+,R0
	001426	012601 				 MOV	(SP)+,R1
    518	001430	000207 				RETURN			; DONE
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 17
.SETFN -- ROUTINE TO SET A FILE NAME IN A FILE NAME BLOCK

    521
    522					.SBTTL	.READR -- ROUTINE TO READ A RECORD
    523
    524					;+
    525					; .READR -- ROUTINE TO READ A RECORD FROM THE INDIRECT COMMAND FILE.
    526					;
    527					; THIS ROUTINE WILL GET A RECORD (EQUIVILENT TO A TYPED COMMAND) FROM
    528					; THE CURRENTLY OPEN INDIRECT COMMAND FILE. IT WILL INVISIBLY READ
    529					; VIRTUAL BLOCKS INORDER TO BLOCK THE RECORDS. IF AN E-O-F IS
    530					; ENCOUNTERED THE OPEN FILE IS CLOSED AND INPUT IS REDIRECTED TO CTY.
    531					;
    532					; INPUT ARGUMENTS:
    533					;
    534					;	R2=OUTPUT BUFFER
    535					;	R3=STATUS BLOCK
    536					;
    537					; OUTPUT ARGUMENTS:
    538					;	R2 POINTS TO END OF RECORD
    539					;	2(R3) CONTAINS BYTE COUNT OF RECORD
    540					;
    541					; ERROR CODES RETURNED:
    542					;
    543					;	FRD -- FILE READ FAILURE
    544					;-
    545
    546	001432				.READR::
    547	001432					PUSH	<R0,R1>		; SAVE R1 AND R0
	001432	010046 				 MOV	R0,-(SP)
	001434	010146 				 MOV	R1,-(SP)
    548	001436	004737 	001536'		10$:	CALL	.READW		; READ RECORD LENGTH FROM FILE
    549	001442	103415 				BCS	30$		; EOF IF CC-C IS SET
    550	001444	005700 				TST	R0		; SEE IF A NULL RECORD?
    551	001446	001773 				BEQ	10$		; YES -- READ NEXT RECORD
    552	001450	010001 				MOV	R0,R1		; NO -- SAVE BYTE COUNT
    553	001452	010063 	000002 			MOV	R0,2(R3)	; SET RETURNED BYTE COUNT
    554	001456	004737 	001614'		20$:	CALL	.READB		; READ CHARACTER
    555	001462	103405 				BCS	30$		; EOF IF CC-C IS SET
    556	001464	110022 				MOVB	R0,(R2)+	; SAVE CHARACTER
    557	001466	077105 				SOB	R1,20$		; DONE?
    558	001470				25$:	POP	<R1,R0>		; YES -- RESTORE R1 AND R0
	001470	012601 				 MOV	(SP)+,R1
	001472	012600 				 MOV	(SP)+,R0
    559	001474	000207 				RETURN			; RETURN
    560	001476	005037 	001046'		30$:	CLR	.INDFG		; REDIRECT INPUT TO CTY
    561	001502	012701 	002104'			MOV	#.INFNB,R1	; INPUT FILE NAME BLOCK
    562	001506	012702 	000002 			MOV	#INDLUN,R2	; FILE LUN
    563	001512	004737 	001316'			CALL	.CLOSE		; CLOSE FILE AND DEACCESS
    564	001516	012700 	000127'			MOV	#EOFMSG,R0	; E-O-F MESSAGE PTR
    565	001522	004737 	000002'			CALL	.TYMSG		; OUTPUT MESSAGE
    566	001526	005063 	000002 		40$:	CLR	2(R3)		; CLEAR BYTE COUNT
    567	001532	000261 				SEC			; SET CC-C BIT
    568	001534	000755 				BR	25$		; DONE
    569						;
    570
    571	000127				.PSECT	MESSAG
    572
    573	000127				EOFMSG:
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 17-1
.READR -- ROUTINE TO READ A RECORD

    574	000127	   040 	   074 	   105 		.ASCIZ	% <EOF> %
	000132	   117 	   106 	   076
	000135	   040 	   000
    575
    576	001536				.PSECT
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 18
.READW -- READ A WORD FROM A FILE

    578					.SBTTL	.READW -- READ A WORD FROM A FILE
    579
    580					;+
    581					; .READW -- ROUTINE TO READ A WORD FROM A FILE
    582					;
    583					; THIS ROUTINE WILL READ A WORD FROM THE CURRENTLY OPEN INDIRECT
    584					; COMMAND FILE. IF THE CURRENT BLOCK IS EMPTY IT WILL READ IN THE
    585					; NEXT ONE. THE WORD READ MUST BE WORD ALIGNED. IF AN E-O-F IS
    586					; ENCOUNTERED THE CC-C BIT IS SET AND THE ROUTINE RETURNS.
    587					;
    588					; INPUT ARGUMENTS:
    589					;
    590					;	NONE
    591					;
    592					; OUTPUT ARGUMENTS:
    593					;
    594					;	R0 CONTAINS WORD READ
    595					;
    596					; ERROR CODES RETURNED:
    597					;
    598					;	FRD -- FILE READ FAILURE
    599					;-
    600
    601	001536				.READW::
    602	001536	032737 	000001 	001102'		BIT	#1,.INPOS	; ARE WE ON A WORD BOUNDRY?
    603	001544	001404 				BEQ	10$		; YES -- GO ON
    604	001546	005237 	001102'			INC	.INPOS		; NO -- GET ON A WORD BOUNDRY
    605	001552	005337 	001100'			DEC	.INBBC		; DECREMENT BYTE COUNT
    606	001556	005737 	001100'		10$:	TST	.INBBC		; IS CURRENT BUFFER EMPTY?
    607	001562	003003 				BGT	20$		; NO -- GO ON
    608	001564	004737 	001646'			CALL	.READ		; YES -- READ NEXT BLOCK
    609	001570	103410 				BCS	30$		; EOF IF CC-C IS SET
    610	001572	017700 	001102'		20$:	MOV	@.INPOS,R0	; GET WORD INTO R0
    611	001576	062737 	000002 	001102'		ADD	#2,.INPOS	; UPDATE BUFFER POSITION PTR
    612	001604	162737 	000002 	001100'		SUB	#2,.INBBC	; UPDATE BUFFER BYTE COUNT
    613	001612	000207 			30$:	RETURN			; DONE
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 19
.READB -- READ A BYTE FROM A FILE

    615					.SBTTL	.READB -- READ A BYTE FROM A FILE
    616
    617					;+
    618					; .READB -- ROUTINE TO READ A BYTE FROM A FILE
    619					;
    620					; THIS ROUTINE WILL READ A BYTE FROM THE CURRENTLY OPEN INDIRECT
    621					; COMMAND FILE. IF THE CURRENT BLOCK IS EMPTY IT WILL READ IN THE
    622					; NEXT ONE. IF AN E-O-F IS ENCOUNTERED THE CC-C BIT IS SET AND THE
    623					; ROUTINE RETURNS.
    624					;
    625					; INPUT ARGUMENTS:
    626					;
    627					;	NONE
    628					;
    629					; OUTPUT ARGUMENTS:
    630					;
    631					;	R0 CONTAINS BYTE READ
    632					;
    633					; ERROR CODES RETURNED:
    634					;
    635					;	FRD -- FILE READ FAILURE
    636					;-
    637
    638	001614				.READB::
    639	001614	005737 	001100'			TST	.INBBC		; IS CURRENT BUFFER EMPTY?
    640	001620	003003 				BGT	10$		; NO -- GO ON
    641	001622	004737 	001646'			CALL	.READ		; YES -- READ NEXT BLOCK
    642	001626	103406 				BCS	20$		; EOF IF CC-C IS SET
    643	001630	117700 	001102'		10$:	MOVB	@.INPOS,R0	; GET WORD INTO R0
    644	001634	005237 	001102'			INC	.INPOS		; UPDATE BUFFER POSITION PTR
    645	001640	005337 	001100'			DEC	.INBBC		; UPDATE BUFFER BYTE COUNT
    646	001644	000207 			20$:	RETURN			; DONE
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 20
.READ -- ROUTINE TO READ A BLOCK

    648					.SBTTL	.READ -- ROUTINE TO READ A BLOCK
    649
    650					;+
    651					; .READ -- ROUTINE TO READ A BLOCK FROM INDIRECT COMMAND FILE
    652					;
    653					; THIS ROUTINE WILL READ A BLOCK FROM THE CURRENTLY OPEN INDIRECT
    654					; COMMAND FILE. THE BUFFER COUNTS AND POINTERS WILL THEN BE SET.
    655					; IF AN E-O-F IS ENCOUNTERED THE CC-C BIT IS SET AND THE ROUTINE
    656					; RETURNS.
    657					;
    658					; INPUT ARGUMENTS:
    659					;
    660					;	NONE
    661					;
    662					; OUTPUT ARGUMENTS:
    663					;
    664					;	NONE
    665					;
    666					; ERROR CODES RETURNED:
    667					;
    668					;	FRD -- FILE READ FAILURE
    669					;-
    670
    671	001646				.READ::
    672	001646	062737 	000001 	001076'		ADD	#1,.INVBN+2	; NEXT VIRTUAL BLOCK
    673	001654	005537 	001074'			ADC	.INVBN		; PROPAGATE CARRY
    674	001660	023737 	001076'	002150'		CMP	.INVBN+2,.INATT+12	; EOF?
    675	001666	003041 				BGT	10$		; YES -- EXIT
    676	001670					QIOW$S	#IO.RVB,#INDLUN,#E.FFIL,,#.FISTS,,<#.INBUF,#.BUFSZ,,.INVBN,.INVBN+2>
	001670	013746 	001076'			MOV	.INVBN+2,-(SP)
	001674	013746 	001074'			MOV	.INVBN,-(SP)
	001700	005046 				CLR	-(SP)
	001702	012746 	001000 			MOV	#.BUFSZ,-(SP)
	001706	012746 	001104'			MOV	#.INBUF,-(SP)
	001712	005046 				CLR	-(SP)
	001714	012746 	001050'			MOV	#.FISTS,-(SP)
	001720	005046 				CLR	-(SP)
	001722	112716 	000006 			MOVB	#E.FFIL,(SP)
	001726	012746 	000002 			MOV	#INDLUN,-(SP)
	001732	012746 	000000G			MOV	#IO.RVB,-(SP)
	001736	012746 				MOV	(PC)+,-(SP)
	001740	   003 	   013 			.BYTE	3,$$$T1
	001742	104375 				EMT	375
    677	001744	103414 				BCS	REAFRD		; ERROR IF CC-C IS SET
    678	001746	105737 	001050'			TSTB	.FISTS		; SEE IF WE REALLY SUCCEEDED?
    679	001752	002411 				BLT	REAFRD		; NO -- CHECK ERROR
    680	001754	012737 	001104'	001102'		MOV	#.INBUF,.INPOS	; YES -- SET BUFFER POSITION PTR
    681	001762	013737 	001052'	001100'		MOV	.FISTS+2,.INBBC	; SET BUFFER BYTE COUNT
    682	001770	000207 				RETURN			; DONE
    683	001772	000261 			10$:	SEC			; YES -- SET CC-C
    684	001774	000207 				RETURN			; DONE
    685						;
    686	001776				REAFRD:
    687	001776	012701 	002136'			MOV	#.INATT,R1	; SET ATTRIBUTE ADDR
    688	002002	012702 	000002 			MOV	#INDLUN,R2	; SET LUN
    689	002006	005037 	001046'			CLR	.INDFG		; INDICATE FILE CLOSED
    690	002012	004737 	001316'			CALL	.CLOSE		; CLOSE FILE
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 20-1
.READ -- ROUTINE TO READ A BLOCK

    691	002016				20$:	ERROR$	FRD		; ERROR -- FILE READ FAILURE
	002016	012737 	024124 	000004'		 MOV	#^RFRD,ERRCOD
	002024	000261 				 SEC
	002026	000207 				 RETURN
    692						;
    693
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 21
.WRITR -- ROUTINE TO WRITE A RECORD

    696					.SBTTL	.WRITR -- ROUTINE TO WRITE A RECORD
    697
    698					;+
    699					; .WRITR -- ROUTINE TO WRITE A RECORD TO THE LOG FILE
    700					;
    701					; THIS ROUTINE WILL WRITE A RECORD TO THE FILE PARSER.LOG WHEN
    702					; OUTPUT IS DIRECTED TO THE LOG FILE.
    703					;
    704					; INPUT ARGUMENTS:
    705					;
    706					;	R2=RECORD PTR
    707					;	R1=BYTE COUNT
    708					;
    709					; OUTPUT ARGUMENTS:
    710					;
    711					;	NONE
    712					;
    713					; ERROR CODES RETURNED:
    714					;
    715					;	FEF -- FILE EXTEND FAILURE
    716					;	FWT -- FILE WRITE FAILURE
    717					;-
    718
    719	002030				.WRITR::
    720	002030					PUSH	R0		; SAVE R0
	002030	010046 				 MOV	R0,-(SP)
    721	002032	121227 	000012 		5$:	CMPB	(R2),#12	; CHARACTER A <LF>?
    722	002036	001414 				BEQ	7$		; YES -- WRITE OUT RECORD
    723	002040	121227 	000015 			CMPB	(R2),#15	; NO -- CHARACTER A <CR>?
    724	002044	001444 				BEQ	40$		; YES -- PROCESS IT
    725	002046	112277 	003256'			MOVB	(R2)+,@.RECPT	; NO -- WRITE CHAR TO RECORD
    726	002052	005237 	003256'			INC	.RECPT		; UPDATE POINTER
    727	002056	005237 	003254'			INC	.RECNT		; INCREMENT COUNT
    728	002062	077115 				SOB	R1,5$		; DONE?
    729	002064				6$:	POP	R0		; YES -- RESTORE R0
	002064	012600 				 MOV	(SP)+,R0
    730	002066	000207 				RETURN			; EXIT
    731	002070				7$:	PUSH	<R2,R1>		; SAVE R2,R1
	002070	010246 				 MOV	R2,-(SP)
	002072	010146 				 MOV	R1,-(SP)
    732	002074	012702 	003260'			MOV	#.RECRD,R2	; R2 POINTS TO RECORD
    733	002100	013701 	003254'			MOV	.RECNT,R1	; R1 HAS RECORD COUNT
    734	002104	020137 	003240'			CMP	R1,.OTATT+2	; IS THIS THE BIGGEST RECORD?
    735	002110	101402 				BLOS	10$		; NO -- GO ON
    736	002112	010137 	003240'			MOV	R1,.OTATT+2	; YES -- SAVE IT
    737	002116	010100 			10$:	MOV	R1,R0		; WRITE OUT RECORD BYTE COUNT
    738	002120	004737 	002166'			CALL	.WRITW		; WRITE IT
    739	002124	005701 				TST	R1		; IS THIS A NULL RECORD?
    740	002126	001404 				BEQ	30$		; YES -- DONE
    741	002130	112200 			20$:	MOVB	(R2)+,R0	; NO -- GET NEXT BYTE OF RECORD
    742	002132	004737 	002242'			CALL	.WRITB		; WRITE IT
    743	002136	077104 				SOB	R1,20$		; ALL BYTES WRITTEN?
    744	002140				30$:	POP	<R1,R2>		; YES -- RESTORE R2,R1
	002140	012601 				 MOV	(SP)+,R1
	002142	012602 				 MOV	(SP)+,R2
    745	002144	012737 	003260'	003256'		MOV	#.RECRD,.RECPT	; RESET RECORD POINTER
    746	002152	005037 	003254'			CLR	.RECNT		; CLEAR RECORD COUNT
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 21-1
.WRITR -- ROUTINE TO WRITE A RECORD

    747	002156	105722 			40$:	TSTB	(R2)+		; REMOVE NEW LINE CHARACTER
    748	002160	005301 				DEC	R1		; REMOVE FROM COUNT
    749	002162	001323 				BNE	5$		; NO -- GO ON
    750	002164	000737 				BR	6$		; YES -- EXIT
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 22
.WRITW -- WRITE A WORD TO A FILE

    752					.SBTTL	.WRITW -- WRITE A WORD TO A FILE
    753
    754					;+
    755					; .WRITW -- ROUTINE TO WRITE A WORD TO A FILE
    756					;
    757					; THIS ROUTINE WILL WRITE A WORD TO A CURRENTLY OPEN FILE. IF THE
    758					; CURRENT BLOCK IS FULL THEN THE BLOCK WILL BE WRITTEN TO DISK AND
    759					; THE WORD WILL BE WRITTEN TO THE NEW BLOCK.
    760					;
    761					; INPUT ARGUMENTS:
    762					;
    763					;	R0=WORD TO WRITE
    764					;
    765					; OUTPUT ARGUMENTS:
    766					;
    767					;	NONE
    768					;
    769					; ERROR CODES RETURNED:
    770					;
    771					;	FEF -- FILE EXTEND FAILURE
    772					;	FWT -- FILE WRITE FAILURE
    773					;-
    774
    775	002166				.WRITW::
    776	002166	032737 	000001 	002202'		BIT	#1,.OTPOS	; ARE WE ON A WORD BOUNDRY?
    777	002174	001404 				BEQ	10$		; YES -- GO ON
    778	002176	005237 	002202'			INC	.OTPOS		; NO -- POSITION TO WORD BOUNDRY
    779	002202	005337 	002200'			DEC	.OTBBC		; DECREMENT FREE BYTE COUNT
    780	002206	005737 	002200'		10$:	TST	.OTBBC		; BLOCK FULL?
    781	002212	003002 				BGT	20$		; NO -- GO ON
    782	002214	004737 	002372'			CALL	.WRITE		; YES -- WRITE OUT BLOCK
    783	002220	010077 	002202'		20$:	MOV	R0,@.OTPOS	; WRITE WORD TO BUFFER
    784	002224	062737 	000002 	002202'		ADD	#2,.OTPOS	; UPDATE BUFFER POINTER
    785	002232	162737 	000002 	002200'		SUB	#2,.OTBBC	; UPDATE BYTE COUNT
    786	002240	000207 				RETURN			; DONE
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 23
.WRITB -- WRITE A BYTE TO A FILE

    788					.SBTTL	.WRITB -- WRITE A BYTE TO A FILE
    789
    790					;+
    791					; .WRITB -- ROUTINE TO WRITE A BYTE TO A FILE
    792					;
    793					; THIS ROUTINE WILL WRITE A BYTE TO A BUFFER THAT WILL THEN BE WRITTEN
    794					; TO DISK WHEN IT IS FULL.
    795					;
    796					; INPUT ARGUMENTS:
    797					;
    798					;	R0=BYTE TO WRITE
    799					;
    800					; OUTPUT ARGUMENTS:
    801					;
    802					;	NONE
    803					;
    804					; ERROR CODES RETURNED:
    805					;
    806					;	FEF -- FILE EXTEND FAILURE
    807					;	FWT -- FILE WRITE FAILURE
    808					;-
    809
    810	002242				.WRITB::
    811	002242	005737 	002200'			TST	.OTBBC		; BUFFER FULL?
    812	002246	003002 				BGT	10$		; NO -- GO ON
    813	002250	004737 	002372'			CALL	.WRITE		; YES -- WRITE OUT BLOCK
    814	002254	110077 	002202'		10$:	MOVB	R0,@.OTPOS	; WRITE BYE TO BUFFER
    815	002260	005237 	002202'			INC	.OTPOS		; UPDATE POSITION
    816	002264	005337 	002200'			DEC	.OTBBC		; UPDATE BYTE COUNT
    817	002270	000207 				RETURN			; DONE
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 24
.WRITZ -- WRITE OUT CURRENT BLOCK

    819					.SBTTL	.WRITZ -- WRITE OUT CURRENT BLOCK
    820
    821					;+
    822					; .WRITZ -- ROUTINE TO WRITE OUT CURRENT BUFFER
    823					;
    824					; THIS ROUTINE WILL WRITE OUT THE CURRENT BUFFER TO THE DISK FILE.
    825					; IF THE BUFFER IS NOT FULL THE THE EXCESS SPACE IS ZEROED.
    826					;
    827					; INPUT ARGUMENTS:
    828					;
    829					;	NONE
    830					;
    831					; OUTPUT ARGUMENTS:
    832					;
    833					;	NONE
    834					;
    835					; ERROR CODES RETURNED:
    836					;
    837					;	FEF -- FILE EXTEND FAILURE
    838					;	FWT -- FILE WRITE FAILURE
    839					;-
    840
    841	002272				.WRITZ::
    842	002272	013737 	002202'	003252'		MOV	.OTPOS,.OTATT+14	; NEXT FREE BYTE
    843	002300	162737 	002204'	003252'		SUB	#.OTBUF,.OTATT+14	; MAKE RELATIVE ADDR
    844	002306	023727 	002200'	000002 		CMP	.OTBBC,#2	; MORE THAN 1 BYTE LEFT?
    845	002314	002413 				BLT	10$		; NO -- JUST ZERO BUFFER
    846	002316	013700 	002200'			MOV	.OTBBC,R0	; YES -- WRITE ZERO RECORD
    847	002322	032737 	000001 	002202'		BIT	#1,.OTPOS	; ON WORD BOUNDRY?
    848	002330	001401 				BEQ	5$		; YES -- GO ON
    849	002332	005300 				DEC	R0		; NO -- DECREMENT COUNT
    850	002334	162700 	000002 		5$:	SUB	#2,R0		; DISCOUNT RECORD COUNT FIELD
    851	002340	004737 	002166'			CALL	.WRITW		; WRITE COUNT
    852	002344	005737 	002200'		10$:	TST	.OTBBC		; BUFFER FULL?
    853	002350	001405 				BEQ	20$		; YES -- DONE
    854	002352	112700 	000000 			MOVB	#0,R0		; WRITE OUT ZEROS
    855	002356	004737 	002242'		12$:	CALL	.WRITB		; NO -- FILL BUFFER
    856	002362	000770 				BR	10$		; NEXT
    857	002364	004737 	002372'		20$:	CALL	.WRITE		; WRITE OUT BUFFER
    858	002370	000207 				RETURN			; DONE
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 25
.WRITE -- ROUTINE TO WRITE A BLOCK

    860					.SBTTL	.WRITE -- ROUTINE TO WRITE A BLOCK
    861
    862					;+
    863					; .WRITE -- ROUTINE TO WRITE A BLOCK TO A FILE
    864					;
    865					; THIS ROUTINE WILL WRITE A BLOCK TO A CURRENTLY OPEN FILE ON DISK.
    866					; IF THE FILE SPACE IS FULL THE FILE WILL BE EXTENDED.
    867					;
    868					; INPUT ARGUMENTS:
    869					;
    870					;	NONE
    871					;
    872					; OUTPUT ARGUMENTS:
    873					;
    874					;	NONE
    875					;
    876					; ERROR CODES RETURNED:
    877					;
    878					;	FEF -- FILE EXTEND FAILURE
    879					;	FWT -- FILE WRITE FAILURE
    880					;-
    881
    882	002372				.WRITE::
    883	002372	062737 	000001 	002176'		ADD	#1,.OTVBN+2	; NEXT VIRTUAL BLOCK
    884	002400	005537 	002174'			ADC	.OTVBN		; PROPAGATE CARRY
    885	002404				10$:	QIOW$S	#IO.WVB,#LOGLUN,#E.FFIL,,#.FISTS,,<#.OTBUF,#.BUFSZ,,.OTVBN,.OTVBN+2>
	002404	013746 	002176'			MOV	.OTVBN+2,-(SP)
	002410	013746 	002174'			MOV	.OTVBN,-(SP)
	002414	005046 				CLR	-(SP)
	002416	012746 	001000 			MOV	#.BUFSZ,-(SP)
	002422	012746 	002204'			MOV	#.OTBUF,-(SP)
	002426	005046 				CLR	-(SP)
	002430	012746 	001050'			MOV	#.FISTS,-(SP)
	002434	005046 				CLR	-(SP)
	002436	112716 	000006 			MOVB	#E.FFIL,(SP)
	002442	012746 	000003 			MOV	#LOGLUN,-(SP)
	002446	012746 	000000G			MOV	#IO.WVB,-(SP)
	002452	012746 				MOV	(PC)+,-(SP)
	002454	   003 	   013 			.BYTE	3,$$$T1
	002456	104375 				EMT	375
    886	002460	103427 				BCS	WRIFWT		; ERROR IF CC-C IS SET
    887	002462	105737 	001050'			TSTB	.FISTS		; DID WE REALLY SUCCEED?
    888	002466	002415 				BLT	20$		; NO -- SEE WHY
    889	002470	013737 	002176'	003250'		MOV	.OTVBN+2,.OTATT+12	; SET HIGHEST USED BLOCK
    890	002476	013737 	002174'	003246'		MOV	.OTVBN,.OTATT+10	; SET HIGHEST USED BLOCK
    891	002504	012737 	002204'	002202'		MOV	#.OTBUF,.OTPOS	; YES -- SET BUFFER POINTER
    892	002512	012737 	001000 	002200'		MOV	#.BUFSZ,.OTBBC	; SET BYTE COUNT
    893	002520	000207 				RETURN			; DONE
    894	002522	122737 	000000G	001050'	20$:	CMPB	#IE.EOF,.FISTS	; E-O-F FOUND?
    895	002530	001003 				BNE	WRIFWT		; NO -- ERROR
    896	002532	004737 	001202'			CALL	.EXTND		; YES -- EXTEND FILE
    897	002536	000722 				BR	10$		; TRY AGAIN
    898						;
    899	002540				WRIFWT:
    900	002540					ERROR$	FWT		; ERROR -- FILE WRITE FAILURE
	002540	012737 	024454 	000004'		 MOV	#^RFWT,ERRCOD
	002546	000261 				 SEC
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 25-1
.WRITE -- ROUTINE TO WRITE A BLOCK

	002550	000207 				 RETURN
    901						;
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 27
.WRITE -- ROUTINE TO WRITE A BLOCK

    904
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 28
.WRITE -- ROUTINE TO WRITE A BLOCK

      1		000000'				.END	LOGXFR
FILIO -- FILE INTERFACE ROUTINE	MACRO M1113  03-APR-86 21:33  PAGE 28-1
SYMBOL TABLE

A.LULU= 000002   	E.FFIL= 000006   	LOKFLF  001040R  	$DBDTE= 000001   	.INDFG  001046RG    002
A.LUNA= 000004   	FNDALN  000062R     004	LOKFNA  000122R     004	$DH11 = 000001   	.INFN   001054RG    002
A.LUNU= 000006   	FNDALU= 000064R     004	LOKFNB= 000150R     004	$DSW  = ****** GX	.INFNB  002104RG    002
BC.HDS= ****** GX	FNDCAL  000722R  	LOKIOF= 000124R     004	$DTE  = 000001   	.INPOS  001102RG    002
BIT15 = 100000   	FNDDNF  000734R  	LOKLUN= 000126R     004	$FE   = 000001   	.INVBN  001074RG    002
BLKNUM  000012R     002	FNDFNA  000072R     004	L$$P20= 000002   	$F11  = 000001   	.LOKUP  000756RG
CLOATR= 000340R     004	FNDFNB= 000120R     004	OPEACC  000242R     004	$LP20 = 000001   	.OPEN   001130RG
CLOATT= 000344R     004	FNDLUN= 000076R     004	OPEATT= 000272R     004	$RP04 = 000001   	.OTATT  003236RG    002
CLODAC  000322R     004	HEADER  000006R     002	OPEFID= 000256R     004	$RX11 = 000001   	.OTBBC  002200RG    002
CLOFCF  001362R  	IE.EOF= ****** GX	OPEFOF  001170R  	$TOP10= 000001   	.OTBUF  002204RG    002
CLOIOF= 000324R     004	IE.NSF= ****** GX	OPEFUN= 000244R     004	$T1091= 000001   	.OTFN   002154RG    002
CLOLUN= 000326R     004	INDLUN= 000002   	OPELUN= 000246R     004	$$$ARG= 000005   	.OTFNB  003204RG    002
CLOWAT  000342R     004	IO.ACR= ****** GX	OPERAT  000270R     004	$$$OST= 000014   	.OTPOS  002202RG    002
CR      000125R     003	IO.ATT= ****** GX	PRE     000116R     003	$$$T1 = 000013   	.OTVBN  002174RG    002
CRLEN = 000002   	IO.CRE= ****** GX	PRELEN= 000007   	.ASCTY  000000R     004	.OUTLG  000000R     002
DV.EOF= ****** GX	IO.DAC= ****** GX	Q.IOAE= 000012   	.ATCTY  000010R     004	.READ   001646RG
DV.LOG= ****** GX	IO.DEL= ****** GX	Q.IOEF= 000006   	.BUFSZ= 001000 G 	.READB  001614RG
D$$H11= 000010   	IO.DET= ****** GX	Q.IOFN= 000002   	.CDOBC= 000042R     004	.READR  001432RG
D.CLOG= ****** GX	IO.ENA= ****** GX	Q.IOLU= 000004   	.CDOBP= 000040R     004	.READW  001536RG
ENTCRE  000152R     004	IO.EXT= ****** GX	Q.IOPL= 000014   	.CDOUT  000024R     004	.RECNT  003254RG    002
ENTDEL  000226R     004	IO.FNA= ****** GX	Q.IOPR= 000007   	.CLOSE  001316RG 	.RECPT  003256RG    002
ENTENA  000176R     004	IO.RNA= ****** GX	Q.IOSB= 000010   	.COMEF= ****** GX	.RECRD  003260RG    002
ENTFEN  001116R  	IO.RVB= ****** GX	REAFRD  001776R  	.DELET  001302RG 	.REMOV  000746RG
EOFMSG  000127R     003	IO.WLB= ****** GX	R$$11D= 000001   	.DTCTY  000046R     004	.SETFN  001374RG
ERR     000101R     003	IO.WVB= ****** GX	TOTBLK  000014R     002	.ENTER  001052RG 	.TYMSG  000002R     002
ERRCOD  000004RG    002	IS.SET= ****** GX	TTYLUN= 000001   	.EXTND  001202RG 	.WRITB  002242RG
ERRELF  000000R     003	LEN   = 000015   	TYPERR  000372R  	.FISTS  001050RG    002	.WRITE  002372RG
ERRITE  000016R     003	LENELF= 000016   	WRIFWT  002540R  	.FNDIR  000624RG 	.WRITR  002030RG
ERRPNR  000045R     003	LENITE= 000027   	XFRBLK  000172R  	.INATT  002136RG    002	.WRITW  002166RG
ERRTAB  001016R     002	LENPNR= 000034   	XFRBUF  000016R     002	.INBBC  001100RG    002	.WRITZ  002272RG
EXTEXT  000276R     004	LOGLUN= 000003   	$CD11 = 000001   	.INBUF  001104RG    002	..STIN= ****** GX
EXTFEF  001234R  	LOGXFR  000000RG

. ABS.	000000	   000
      	002552	   001
DATA  	003400	   002
MESSAG	000137	   003
DPBS  	000350	   004
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  3292 WORDS  ( 13 PAGES)
DYNAMIC MEMORY:  4622 WORDS  ( 17 PAGES)
ELAPSED TIME:  00:00:46
[47,10]LOGXFR,[47,20]LOGXFR/-SP/CR=[20,30]RSXFC/PA:1,[47,30]LOGXFR,[51,30]FILIO,[47,30]ES
LOGXFR     CREATED BY  MACRO  ON 3-APR-86 AT 21:33	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

A.LULU	= 000002	#7-308     #10-189     10-191    
A.LUNA	= 000004	#7-308     #10-189    
A.LUNU	= 000006	#7-308     #10-189    
BC.HDS	= ******  GX	 5-184      6-274     
BIT15 	= 100000	#3-83       5-184      6-274      12-305     13-355     14-415    
BLKNUM	  000012 R	*5-192      5-193     #5-218     
CLOATR	= 000340 R	*15-445    *15-449    #15-472    
CLOATT	= 000344 R	*15-451    #15-479    
CLODAC	  000322 R	 15-452    #15-467     15-470     15-471     15-472    
CLOFCF	  001362 R	 15-453     15-455    #15-461    
CLOIOF	= 000324 R	*15-444    *15-448    #15-470    
CLOLUN	= 000326 R	*15-450    #15-471    
CLOWAT	  000342 R	 15-449    #15-474     15-479    
CR    	  000125 R	 6-266     #6-299      6-300     
CRLEN 	= 000002	 6-267     #6-300     
DV.EOF	= ******  GX	 6-278     
DV.LOG	= ******  GX	 5-191      6-278     
D.CLOG	= ******  GX	 5-186      6-277     
ENTCRE	  000152 R	 12-287    #12-304    
ENTDEL	  000226 R	 12-296    #12-310    
ENTENA	  000176 R	 12-291    #12-307    
ENTFEN	  001116 R	 12-288     12-290    #12-298    
EOFMSG	  000127 R	 17-564    #17-573    
ERR   	  000101 R	 6-293     #6-293      6-293     
ERRCOD	  000004 RG	*4-140     #4-151     *5-197     *5-205      6-247      6-258     *10-181    *10-183    *11-251    
                        *12-299    *13-349    *14-409    *15-462    *20-691    *25-900    
ERRELF	  000000 R	 6-290     #6-290      6-290     
ERRITE	  000016 R	 6-291     #6-291      6-291     
ERRPNR	  000045 R	 6-292     #6-292      6-292     
ERRTAB	  001016 R	 6-255     #6-289     
EXTEXT	  000276 R	 14-392    #14-414    
EXTFEF	  001234 R	 14-393     14-395    #14-400    
E.FFIL	= 000006	#3-81       10-194     11-257     12-305     12-308     12-311     13-355     14-415     15-468    
                         20-676     25-885    
FNDALN	  000062 R	 10-167    #10-188     10-191    
FNDALU	= 000064 R	*10-166    #10-191    
FNDCAL	  000722 R	 10-168    #10-180    
FNDDNF	  000734 R	 10-172     10-174    #10-182    
FNDFNA	  000072 R	 10-171    #10-193     10-196     10-197    
FNDFNB	= 000120 R	*10-170    #10-197    
FNDLUN	= 000076 R	*10-169    #10-196    
FTKLI 	= ******	 9-44       9-55       14-405     17-520    
HEADER	  000006 R	 5-188     #5-217      6-275     
IE.EOF	= ******  GX	 25-894    
IE.NSF	= ******  GX	 11-243    
INDLUN	= 000002	#3-78       4-123      6-282      17-562     20-676     20-688    
IO.ACR	= ******  GX	 4-124     
IO.ATT	= ******  GX	 7-312     
IO.CRE	= ******  GX	 12-305    
IO.DAC	= ******  GX	 15-448    
IO.DEL	= ******  GX	 12-311     15-444    
IO.DET	= ******  GX	 7-323     
LOGXFR     CREATED BY  MACRO  ON 3-APR-86 AT 21:33	PAGE 2

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

IO.ENA	= ******  GX	 12-308    
IO.EXT	= ******  GX	 14-415    
IO.FNA	= ******  GX	 10-194     11-233    
IO.RNA	= ******  GX	 11-230    
IO.RVB	= ******  GX	 20-676    
IO.WLB	= ******  GX	 7-316     
IO.WVB	= ******  GX	 25-885    
IS.SET	= ******  GX	 5-200     
LEN   	= 000015	 6-293     #6-293     
LENELF	= 000016	 6-290     #6-290     
LENITE	= 000027	 6-291     #6-291     
LENPNR	= 000034	 6-292     #6-292     
LOGLUN	= 000003	#3-79       12-305     12-308     12-311     14-404     14-415     25-885    
LOGXFR	  000000 RG	#4-115      28-1      
LOKFLF	  001040 R	 11-239     11-244    #11-250    
LOKFNA	  000122 R	 11-238    #11-256     11-259     11-260     11-261    
LOKFNB	= 000150 R	*11-237    #11-261    
LOKIOF	= 000124 R	*11-230    *11-233    #11-259    
LOKLUN	= 000126 R	*11-236    #11-260    
OPEACC	  000242 R	 13-344    #13-354     13-357     13-358     13-359    
OPEATT	= 000272 R	*13-342    *13-343    #13-366    
OPEFID	= 000256 R	*13-341    #13-359    
OPEFOF	  001170 R	 13-345    #13-348    
OPEFUN	= 000244 R	*13-339    #13-357    
OPELUN	= 000246 R	*13-340    #13-358    
OPERAT	  000270 R	 13-355    #13-361     13-366    
PRE   	  000116 R	 6-251     #6-297      6-298     
PRELEN	= 000007	 6-252     #6-298     
Q.IOAE	= 000012	#7-312     #7-316     #7-323     #10-194    #11-257    #12-305    #12-308    #12-311    #13-355    
                        #14-415    #15-468    
Q.IOEF	= 000006	#7-312     #7-316     #7-323     #10-194    #11-257    #12-305    #12-308    #12-311    #13-355    
                        #14-415    #15-468    
Q.IOFN	= 000002	#7-312     #7-316     #7-323     #10-194    #11-257     11-259    #12-305    #12-308    #12-311    
                        #13-355     13-357    #14-415    #15-468     15-470    
Q.IOLU	= 000004	#7-312     #7-316     #7-323     #10-194     10-196    #11-257     11-260    #12-305    #12-308    
                        #12-311    #13-355     13-358    #14-415    #15-468     15-471    
Q.IOPL	= 000014	#7-312     #7-316      7-318      7-319     #7-323     #10-194     10-197    #11-257     11-261    
                        #12-305    #12-308    #12-311    #13-355     13-359    #14-415    #15-468     15-472    
Q.IOPR	= 000007	#7-312     #7-316     #7-323     #10-194    #11-257    #12-305    #12-308    #12-311    #13-355    
                        #14-415    #15-468    
Q.IOSB	= 000010	#7-312     #7-316     #7-323     #10-194    #11-257    #12-305    #12-308    #12-311    #13-355    
                        #14-415    #15-468    
REAFRD	  001776 R	 20-677     20-679    #20-686    
TOTBLK	  000014 R	*4-130     *4-131     *4-132     *4-133      5-194     #5-219     
TTYLUN	= 000001	#3-77       7-308      7-312      7-316      7-323     
TYPERR	  000372 R	 4-128      4-135      4-141      4-145      5-198      5-206     #6-246      6-284     
WRIFWT	  002540 R	 25-886     25-895    #25-899    
XFRBLK	  000172 R	 4-146     #5-178     
XFRBUF	  000016 R	 5-181     #5-220     
$DSW  	= ******  GX	 5-200     
$TOP20	= ******	 5-209     
$$$ARG	= 000005	#7-308      7-308     #7-308      7-308     #7-308      7-308     #7-312      7-312     #7-316     
LOGXFR     CREATED BY  MACRO  ON 3-APR-86 AT 21:33	PAGE 3

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         7-316     #7-316      7-316     #7-316      7-316     #7-316      7-316     #7-323      7-323     
                        #10-189     10-189    #10-189     10-189    #10-189     10-189    #10-194     10-194    #10-194    
                         10-194    #10-194     10-194    #10-194     10-194    #10-194     10-194    #10-194     10-194    
                        #10-194     10-194    #11-257     11-257    #11-257     11-257    #11-257     11-257    #11-257    
                         11-257    #11-257     11-257    #11-257     11-257    #11-257     11-257    #12-305     12-305    
                        #12-305     12-305    #12-305     12-305    #12-305     12-305    #12-305     12-305    #12-308    
                         12-308    #12-308     12-308    #12-308     12-308    #12-308     12-308    #12-308     12-308    
                        #12-308     12-308    #12-308     12-308    #12-311     12-311    #13-355     13-355    #13-355    
                         13-355    #13-355     13-355    #13-355     13-355    #13-355     13-355    #13-355     13-355    
                        #14-415     14-415    #14-415     14-415    #14-415     14-415    #14-415     14-415    #14-415    
                         14-415    #15-468     15-468    #15-468     15-468    #15-468     15-468    #20-676     20-676    
                         20-676     20-676     20-676     20-676     20-676     20-676     20-676     20-676     20-676    
                         20-676    #25-885     25-885     25-885     25-885     25-885     25-885     25-885     25-885    
                         25-885     25-885     25-885     25-885    
$$$GLB	= ******	 7-308      7-308      7-308      7-308      7-312      7-312      7-312      7-312      7-312     
                         7-312      7-312      7-312      7-316      7-316      7-316      7-316      7-316      7-316     
                         7-316      7-316      7-323      7-323      7-323      7-323      7-323      7-323      7-323     
                         7-323      10-189     10-189     10-189     10-189     10-194     10-194     10-194     10-194    
                         10-194     10-194     10-194     10-194     11-257     11-257     11-257     11-257     11-257    
                         11-257     11-257     11-257     12-305     12-305     12-305     12-305     12-305     12-305    
                         12-305     12-305     12-308     12-308     12-308     12-308     12-308     12-308     12-308    
                         12-308     12-311     12-311     12-311     12-311     12-311     12-311     12-311     12-311    
                         13-355     13-355     13-355     13-355     13-355     13-355     13-355     13-355     14-415    
                         14-415     14-415     14-415     14-415     14-415     14-415     14-415     15-468     15-468    
                         15-468     15-468     15-468     15-468     15-468     15-468    
$$$OST	= 000014	#7-308      7-308      7-308     #7-308      7-308      7-308     #7-308      7-308      7-308     
                        #7-308     #7-312      7-312      7-312     #7-312      7-312      7-312     #7-312      7-312     
                         7-312     #7-312      7-312      7-312     #7-312      7-312      7-312     #7-312      7-312     
                         7-312     #7-312      7-312     #7-316      7-316      7-316     #7-316      7-316      7-316     
                        #7-316      7-316      7-316     #7-316      7-316      7-316     #7-316      7-316      7-316     
                        #7-316      7-316      7-316     #7-316      7-316     #7-323      7-323      7-323     #7-323     
                         7-323      7-323     #7-323      7-323      7-323     #7-323      7-323      7-323     #7-323     
                         7-323      7-323     #7-323      7-323      7-323     #7-323      7-323     #10-189     10-189    
                         10-189    #10-189     10-189     10-189    #10-189     10-189     10-189    #10-189    #10-194    
                         10-194     10-194    #10-194     10-194     10-194    #10-194     10-194     10-194    #10-194    
                         10-194     10-194    #10-194     10-194     10-194    #10-194     10-194     10-194    #10-194    
                         10-194    #11-257     11-257     11-257    #11-257     11-257     11-257    #11-257     11-257    
                         11-257    #11-257     11-257     11-257    #11-257     11-257     11-257    #11-257     11-257    
                         11-257    #11-257     11-257    #12-305     12-305     12-305    #12-305     12-305     12-305    
                        #12-305     12-305     12-305    #12-305     12-305     12-305    #12-305     12-305     12-305    
                        #12-305     12-305     12-305    #12-305     12-305    #12-308     12-308     12-308    #12-308    
                         12-308     12-308    #12-308     12-308     12-308    #12-308     12-308     12-308    #12-308    
                         12-308     12-308    #12-308     12-308     12-308    #12-308     12-308    #12-311     12-311    
                         12-311    #12-311     12-311     12-311    #12-311     12-311     12-311    #12-311     12-311    
                         12-311    #12-311     12-311     12-311    #12-311     12-311     12-311    #12-311     12-311    
                        #13-355     13-355     13-355    #13-355     13-355     13-355    #13-355     13-355     13-355    
                        #13-355     13-355     13-355    #13-355     13-355     13-355    #13-355     13-355     13-355    
                        #13-355     13-355    #14-415     14-415     14-415    #14-415     14-415     14-415    #14-415    
                         14-415     14-415    #14-415     14-415     14-415    #14-415     14-415     14-415    #14-415    
                         14-415     14-415    #14-415     14-415    #15-468     15-468     15-468    #15-468     15-468    
                         15-468    #15-468     15-468     15-468    #15-468     15-468     15-468    #15-468     15-468    
                         15-468    #15-468     15-468     15-468    #15-468     15-468    
LOGXFR     CREATED BY  MACRO  ON 3-APR-86 AT 21:33	PAGE 4

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

$$$T1 	= 000013	#7-308      7-308      7-308     #7-308      7-308      7-308     #7-308      7-308      7-308     
                        #10-189     10-189     10-189    #10-189     10-189     10-189    #10-189     10-189     10-189    
                        #20-676     20-676    #25-885     25-885    
.ASCTY	  000000 R	 4-116     #7-306     
.ATCTY	  000010 R	 6-249     #7-310     
.BUFSZ	= 001000  G	#9-53       9-72       9-109      20-676     25-885     25-892    
.CDOBC	= 000042 R	*6-252     *6-263     *6-267     #7-319     
.CDOBP	= 000040 R	*6-251     *6-262     *6-266     #7-318     
.CDOUT	  000024 R	 6-253      6-264      6-268     #7-314      7-318      7-319     
.CLOSE	  001316 RG	 6-283      14-408    #15-447     17-563     20-690    
.COMEF	= ******  GX	 5-203     
.DELET	  001302 RG	 4-134     #15-443    
.DTCTY	  000046 R	 6-270     #7-321     
.ENTER	  001052 RG	#12-286    
.EXTND	  001202 RG	#14-391     25-896    
.FISTS	  001050 RG	#9-50       10-173     10-194     11-240     11-243     11-257     12-289     12-293     12-305    
                         12-308     13-355     14-394     14-415     15-454     15-468     20-676     20-678     20-681    
                         25-885     25-887     25-894    
.FNDIR	  000624 RG	#10-163     11-234    
.INATT	  002136 RG	 4-130      4-136      4-138      6-281     #9-84       20-674     20-687    
.INBBC	  001100 RG	#9-67      *18-605     18-606    *18-612     19-639    *19-645    *20-681    
.INBUF	  001104 RG	 5-180     #9-71       20-676     20-680    
.INDFG	  001046 RG	*4-129      6-271     *6-273     #9-46      *17-560    *20-689    
.INFN 	  001054 RG	*4-118     *4-119     *4-120      4-121     #9-57      
.INFNB	  002104 RG	 4-122     #9-74       17-561    
.INPOS	  001102 RG	#9-69       18-602    *18-604     18-610    *18-611     19-643    *19-644    *20-680    
.INVBN	  001074 RG	*4-142     *4-143     #9-65      *20-672    *20-673     20-674     20-676     20-676    
.LOKUP	  000756 RG	#11-232    
.OPEN 	  001130 RG	 4-127     #13-338    
.OTATT	  003236 RG	#9-121     *14-396    *14-397    *14-401    *14-402     14-403     21-734    *21-736    *24-842    
                        *24-843    *25-889    *25-890    
.OTBBC	  002200 RG	#9-104     *22-779     22-780    *22-785     23-811    *23-816     24-844     24-846     24-852    
                        *25-892    
.OTBUF	  002204 RG	#9-108      14-402     24-843     25-885     25-891    
.OTFN 	  002154 RG	#9-94      
.OTFNB	  003204 RG	#9-111      12-305     12-308    
.OTPOS	  002202 RG	#9-106      14-401     22-776    *22-778     22-783    *22-784     23-814    *23-815     24-842    
                         24-847    *25-891    
.OTVBN	  002174 RG	#9-102     *25-883    *25-884     25-885     25-885     25-889     25-890    
.OUTLG	  000000 R	#3-87      *14-406    
.READ 	  001646 RG	 4-144      18-608     19-641    #20-671    
.READB	  001614 RG	 17-554    #19-638    
.READR	  001432 RG	#17-546    
.READW	  001536 RG	 17-548    #18-601    
.RECNT	  003254 RG	#9-129     *21-727     21-733    *21-746    
.RECPT	  003256 RG	#9-131      21-725    *21-726    *21-745    
.RECRD	  003260 RG	 9-132     #9-133      21-732     21-745    
.REMOV	  000746 RG	 4-125     #11-229    
.SETFN	  001374 RG	 11-235    #16-505    
.TYMSG	  000002 R	#3-88       17-565    
.WRITB	  002242 RG	 21-742    #23-810     24-855    
.WRITE	  002372 RG	 22-782     23-813     24-857    #25-882    
LOGXFR     CREATED BY  MACRO  ON 3-APR-86 AT 21:33	PAGE 5

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

.WRITR	  002030 RG	#21-719    
.WRITW	  002166 RG	 21-738    #22-775     24-851    
.WRITZ	  002272 RG	#24-841    
..STIN	= ******  GX	 5-195      6-280     
LOGXFR     CREATED BY  MACRO  ON 3-APR-86 AT 21:33	PAGE 6

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

ALUN$ 		#2-40      #7-308     #8-38      #10-189    
CLEF$S		#2-40      #5-187     #5-199     
DIR$  		#2-40      #4-116     #5-187     #5-187     #5-199     #5-199     #5-202     #5-202     #6-249     #6-253     
                #6-264     #6-268     #6-270     #6-285     #6-285     #8-38      #10-167    #10-171    #11-238    #12-287    
                #12-291    #12-296    #13-344    #14-392    #15-452    #20-676    #20-676    #25-885    #25-885    
ERRENT		#3-50       6-290      6-291      6-292      6-293     
ERROR$		#3-44       10-181     10-183     11-251     12-299     13-349     14-409     15-462     20-691     25-900    
ERR$  		#4-116     #5-187     #5-199     #5-202     #6-249     #6-253     #6-264     #6-268     #6-270     #6-285     
                #10-167    #10-171    #11-238    #12-287    #12-291    #12-296    #13-344    #14-392    #15-452    #20-676    
                #25-885    
EXIT$S		#2-40       6-285     
MOV$  		#5-187      5-187     #5-199      5-199     #20-676    #20-676     20-676     20-676     20-676     20-676    
                 20-676     20-676     20-676     20-676     20-676    #25-885    #25-885     25-885     25-885     25-885    
                 25-885     25-885     25-885     25-885     25-885     25-885    
MRKT$S		#2-40      
MVB$  		#20-676    #20-676    #25-885    #25-885    
NBL$  		#7-308      7-308     #10-189     10-189    
OFF$  		#7-308     #7-308     #7-308     #7-308     #7-308     #7-312     #7-312     #7-312     #7-312     #7-312     
                #7-312     #7-312     #7-312     #7-312     #7-316     #7-316     #7-316     #7-316     #7-316     #7-316     
                #7-316     #7-316     #7-316     #7-323     #7-323     #7-323     #7-323     #7-323     #7-323     #7-323     
                #7-323     #7-323     #10-189    #10-189    #10-189    #10-189    #10-189    #10-194    #10-194    #10-194    
                #10-194    #10-194    #10-194    #10-194    #10-194    #10-194    #11-257    #11-257    #11-257    #11-257    
                #11-257    #11-257    #11-257    #11-257    #11-257    #12-305    #12-305    #12-305    #12-305    #12-305    
                #12-305    #12-305    #12-305    #12-305    #12-308    #12-308    #12-308    #12-308    #12-308    #12-308    
                #12-308    #12-308    #12-308    #12-311    #12-311    #12-311    #12-311    #12-311    #12-311    #12-311    
                #12-311    #12-311    #13-355    #13-355    #13-355    #13-355    #13-355    #13-355    #13-355    #13-355    
                #13-355    #14-415    #14-415    #14-415    #14-415    #14-415    #14-415    #14-415    #14-415    #14-415    
                #15-468    #15-468    #15-468    #15-468    #15-468    #15-468    #15-468    #15-468    #15-468    
POP   		#3-71      #16-517    #17-558    #21-729    #21-744    
PUSH  		#3-65      #16-506    #17-547    #21-720    #21-731    
QDPB$ 		#7-312      7-312     #7-316      7-316     #7-323      7-323     #10-194     10-194    #11-257     11-257    
                #12-305     12-305    #12-308     12-308    #12-311     12-311    #13-355     13-355    #14-415     14-415    
                #15-468     15-468    
QDPB$S		#20-676     20-676    #25-885     25-885    
QIOW$ 		#2-40       7-312      7-316      7-323     #8-38       10-194     11-257     12-305     12-308     12-311    
                 13-355     14-415     15-468    
QIOW$S		#8-38       20-676     25-885    
RVP$  		#20-676     20-676    #25-885     25-885    
WSIG$S		#2-40      #5-202     
WTSE$S		#2-40