Google
 

Trailing-Edge - PDP-10 Archives - BB-H311B-RM - rsx20f-swskit/listings/t20acp.lis
There are no other files named t20acp.lis in the archive.
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58
TABLE OF CONTENTS

    3-   2	TITLE PAGE
    4-  38	FE DEVICE PACKET DESCRIPTIONS
    5-  83	MACROS AND DEFINITIONS
    6- 153	IMPURE DATA
    7- 182	DISPATCH
    8- 296	ERROR PROCESSING
    9- 307	DIRECTORY FUNCTIONS: FNA, ENA, RNA
   10- 330	ACCESS FUNCTIONS: ACR, ACW, ACE
   11- 368	DEACCESS FILE: DAC
   12- 393	EXTEND FILE: EXT
   13- 409	CREATE FILE: CRE
   14- 425	DELETE FILE: DEL
   15- 440	READ/WRITE ATTRIBUTES: RAT, WAT
   16- 471	READ/WRITE VIRTUAL BLOCK: RVB, WVB
   17- 519	ACP CONTROL: APC
   18- 577	GTWACB/GTRACB/PTRACB -- ATTRIBUTE CONTROL
   19- 686	GETFID/GETFI1 -- GET FILE-ID
   20- 724	GETBUF/PUTBUF -- GET/PUT DATA FROM/TO USER
   21- 762	FEWAIT -- SEND REQUEST TO FE DEVICE
   22- 795	END STATEMENT
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 3


      1						.TITLE	T20ACP -- TOPS-20 FILE CONTROL ACP
      2						.SBTTL	TITLE PAGE
      3					.IDENT	"V001A"
      4					;
      5					;
      6					;
      7					;
      8					;                             COPYRIGHT (C) 1975, 1978 BY
      9					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
     10					;
     11					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
     12					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
     13					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     14					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     15					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     16					;
     17					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     18					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     19					;       CORPORATION.
     20					;
     21					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     22					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     23					;
     24					;
     25					;
     26					;
     27					;
     28					;		MODULE: T20ACP
     29					;
     30					;		VERSION: V001A
     31					;
     32					;		AUTHOR: TOM PORCHER
     33					;
     34					;		DATE: 1-DEC-75
     35					;
     36					;
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 4
FE DEVICE PACKET DESCRIPTIONS

     38						.SBTTL	FE DEVICE PACKET DESCRIPTIONS
     39					;
     40					; QUEUE I/O REQUESTS TO THE FE DEVICE USE THE FOLLOWING 6 WORD PARAMETER BLOCK:
     41					;
     42					; Q.IOPL+0	BUFFER ADDRESS (TO -20 DATA)
     43					; Q.IOPL+2	BUFFER SIZE (TO -20 DATA)
     44					; Q.IOPL+4	BUFFER ADDRESS (FROM -20 DATA)
     45					; Q.IOPL+6	PARAMETER #1 (PASSED DIRECTLY TO -20 IN PACKET HEADER)
     46					; Q.IOPL+10	PARAMETER #2 (PASSED DIRECTLY TO -20 IN PACKET HEADER)
     47					; Q.IOPL+12	BUFFER SIZE (FROM -20 DATA)
     48					;
     49					; ALL FILE CONTROL REQUESTS USE A SUBFUNCTION OF THE IO.ATT FUNCTION,
     50					; DEFINED AS IO.FCP.  THE PARAMETERS PASSED TO THE -20 ARE:
     51					;	#1 --	FCP I/O FUNCTION CODE
     52					;	#2 --	USER'S UIC
     53					;
     54					; SEVERAL FORMS OF DATA BLOCKS ARE USED TO PASS THE PARAMETERS TO THE -20:
     55					;
     56					; DIRECTORY FUNCTIONS: FNA, ENA, RNA
     57					;	ENTIRE FILE-NAME BLOCK IS SENT AS DATA AND ALSO RETURNED AS DATA.
     58					; SIZE= S.DRFN
     59					;
     60					; FILE OPERATIONS: ACR, ACW, ACE, DAC, EXT, CRE, DEL, RAT, WAT
     61					; 0	FILE-ID -- PART 1
     62					; 2	FILE-ID -- PART 2
     63					; 4	CONTROL PARAMETER #1 (EXTEND OR ACCESS PARAMETER)
     64					; 6	CONTROL PARAMETER #2 (EXTEND PARAMETER)
     65					; 10	ATTRIBUTE CONTROL BLOCK (VARIABLE LENGTH)
     66					;
     67					; THIS IS THE GENERAL FORM, AND IN MOST CASES ALL PARAMETERS DO NOT
     68					; EXIST AND ARE SKIPPED.  THE FUNCTIONS WHICH READ ATTRIBUTES RETURN
     69					; THE ATTRIBUTE CONTROL BLOCK AND THE ATTRIBUTE DATA.  CREATE (CRE)
     70					; RETURNS A FILE-ID (2 WORDS).
     71					;
     72					; BLOCK I/O OPERATIONS: RVB, WVB
     73					; 0	HIGH BLOCK NUMBER
     74					; 2	LOW BLOCK NUMBER
     75					; 4	DATA SIZE IN BYTES
     76					;
     77					; WRITE (WVB) INCLUDES THE DATA TO BE WRITTEN FOLLOWING THE SIZE WORD.
     78					; READ (RVB) RETURNS THE DATA READ.
     79					;
     80					; ACP CONTROL FUNCTIONS: APC
     81					; 0	FUNCTION CODE (1= MOUNT, 2= DISMOUNT)
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 5
MACROS AND DEFINITIONS

     83						.SBTTL	MACROS AND DEFINITIONS
     84					;
     85						.LIST	MEB
     86						.ENABLE	AMA
     87					;
     88					; MISC. MCALLS
     89					;
     90					.MCALL QIOSY$,QIOW$,RCVX$S,SVTK$S,CALL,RETURN,PUSH,POP,$DEF
     91	000000					QIOSY$
     92	000000					$DEF
     93					;
     94					; PARAMETERS
     95					;
     96		000032 			S.DRFN=	32			;SIZE OF FILE-NAME BLOCK FOR DIRECTORY FUNCTIONS
     97		001401 			IO.FCP=	IO.ATT+1		;FILE-CONTROL REQUEST TO FE DEVICE
     98					;
     99					; EVENT FLAGS
    100					;
    101		000001 			E.FQIO=	1			;(1) QIO COMPLETION (FE DEVICE)
    102		000001 			 EF.QIO=BIT0
    103					;
    104					; LOGICAL UNIT NUMBERS
    105					;
    106		000001 			FELUN=	1
    107					;
    108					; I/O REQUEST PARAMETERS
    109					;
    110		000024 			R.PB=	24	;**** GLOBAL ****
    111		000024 			R.FIDP=	R.PB+0			;(2) FILE-ID POINTER
    112		000026 			R.RWAT=	R.PB+2			;(2) READ/WRITE ATTRIBUTES BLOCK POINTER
    113		000030 			R.EXTD=	R.PB+4			;(4) EXTEND PARAMETERS
    114		000034 			R.ACTL=	R.PB+10			;(2) ACCESS PARAMETERS
    115		000036 			R.FNBP=	R.PB+12			;(2) FILE NAME BLOCK POINTER
    116					;
    117		000024 			R.RWAD=	R.PB+0			;(2) READ/WRITE ADDRESS
    118		000026 			R.RWCT=	R.PB+2			;(2) READ/WRITE WORD COUNT
    119		000032 			R.RWVB=	R.PB+6			;(4) READ/WRITE VIRTUAL BLOCK NUMBER
    120					;
    121					; FILE-ID BLOCK OFFSETS
    122					;
    123		000000 			F.IWIN=	0			;(2) WINDOW WORD, MUST BE ZERO FOR COMPATABILITY
    124		000002 			F.IFID=	2			;(4) FILE-ID
    125		000010 			F.ISIZ=	10			;SIZE OF FILE-ID BLOCK
    126					;
    127					; MACROS
    128					;
    129					.MACRO	ERR	A,B
    130						 MOVB	#A,QIOSTS+0
    131					.ENDM	ERR
    132					;
    133					.MACRO	ERRX	A,B
    134					 .IF NB <A>
    135						 MOV	#A,R0
    136						 JMP	ERRORX
    137					 .IFF
    138						 JMP	ERRORZ
    139					 .ENDC
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 5-1
MACROS AND DEFINITIONS

    140					.ENDM	ERRX
    141					;
    142					.MACRO	CALLR	A
    143						 JMP	A
    144					.ENDM	CALLR
    145					;
    146					.MACRO	GTSKHD	R
    147						 MOV	A.HA(R),R
    148					.ENDM	GTSKHD
    149					;
    150					.MACRO	XTSKHD
    151					.ENDM	XTSKHD
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 6
IMPURE DATA

    153						.SBTTL	IMPURE DATA
    154					;
    155					; SEND/REQUEST RECIEVE BUFFER FOR REQUESTS
    156					;
    157	000000				RCVBUF:	.BLKW	2		;TRASH WORDS
    158	000004				IOPKT:	.BLKW	1		;ADDRESS OF I/O PACKET
    159	000006				PUDADR:	.BLKW	1		;ADDRESS OF PUD ENTRY FOR REQUESTED DEVICE
    160	000010				IOFUNC:	.BLKW	1		;I/O FUNCTION CODE
    161					;
    162					; MISC. VARIABLES
    163					;
    164	000012				QIOSTS:	.BLKW	2		;I/O STATUS FOR CURRENT OPERATION
    165	000016				SPSAVE:	.BLKW	1		;TOP-LEVEL STACK POINTER SAVE
    166	000020				FIDPTR:	.BLKW	1		;POINTER TO FILE-ID BLOCK (IF ANY)
    167					;
    168					; BUFFER FOR TRANSFERS TO/FROM FE DEVICE
    169					;
    170	000022				FEBUF:	.BLKW	512.		;BIG BUFFER
    171		002000 			FEBFSZ=	.-FEBUF
    172					;
    173					; READ ATTRIBUTE CONTROL BLOCK TEMPORARY STORAGE
    174					;
    175	002022				RWATCB:	.BLKW	2*10.		;MAX NUMBER OF ATTRIBUTES CAN BE SPECIFIED
    176		000050 			RWATSZ=	.-RWATCB
    177					;
    178					; DPB'S
    179					;
    180	002072				FEQIOW:	QIOW$	IO.FCP,FELUN,E.FQIO,,QIOSTS,,<,,,,,>
	002072	   003 	   014 			.BYTE	3,$$$ARG
	002074	001401 				.WORD	IO.FCP
	002076	000001 				.WORD	FELUN
	002100	   001 	   000 			.BYTE	E.FQIO,
	002102	000012'				.WORD	QIOSTS
	002104	000000 				.WORD
	002106	000000 				.WORD
	002110	000000 				.WORD
	002112	000000 				.WORD
	002114	000000 				.WORD
	002116	000000 				.WORD
	002120	000000 				.WORD
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 7
DISPATCH

    182						.SBTTL	DISPATCH
    183					;
    184					; DISPATCH TABLE
    185					;
    186		000011 			LOWFNC=	11			;MIN FUNCTION LEGAL
    187	002122				DSPTAB:
    188	002122	002504'				.WORD	DIRFNC		;(11) FNA: FIND NAME IN DIRECTORY
    189	002124	002460'				.WORD	ILLFNC		;(12) UNUSED
    190	002126	002504'				.WORD	DIRFNC		;(13) RNA: REMOVE NAME FROM DIRECTORY
    191	002130	002504'				.WORD	DIRFNC		;(14) ENA: ANTER NAME IN DIRECTORY
    192	002132	002570'				.WORD	ACCESS		;(15) ACR: ACCESS FOR READ
    193	002134	002570'				.WORD	ACCESS		;(16) ACW: ACCESS FOR WRITE
    194	002136	002570'				.WORD	ACCESS		;(17) ACE: ACCESS FOR EXTEND
    195	002140	002736'				.WORD	DEACC		;(20) DAC: DEACCESS FILE
    196	002142	003304'				.WORD	RWVBLK		;(21) RVB: READ VIRTUAL BLOCK
    197	002144	003304'				.WORD	RWVBLK		;(22) WVB: WRITE VIRTUAL BLOCK
    198	002146	003036'				.WORD	EXTEND		;(23) EXT: EXTEND FILE
    199	002150	003100'				.WORD	CREATE		;(24) CRE: CREATE
    200	002152	003146'				.WORD	DELETE		;(25) DEL: DELETE FILE
    201	002154	003206'				.WORD	RWAT		;(26) RAT: READ ATTRIBUTES
    202	002156	003206'				.WORD	RWAT		;(27) WAT: WRITE ATTRIBUTES
    203	002160	003466'				.WORD	CONTRL		;(30) APC: ACP CONTROL
    204					;
    205		000030 			HGHFNC=	30			;MAX FUNCTION CODE
    206					;
    207					; HERE ON REQUEST FOR T20ACP, VIA SEND AND REQUEST FROM EXEC
    208					;  ON A FILE REQUEST FOR THE FE DEVICE.
    209					;
    210	002162				T20ACP:	RCVX$S	,#RCVBUF	;GET THE REQUEST BLOCK
	002162	012746 	000000'			MOV	#RCVBUF,-(SP)
	002166	005046 				CLR	-(SP)
	002170	005046 				CLR	-(SP)
	002172	012746 				MOV	(PC)+,-(SP)
	002174	   023 	   004 			.BYTE	19.,$$$T1
	002176	104375 				EMT	375
    211					;
    212	002200	010637 	000016'			MOV	SP,SPSAVE	;SAVE THE STACK POINTER
    213	002204	012737 	000001 	000012'		MOV	#1,QIOSTS+0	;ASSUME SUCCESS
    214	002212	005037 	000014'			CLR	QIOSTS+2	; FOR ALL
    215	002216	013705 	000004'			MOV	IOPKT,R5	;GET THE I/O PKT ADDRESS, FOR ALL TO USE
    216					;
    217					; ASSIGN THE USER'S DEVICE TO FELUN
    218					;
    219	002222	013700 	000000G			MOV	.CRTSK,R0	;GET THE ATL ADDRESS OF OUR TASK
    220	002226					GTSKHD	R0		;GET THE TASK HEADER ADDRESS INTO R0
	002226	016000 	000000G			 MOV	A.HA(R0),R0
    221	002232	013760 	000006'	000002G		MOV	PUDADR,H.LUT+2+<<FELUN-1>*4>(R0) ;SET THE ADDRESS TO ASSIGN THE DEVICE
    222	002240					XTSKHD			;RESTORE MAPPING, IF ANY
    223					;
    224					; COPY THE USER'S FILE-ID BLOCK POINTER (FROM HIS/HER LUT) IF ANY
    225					;
    226	002240	016500 	000000G			MOV	R.AT(R5),R0	;GET THE USER'S ATL NODE ADDRESS
    227	002244					GTSKHD	R0		;MAP TO USER'S TASK HEADER
	002244	016000 	000000G			 MOV	A.HA(R0),R0
    228	002250	116501 	000000G			MOVB	R.LU(R5),R1	;GET SPECIFIED LUN
    229	002254	006301 				ASL	R1		;CONVERT TO A BYTE
    230	002256	006301 				ASL	R1		; ADDRESS
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 7-1
DISPATCH

    231	002260	060100 				ADD	R1,R0		; WITHIN HIS LUT
    232	002262	016037 	000000G	000020'		MOV	H.LUT(R0),FIDPTR ;GET THE POINTER FROM SECOND WORD OF LUT ENTRY
    233	002270					XTSKHD			;RESTORE MAPPING, IF ANY
    234					;
    235					; MAKE SURE VOLUME IS MOUNTED
    236					;
    237	002270	013700 	000006'			MOV	PUDADR,R0	;GET ADDRESS OF PUD ENTRY
    238	002274	005760 	000000G			TST	U.VA(R0)	;MOUNTED?
    239	002300	001010 				BNE	30$		;YES-- GO ON
    240	002302	026527 	000000G	014010 		CMP	R.FC(R5),#IO.APV ;THIS ACP CONTROL (MOUNT/DISMOUNT)?
    241	002310	001404 				BEQ	30$		;YES-- GO ON, THAT'S OK
    242	002312					ERRX	IE.PRI,<VOLUME NOT MOUNTED>
	002312	012700 	177760 			 MOV	#IE.PRI,R0
	002316	000137 	002470'			 JMP	ERRORX
    243					;
    244					; CLEAN UP THE I/O PACKET
    245					;
    246	002322	116500 	000000G		30$:	MOVB	R.DP(R5),R0	;GET OUR DPB SIZE
    247	002326	162700 	000014 			SUB	#12.,R0		;GET -VE COUNT OF UNUSED WORDS
    248	002332	002006 				BGE	50$		;FULL-- JUST GO ON
    249	002334	005400 				NEG	R0		;GET +VE COUNT
    250	002336	010501 				MOV	R5,R1		;COPY PACKET ADDR
    251	002340	062701 	000040 			ADD	#R.PB+<6*2>,R1	;POINT TO END OF PACKET
    252	002344	005041 			35$:	CLR	-(R1)		;CLEAR AN UNUSED WORD
    253	002346	077002 				SOB	R0,35$		;LOOP FOR ALL UNUSED WORDS
    254					;
    255					; DISPATCH THE FUNCTION
    256					;
    257	002350	116500 	000001G		50$:	MOVB	R.FC+1(R5),R0	;GET THE MAJOR FUNCTION CODE
    258	002354	162700 	000011 			SUB	#LOWFNC,R0	;CONVERT TO DESIRED RANGE, 0 TO HGHFNC
    259	002360	002437 				BLT	ILLFNC		;OOPS-- BAD FUNCTION
    260	002362	020027 	000017 			CMP	R0,#HGHFNC-LOWFNC ;ABOVE MAX?
    261	002366	003034 				BGT	ILLFNC		;OOPS AGAIN-- TOO BIG FOR US TO HANDLE
    262					;
    263					; CALL THE FUNCTION PROCCESS ROUTINE
    264					;  WITH R1=R5= I/O PKT ADDRESS (R5 TO BE PRESERVED)
    265					;	R4= POINTER TO FEBUF FOR OUTPUT TO THE FE DEVICE
    266					;
    267	002370	012704 	000022'			MOV	#FEBUF,R4	;SET R4 TO POINT TO FE OUTPUT BUFFER
    268	002374	010501 				MOV	R5,R1		;COPY I/O PKT ADDRESS FOR  ALL ROUTINES TO SMASH
    269	002376	006300 				ASL	R0		;FUNCTION CODE TO WORD OFFSET
    270	002400					CALL	@DSPTAB(R0)	;DISPATCH TO THE FUNCTION
	002400	004770 	002122'			JSR	PC,@DSPTAB(R0)
    271					;
    272					; HERE WHEN FUNCTION COMPLETE
    273					;
    274	002404	016500 	000000G		EXIT:	MOV	R.AT(R5),R0	;GET USER'S ATL ADDRESS
    275	002410					GTSKHD	R0		;MAP R0 TO HIS TASK HEADER
	002410	016000 	000000G			 MOV	A.HA(R0),R0
    276	002414	116501 	000000G			MOVB	R.LU(R5),R1	;GET HIS LUN
    277	002420	006301 				ASL	R1		;CHANGE
    278	002422	006301 				ASL	R1		; TO WORD OFFSET
    279	002424	060100 				ADD	R1,R0		;  WITHIN HIS/HER LUT
    280	002426	013760 	000020'	000000G		MOV	FIDPTR,H.LUT(R0) ;STORE CHANGED FIDPTR, IF ANY
    281	002434					XTSKHD			;RESTORE MAPPING
    282					;
    283					; CALL I/O DONE TO COMPLETE THE QUEUE I/O
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 7-2
DISPATCH

    284					;
    285	002434	010501 				MOV	R5,R1		;GET I/O PACKET ADDRESS
    286	002436	005002 				CLR	R2		;NO PARAMETER
    287	002440	013703 	000012'			MOV	QIOSTS+0,R3	;GET FIRST WORD OF I/O STATUS
    288	002444	013704 	000014'			MOV	QIOSTS+2,R4	; AND SECOND WORD, TOO
    289	002450					CALL	..IODN		;TERMINATE THE REQUEST
	002450	004737 	000000G			JSR	PC,..IODN
    290	002454	000137 	002162'			JMP	T20ACP		;BACK FOR ANOTHER REQUEST
    291					;
    292					; ILLEGAL I/O FUNCTION
    293					;
    294	002460				ILLFNC:	ERRX	IE.IFC,<ILLEGAL FUNCTION CODE>
	002460	012700 	177776 			 MOV	#IE.IFC,R0
	002464	000137 	002470'			 JMP	ERRORX
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 8
ERROR PROCESSING

    296						.SBTTL	ERROR PROCESSING
    297					;
    298					; ERRORX -- SET I/O STATUS AND EXIT
    299					; ERRORZ -- USE OLD I/O STATUS, JUST EXIT
    300					;	GENERATED BY THE ERRX MACRO
    301					;
    302	002470	110037 	000012'		ERRORX:	MOVB	R0,QIOSTS+0	;SET STATUS
    303					;
    304	002474	013706 	000016'		ERRORZ:	MOV	SPSAVE,SP	;RESTORE THE STACK
    305	002500	000137 	002404'			JMP	EXIT		;RETURN TO THE EXIT CODE
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 9
DIRECTORY FUNCTIONS: FNA, ENA, RNA

    307						.SBTTL	DIRECTORY FUNCTIONS: FNA, ENA, RNA
    308					;
    309					;
    310	002504	062701 	000024 		DIRFNC:	ADD	#R.FIDP,R1	;POINT TO FID POINTER
    311	002510	012100 				MOV	(R1)+,R0	;NO FID
    312	002512	052100 				BIS	(R1)+,R0	;NO ACB
    313	002514	052100 				BIS	(R1)+,R0	;NO EXT
    314	002516	052100 				BIS	(R1)+,R0	; . .
    315	002520	052100 				BIS	(R1)+,R0	;NO ACCESS
    316	002522	001016 				BNE	BADPRM		;SORRY, BAD PARAMETERS
    317	002524	012100 				MOV	(R1)+,R0	;GET THE ADDRESS OF THE FNB IN USER
    318	002526	001414 				BEQ	BADPRM		;THAT'S REQUIRED
    319	002530	012701 	000032 			MOV	#S.DRFN,R1	;LENGTH TO TRANSFER FROM USER
    320	002534					CALL	GETBUF		;GET THAT BLOCK INTO THE FE-DEVICE REQUEST
	002534	004737 	004330'			JSR	PC,GETBUF
    321					;
    322	002540					CALL	FEWAIT		;SEND TO FE DEVICE, AND WAIT
	002540	004737 	004412'			JSR	PC,FEWAIT
    323	002544	016500 	000036 			MOV	R.FNBP(R5),R0	;GET THE ADDRESS OF THE FNB IN USER AGIN
    324	002550	012701 	000032 			MOV	#S.DRFN,R1	; AND LENGTH OF FNB
    325	002554					CALLR	PUTBUF		;RETURN IT TO THE USER, AND LEAVE
	002554	000137 	004340'			 JMP	PUTBUF
    326					;
    327					;
    328	002560				BADPRM:	ERRX	IE.BAD,<BAD PARAMETERS>
	002560	012700 	177777 			 MOV	#IE.BAD,R0
	002564	000137 	002470'			 JMP	ERRORX
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 10
ACCESS FUNCTIONS: ACR, ACW, ACE

    330						.SBTTL	ACCESS FUNCTIONS: ACR, ACW, ACE
    331					;
    332					;
    333	002570	062701 	000030 		ACCESS:	ADD	#R.EXTD,R1	;POINT TO NO PARAMETERS
    334	002574	012100 				MOV	(R1)+,R0	;NO EXT
    335	002576	052100 				BIS	(R1)+,R0	;NO EXTX
    336	002600	005721 				TST	(R1)+		;SEE IF ACCESS SPECIFIED
    337	002602	100366 				BPL	BADPRM		;SORRY, MUST ACCESS
    338	002604	052100 				BIS	(R1)+,R0	;NO FNB
    339	002606	001364 				BNE	BADPRM		;SORRY, CAN'T SPECIFY THOSE
    340	002610	005737 	000020'			TST	FIDPTR		;HAVE A FILE-ID ALREADY?
    341	002614	001404 				BEQ	40$		;NO-- GO ON
    342	002616					ERRX	IE.ALN,<FILE ALREADY ACCESSED ON LUN>
	002616	012700 	177736 			 MOV	#IE.ALN,R0
	002622	000137 	002470'			 JMP	ERRORX
    343					;
    344	002626				40$:	CALL	GETFID		;GET THE USER'S FILE-ID
	002626	004737 	004222'			JSR	PC,GETFID
    345	002632					PUSH	-4(R4)		;SAVE THE FILE-ID
	002632	016446 	177774 			MOV	-4(R4),-(SP)
    346	002636					PUSH	-2(R4)		; . .
	002636	016446 	177776 			MOV	-2(R4),-(SP)
    347					;
    348	002642	016524 	000034 			MOV	R.ACTL(R5),(R4)+ ;SAVE ACCESS PARAMETERS
    349	002646	005024 				CLR	(R4)+		;SECOND HALF ZERO
    350	002650					CALL	GTRACB		;GET READ ATTRIBUTES CONTROL BLOCK
	002650	004737 	004044'			JSR	PC,GTRACB
    351					;
    352	002654					CALL	FEWAIT		;SEND THE ACCESS TO THE FE
	002654	004737 	004412'			JSR	PC,FEWAIT
    353	002660					CALL	PTRACB		;STORE THE READ ATTRIBUES
	002660	004737 	004146'			JSR	PC,PTRACB
    354					;
    355	002664	012701 	000010 			MOV	#F.ISIZ,R1	;SET TO GET
    356	002670					CALL	..ALCB		; A FILE-ID BLOCK
	002670	004737 	000000G			JSR	PC,..ALCB
    357	002674	103414 				BCS	90$		;NO FREE CORE-- COMPLAIN
    358	002676	010037 	000020'			MOV	R0,FIDPTR	;SET THE NEW FILE-ID PTR
    359	002702	005010 				CLR	(R0)		;MAKE IT AN EMPTY WINDOW
    360	002704					POP	F.IFID+2(R0)	;SET THE FILE-ID
	002704	012660 	000004 			MOV	(SP)+,F.IFID+2(R0)
    361	002710					POP	F.IFID+0(R0)	; IN THE FILE-ID BLOCK
	002710	012660 	000002 			MOV	(SP)+,F.IFID+0(R0)
    362	002714	013700 	000006'			MOV	PUDADR,R0	;GET THE PUD ADDRESS
    363	002720	105260 	000001G			INCB	U.VA+1(R0)	;SAY ONE ACCESS
    364	002724					RETURN			;FROM ACCESS
	002724	000207 				RTS	PC
    365					;
    366	002726				90$:	ERRX	IE.UPN,<NO FREE STORAGE>
	002726	012700 	177777 			 MOV	#IE.UPN,R0
	002732	000137 	002470'			 JMP	ERRORX
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 11
DEACCESS FILE: DAC

    368						.SBTTL	DEACCESS FILE: DAC
    369					;
    370					;
    371	002736	062701 	000030 		DEACC:	ADD	#R.EXTD,R1	;POINT TO NO ARGS
    372	002742	012100 				MOV	(R1)+,R0	;NO EXT
    373	002744	052100 				BIS	(R1)+,R0	; . .
    374	002746	005721 				TST	(R1)+		;DON'T CARE ACCESS
    375	002750	052100 				BIS	(R1)+,R0	;NO FNB
    376	002752	001150 				BNE	BADPAR		;OOPS
    377	002754					CALL	GETFID		;CHECK THE FILE-ID
	002754	004737 	004222'			JSR	PC,GETFID
    378	002760	005024 				CLR	(R4)+		;NO PARAMETERS
    379	002762	005024 				CLR	(R4)+		; . .
    380	002764					CALL	GTWACB		;GET WRITE ATTRIBUTES CONTROL BLOCK, IF ANY
	002764	004737 	003746'			JSR	PC,GTWACB
    381					;
    382	002770	013700 	000020'			MOV	FIDPTR,R0	;GET THE FILE-ID BLOCK ADDRESS
    383	002774	001004 				BNE	40$		;GOT IT-- GO ON
    384	002776					ERRX	IE.NLN,<NO FILE ACCESSED ON LUN>
	002776	012700 	177733 			 MOV	#IE.NLN,R0
	003002	000137 	002470'			 JMP	ERRORX
    385					;
    386	003006	012701 	000010 		40$:	MOV	#F.ISIZ,R1	;SET SIZE TO DEALLOCATE
    387	003012					CALL	..DECB		;DEALLOCATE THE BLOCK
	003012	004737 	000000G			JSR	PC,..DECB
    388	003016	005037 	000020'			CLR	FIDPTR		;NO LONGER SUCH A POINTER
    389	003022	013700 	000006'			MOV	PUDADR,R0	;GET PUD ADDRESS
    390	003026	105360 	000001G			DECB	U.VA+1(R0)	;SAY ONE LESS ACCESS
    391	003032					CALLR	FEWAIT		;DO IT TO THE -20 SIDE, ALSO
	003032	000137 	004412'			 JMP	FEWAIT
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 12
EXTEND FILE: EXT

    393						.SBTTL	EXTEND FILE: EXT
    394					;
    395					;
    396	003036	062701 	000026 		EXTEND:	ADD	#R.RWAT,R1	;POINT TO NO ARGS
    397	003042	012100 				MOV	(R1)+,R0	;NO ACB
    398	003044	005721 				TST	(R1)+		;MUST HAVE EXTEND
    399	003046	100112 				BPL	BADPAR		;SORRY, NO EXTEND
    400	003050	005721 				TST	(R1)+		;SKIP OTHER EXTEND
    401	003052	052100 				BIS	(R1)+,R0	;NO ACCESS
    402	003054	052100 				BIS	(R1)+,R0	;NO FNB
    403	003056	001106 				BNE	BADPAR		;SO SORRY, YOU SAID TOO MUCH
    404	003060					CALL	GETFID		;CHECK OUT USER'S FID
	003060	004737 	004222'			JSR	PC,GETFID
    405	003064	016524 	000030 			MOV	R.EXTD+0(R5),(R4)+ ;STORE EXTEND WORD 0
    406	003070	016524 	000032 			MOV	R.EXTD+2(R5),(R4)+ ; AND THE SECOND ONE, TOO
    407	003074					CALLR	FEWAIT		;SEND TO THE -20, AND DONE
	003074	000137 	004412'			 JMP	FEWAIT
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 13
CREATE FILE: CRE

    409						.SBTTL	CREATE FILE: CRE
    410					;
    411					;
    412	003100	005765 	000024 		CREATE:	TST	R.FIDP(R5)	;MUST SPECIFY FILE-ID
    413	003104	001473 				BEQ	BADPAR		;OOPS
    414	003106	005024 				CLR	(R4)+		;SKIP
    415	003110	005024 				CLR	(R4)+		; THE FILE-ID
    416	003112	062701 	000030 			ADD	#R.EXTD,R1	;POINT TO EXTEND PARAMETERS
    417	003116	012124 				MOV	(R1)+,(R4)+	;SET EXTEND, IF ANY
    418	003120	012124 				MOV	(R1)+,(R4)+	; . .
    419	003122					CALL	GTWACB		;GET WRITE ATTRIBUTES, IF ANY
	003122	004737 	003746'			JSR	PC,GTWACB
    420	003126					CALL	FEWAIT		;SEND THAT OFF, GET FILE-ID BACK
	003126	004737 	004412'			JSR	PC,FEWAIT
    421	003132	016500 	000024 			MOV	R.FIDP(R5),R0	;GET FID POINTER
    422	003136	012701 	000004 			MOV	#4,R1		;FOUR BYTES
    423	003142					CALLR	PUTBUF		;PUT IT AWAY IN USER'S SPACE
	003142	000137 	004340'			 JMP	PUTBUF
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 14
DELETE FILE: DEL

    425						.SBTTL	DELETE FILE: DEL
    426					;
    427					;
    428	003146	062701 	000024 		DELETE:	ADD	#R.FIDP,R1	;POINT TO PARAM BLOCK
    429	003152	005721 				TST	(R1)+		;SKIP FID
    430	003154	012100 				MOV	(R1)+,R0	;NO ACB
    431	003156	022121 				CMP	(R1)+,(R1)+	;SKIP EXT
    432	003160	052100 				BIS	(R1)+,R0	;NO ACCESS
    433	003162	052100 				BIS	(R1)+,R0	;NO FNB
    434	003164	001043 				BNE	BADPAR		;BAD PARAMETERS
    435	003166					CALL	GETFID		;GET THE USER'S FILE-ID
	003166	004737 	004222'			JSR	PC,GETFID
    436	003172	016524 	000030 			MOV	R.EXTD+0(R5),(R4)+ ;STORE LOW EXTEND (IN CASE TRUNCATE)
    437	003176	016524 	000032 			MOV	R.EXTD+2(R5),(R4)+ ; AND LOW ORDER INCREMENT, ALSO
    438	003202					CALLR	FEWAIT		;DO IT AND RETURN
	003202	000137 	004412'			 JMP	FEWAIT
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 15
READ/WRITE ATTRIBUTES: RAT, WAT

    440						.SBTTL	READ/WRITE ATTRIBUTES: RAT, WAT
    441					;
    442					;
    443	003206	062701 	000026 		RWAT:	ADD	#R.RWAT,R1	;POINT TO ATTRIBUES
    444	003212	005721 				TST	(R1)+		;MUST BE SPECIFIED
    445	003214	001427 				BEQ	BADPAR		;SORRY
    446	003216	012100 				MOV	(R1)+,R0	;NO EXTEND
    447	003220	052100 				BIS	(R1)+,R0	; . .
    448	003222	052100 				BIS	(R1)+,R0	;NO ACCESS
    449	003224	052100 				BIS	(R1)+,R0	;NO FNB
    450	003226	001022 				BNE	BADPAR		;ILLEGAL PARAMETERS-- EDROR
    451	003230					CALL	GETFID		;GET THE USER'S FILE-ID
	003230	004737 	004222'			JSR	PC,GETFID
    452	003234	005024 				CLR	(R4)+		;SKIP
    453	003236	005024 				CLR	(R4)+		; THE PARAMETERS
    454	003240	126527 	000001G	000027 		CMPB	R.FC+1(R5),#IO.WAT/256. ;THIS WRITE ATTRIBUTES?
    455	003246	001406 				BEQ	50$		;YES-- WRITE THEM
    456					;
    457					; READ ATTRIBUTES
    458					;
    459	003250					CALL	GTRACB		;GET THE READ ATTRIBUTES
	003250	004737 	004044'			JSR	PC,GTRACB
    460	003254					CALL	FEWAIT		;SEND THEM TO THE -20
	003254	004737 	004412'			JSR	PC,FEWAIT
    461	003260					CALLR	PTRACB		;READ THEM BACK
	003260	000137 	004146'			 JMP	PTRACB
    462					;
    463					; WRITE ATTRIBUTES
    464					;
    465	003264				50$:	CALL	GTWACB		;GET USER'S ATTRIBUTES
	003264	004737 	003746'			JSR	PC,GTWACB
    466	003270					CALLR	FEWAIT		;SEND AND RETURN
	003270	000137 	004412'			 JMP	FEWAIT
    467					;
    468					;
    469	003274				BADPAR:	ERRX	IE.BAD,<BAD PARAMETERS>
	003274	012700 	177777 			 MOV	#IE.BAD,R0
	003300	000137 	002470'			 JMP	ERRORX
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 16
READ/WRITE VIRTUAL BLOCK: RVB, WVB

    471						.SBTTL	READ/WRITE VIRTUAL BLOCK: RVB, WVB
    472					;
    473					;
    474	003304				RWVBLK:	PUSH	R.RWCT(R5)	;SAVE THE BYTE COUNT
	003304	016546 	000026 			MOV	R.RWCT(R5),-(SP)
    475					;
    476					; HERE TO DO ANOTHER PART OF THE TRANSFER
    477					;
    478	003310				10$:	CALL	GETFI1		;GET USER'S FILE-ID
	003310	004737 	004300'			JSR	PC,GETFI1
    479	003314	016524 	000032 			MOV	R.RWVB+0(R5),(R4)+ ;SET HIGH VBN
    480	003320	016524 	000034 			MOV	R.RWVB+2(R5),(R4)+ ; AND LOW VBN
    481	003324	016524 	000026 			MOV	R.RWCT(R5),(R4)+ ;AND BYTE COUNT
    482	003330	003453 				BLE	90$		;DONE-- JUST RETURN
    483	003332	162765 	001000 	000026 		SUB	#1000,R.RWCT(R5) ;ONE MORE BLOCK TRANSFERED
    484	003340	003403 				BLE	30$		;LAST BLOCK-- BYTE CONT OK
    485	003342	012764 	001000 	177776 		MOV	#1000,-2(R4)	;SET BYTE COUNT TO MAX OF 1000
    486					;
    487	003350	126527 	000001G	000022 	30$:	CMPB	R.FC+1(R5),#IO.WVB/256. ;WRITE?
    488	003356	001412 				BEQ	50$		;YES-- COMPLETE IT
    489					;
    490					; READ
    491					;
    492	003360					PUSH	-2(R4)		;SAVE THAT BYTE COUNT
	003360	016446 	177776 			MOV	-2(R4),-(SP)
    493	003364					CALL	FEWAIT		;SEND READ REQUEST
	003364	004737 	004412'			JSR	PC,FEWAIT
    494	003370	016500 	000024 			MOV	R.RWAD(R5),R0	;SET USER ADDRESS
    495	003374					POP	R1		; AND BYTE COUNT
	003374	012601 				MOV	(SP)+,R1
    496	003376					CALL	PUTBUF		;READ DATA BACK TO USER
	003376	004737 	004340'			JSR	PC,PUTBUF
    497	003402	000410 				BR	70$		;FINISH THE REQUEST
    498					;
    499					; WRITE VB
    500					;
    501	003404	016500 	000024 		50$:	MOV	R.RWAD(R5),R0	;GET USER ADDRESS
    502	003410	016401 	177776 			MOV	-2(R4),R1	; AND THE BYTE COUNT
    503	003414					CALL	GETBUF		;GET USERS WRITE DATA
	003414	004737 	004330'			JSR	PC,GETBUF
    504	003420					CALL	FEWAIT		;WAIT FOR WRITE TO COMPLETE
	003420	004737 	004412'			JSR	PC,FEWAIT
    505					;
    506					; BUMP TO NEXT BLOCK OF READ/WRITE
    507					;
    508	003424	005765 	000026 		70$:	TST	R.RWCT(R5)	;MORE TO READ/WRITE?
    509	003430	003413 				BLE	90$		;NO-- GIVE UP NOW
    510	003432	062765 	001000 	000024 		ADD	#1000,R.RWAD(R5) ;YES-- BUMP TO NEXT BLOCK IN MEMORY
    511	003440	062765 	000001 	000034 		ADD	#1,R.RWVB+2(R5) ;AND NEXT VBN
    512	003446	105565 	000032 			ADCB	R.RWVB+0(R5)	; . .
    513	003452	012704 	000022'			MOV	#FEBUF,R4	;RE-POINT THE FE BUFFER POINTER
    514	003456	000714 				BR	10$		;BACK FOR ANOTHER
    515					;
    516	003460				90$:	POP	QIOSTS+2	;RESTORE THE BYTE COUNT AS ALL DONE
	003460	012637 	000014'			MOV	(SP)+,QIOSTS+2
    517	003464					RETURN			;OUR JOB IS DONE
	003464	000207 				RTS	PC
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 17
ACP CONTROL: APC

    519						.SBTTL	ACP CONTROL: APC
    520					;
    521					;
    522	003466	026527 	000000G	014010 	CONTRL:	CMP	R.FC(R5),#IO.APV ;PRIVILEDGED ACP CONTROL?
    523	003474	001277 				BNE	BADPAR		;NO-- MUST ONLY BE SUCH
    524	003476	062701 	000024 			ADD	#R.FIDP,R1	;POINT TO NO ARGS
    525	003502	012102 				MOV	(R1)+,R2	;NO FID
    526	003504	012100 				MOV	(R1)+,R0	;ACB
    527	003506	001672 				BEQ	BADPAR		; MUST BE PRESENT
    528	003510	052102 				BIS	(R1)+,R2	;NO EXT
    529	003512	052102 				BIS	(R1)+,R2	; . .
    530	003514	052102 				BIS	(R1)+,R2	;NO ACCESS
    531	003516	052102 				BIS	(R1)+,R2	;NO FNB
    532	003520	001265 				BNE	BADPAR		;TOO MUCH SPECIFIED
    533					;
    534	003522	016501 	000000G			MOV	R.TD(R5),R1	;GET CALLER'S STD
    535	003526	136127 	000000G	000000G		BITB	S.FW(R1),#SF.PT	;PRIVILEDGED?
    536	003534	001004 				BNE	20$		;OK-- GO ON
    537	003536					ERRX	IE.PRI,<PRIVILEGED TASKS ONLY>
	003536	012700 	177760 			 MOV	#IE.PRI,R0
	003542	000137 	002470'			 JMP	ERRORX
    538					;
    539	003546	012701 	000004 		20$:	MOV	#4,R1		;FOUR BYTES ONLY
    540	003552					CALL	GETBUF		;GET USER'S BUFFER
	003552	004737 	004330'			JSR	PC,GETBUF
    541	003556	014400 				MOV	-(R4),R0	;GET THE ADDRESS OF THE STRING
    542	003560	005001 				CLR	R1		;GET THE
    543	003562	154401 				BISB	-(R4),R1	; LENGTH
    544	003564	114403 				MOVB	-(R4),R3	;ALSO GET THE FUNCTION CODE
    545	003566	005724 				TST	(R4)+		;NOW BACK TO WHERE WE BELONG, AFTER FUNCTION/SIZE
    546	003570					CALL	GETBUF		;GET THE STRING
	003570	004737 	004330'			JSR	PC,GETBUF
    547	003574	020327 	000001 			CMP	R3,#1		;IS THIS MOUNT?
    548	003600	001425 				BEQ	50$		;YES-- GO DO IT
    549	003602	020327 	000002 			CMP	R3,#2		;HOW ABOUT DISMOUNT?
    550	003606	001232 				BNE	BADPAR		;NO-- ILLEGAL FUNCTION
    551					;
    552					; DISMOUNT
    553					;
    554	003610	013700 	000006'			MOV	PUDADR,R0	;GET ADDRESS OF PUD
    555	003614	105760 	000001G			TSTB	U.VA+1(R0)	;GET THE ACCESS COUNT
    556	003620	001404 				BEQ	40$		;NONE-- OK TO DISMOUNT
    557	003622					ERRX	IE.ABO,<FILES ACCESSED ON VOLUME>
	003622	012700 	177761 			 MOV	#IE.ABO,R0
	003626	000137 	002470'			 JMP	ERRORX
    558					;
    559	003632	005060 	000000G		40$:	CLR	U.VA(R0)	;SAY NOT MOUNTED
    560	003636	005060 	000000G			CLR	U.ACP(R0)	;ALSO STD POINTER FOR US
    561	003642	116060 	000001G	000000G		MOVB	U.CH+1(R0),U.CH+0(R0) ;RESTORE OFF-LINE CHARACTERISTICS
    562	003650					CALLR	FEWAIT		;REQUEST THE -10, AND DONE
	003650	000137 	004412'			 JMP	FEWAIT
    563					;
    564					; MOUNT
    565					;
    566	003654	013700 	000006'		50$:	MOV	PUDADR,R0	;GET THE ADDRESS OF THE PUD
    567	003660	005760 	000000G			TST	U.VA(R0)	;SEE IF HE DID THIS ALREADY
    568	003664	001404 				BEQ	60$		;NOT MOUNTED-- OK
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 17-1
ACP CONTROL: APC

    569	003666					ERRX	IE.ABO,<VOLUME ALREADY MOUNTED>
	003666	012700 	177761 			 MOV	#IE.ABO,R0
	003672	000137 	002470'			 JMP	ERRORX
    570					;
    571	003676				60$:	CALL	FEWAIT		;REQUEST MOUNT
	003676	004737 	004412'			JSR	PC,FEWAIT
    572	003702	013700 	000006'			MOV	PUDADR,R0	;GET THAT PUD BACK!!
    573	003706	005260 	000000G			INC	U.VA(R0)	;SAY MOUNTED
    574	003712	142760 	000000G	000000G		BICB	#CH.OFF,U.CH(R0) ; IN BOTH WAYS
    575	003720					RETURN			;DONE WITH MOUNT
	003720	000207 				RTS	PC
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 18
GTWACB/GTRACB/PTRACB -- ATTRIBUTE CONTROL

    577						.SBTTL	GTWACB/GTRACB/PTRACB -- ATTRIBUTE CONTROL
    578					;
    579					; ATTRIBUTE SIZE TABLE
    580					;
    581	003722				RWATAB:
    582	003722	000005 				.WORD	5		;(1) OWNER'S UIC (+ 2, 3)
    583	003724	000003 				.WORD	3		;(2) FILE PROTECTION CODE (+ 3)
    584	003726	000001 				.WORD	1		;(3) USER CONTROLLED FILE CHARACTERISTICS
    585	003730	000040 				.WORD	32.		;(4) USER'S FILE ATTRIBUTES
    586	003732	000012 				.WORD	10.		;(5) FILE NAME (+ 6, 7)
    587	003734	000004 				.WORD	4.		;(6) FILE TYPE (+ 7)
    588	003736	000002 				.WORD	2.		;(7) FILE VERSION
    589	003740	000004 				.WORD	4.		;(8) EXPIRATION DATE
    590		000010 			MAXWAT=	8.
    591	003742	000012 				.WORD	10.		;(9) STATISTICS BLOCK -- READ ONLY
    592	003744	001000 				.WORD	512.		;(10) ENTIRE FILE HEADER -- READ ONLY
    593		000012 			MAXRAT=	10.
    594					;
    595					; GTWACB -- GET WRITE ATTRIBUTE CONTROL BLOCK
    596					;
    597					; STORES THE WRITE ATTRIBUTE CONTROL LIST AND ATTRIBUTES
    598					;  IN THE FE BUFFER, ADDRESSED USING R4
    599					;
    600	003746				GTWACB:	PUSH	R.RWAT(R5)	;SAVE THE ADDRESS OF THE ATTRIBUTE CONTROL LIST
	003746	016546 	000026 			MOV	R.RWAT(R5),-(SP)
    601	003752	001514 				BEQ	GPRWAX		;NONE-- CLEAN UP AND RETURN
    602					;
    603	003754	011600 			10$:	MOV	(SP),R0		;GET ADDRESS OF FIRST ATTRIBUTE
    604	003756	012701 	000004 			MOV	#4,R1		;4 BYTES OF CONTROL INFO
    605	003762					CALL	GETBUF		;PUT THEM INTO THE FE BUFFER
	003762	004737 	004330'			JSR	PC,GETBUF
    606	003766	014400 				MOV	-(R4),R0	;GET THE ADDRESS OF THE ATTRIBUTES
    607	003770	016401 	177776 			MOV	-2(R4),R1	; AND THE FUNCTION/SIZE
    608					;
    609	003774	110102 				MOVB	R1,R2		;GET THE FUNCTION CODE
    610	003776	001502 				BEQ	GPRWAX		;END OF LIST-- GIVE UP NOW
    611	004000	003504 				BLE	ILRWAT		;-VE FUNCTION: ILLEGAL READ REQUEST
    612	004002	020227 	000010 			CMP	R2,#MAXWAT	;FUNCTION TOO BIG?
    613	004006	003101 				BGT	ILRWAT		;YES-- ALSO ILLEGAL
    614					;
    615	004010	105001 				CLRB	R1		;GET THE ATTRIBUTE SIZE
    616	004012	000301 				SWAB	R1		; FROM THE HIGH BYTE
    617	004014	001002 				BNE	20$		;SIZE OK-- GO ON
    618	004016	012701 	001000 			MOV	#1000,R1	;SIZE IS ZERO-- IMPLIES 1000 BYTES
    619	004022	006302 			20$:	ASL	R2		;GET WORD OFFSET FOR FUNCTION
    620	004024	020162 	003720'			CMP	R1,RWATAB-2(R2)	;SIZE LARGER THAN MAX FOR FUNCTION?
    621	004030	003070 				BGT	ILRWAT		;YES-- GET SICK
    622	004032					CALL	GETBUF		;NO-- READ IN THE ATTRIBUTE FROM USER TO FEBUF
	004032	004737 	004330'			JSR	PC,GETBUF
    623					;
    624	004036	062716 	000004 			ADD	#4,(SP)		;BUMP THE ADDRESS IN THE ACB
    625	004042	000744 				BR	10$		;TRY FOR ANOTHER ATTRIBUTE
    626					;
    627					; GTRACB -- GET READ ATTRIBUTE CONTROL BLOCK
    628					;
    629					; STORES THE ATTRIBUTE CONTROL LIST IN THE FE BUFFER, AND ALSO
    630					;  COPIES IT INTO RWATCB FOR PUTTING THE ATTRIBUTES BACK (PTRACB).
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 18-1
GTWACB/GTRACB/PTRACB -- ATTRIBUTE CONTROL

    631					;
    632	004044	012703 	002022'		GTRACB:	MOV	#RWATCB,R3	;POINT TO SAVE AREA FOR THE LIST
    633	004050					PUSH	R.RWAT(R5)	;SAVE THE CONTOL LIST ADDRESS
	004050	016546 	000026 			MOV	R.RWAT(R5),-(SP)
    634	004054	001453 				BEQ	GPRWAX		;NONE-- JUST GO ON
    635					;
    636	004056	011600 			10$:	MOV	(SP),R0		;GET THE CURRENT ADDRESS OF USER'S LIST
    637	004060	012701 	000004 			MOV	#4,R1		;4 BYTES OF CONTROL INFO
    638	004064					CALL	GETBUF		;GET THE USER'S CONTROL INFO
	004064	004737 	004330'			JSR	PC,GETBUF
    639	004070	014463 	000002 			MOV	-(R4),2(R3)	;SAVE THE ADDRESS
    640	004074	014413 				MOV	-(R4),(R3)	; AND THE FUNCTION WORD
    641					;
    642	004076	112302 				MOVB	(R3)+,R2	;GET THE FUNCTION CODE
    643	004100	001441 				BEQ	GPRWAX		;DONE-- CLEAN UP AND RETURN
    644	004102	002043 				BGE	ILRWAT		;+VE FUNCTION: ILLEGAL WRITE REQUEST
    645	004104	005402 				NEG	R2		;MAKE IT A +VE FUNCTION CODE
    646	004106	020227 	000012 			CMP	R2,#MAXRAT	;LEGAL FUNCTION?
    647	004112	003037 				BGT	ILRWAT		;NO-- DROP OUT
    648					;
    649	004114	005001 				CLR	R1		;GET THE
    650	004116	152301 				BISB	(R3)+,R1	; SIZE OF THE DATA
    651	004120	001002 				BNE	20$		;GOT IT-- GO ON
    652	004122	012701 	001000 			MOV	#1000,R1	;ZERO IMPLIES 1000 BYTES
    653	004126	006302 			20$:	ASL	R2		;MAKE FUNCTION A WORD OFFSET
    654	004130	020162 	003720'			CMP	R1,RWATAB-2(R2)	;TOO MUCH REQUESTED?
    655	004134	003026 				BGT	ILRWAT		;YES-- GIVE UP
    656					;
    657	004136	022324 				CMP	(R3)+,(R4)+	;SKIP OVER ADDRESS, FUNCTION
    658	004140	062716 	000004 			ADD	#4,(SP)		;BUMP TO NEXT ENTRY IN ATTRIBUTE LIST
    659	004144	000744 				BR	10$		;BACK FOR ANOTHER
    660					;
    661					; PTRACB -- PUT READ ATTRIBUTES RETURNED FROM FE DEVICE TO USER
    662					;
    663	004146	012703 	002022'		PTRACB:	MOV	#RWATCB,R3	;GET THE START OF THE ATTRIBUTE LIST WE SENT
    664					;
    665	004152	021324 			10$:	CMP	(R3),(R4)+	;FUNCTION CODES AGREE?
    666	004154	001016 				BNE	ILRWAT		;NO-- THIS SHOULDN'T HAPPEN
    667	004156	105723 				TSTB	(R3)+		;END OF LIST?
    668	004160	001413 				BEQ	PTRACX		;YES-- DO SO
    669					;
    670	004162	005001 				CLR	R1		;GET THE
    671	004164	152301 				BISB	(R3)+,R1	; LENGTH OF THE TRANSFER
    672	004166	001002 				BNE	20$		;OK-- GO ON
    673	004170	012701 	001000 			MOV	#1000,R1	;ZERO IMPLIES 1000
    674	004174	012300 			20$:	MOV	(R3)+,R0	;GET THE ADDRESS OF THE DATA BACK TO USER
    675	004176					CALL	PUTBUF		;SEND THE BLOCK BACK TO THE USER
	004176	004737 	004340'			JSR	PC,PUTBUF
    676	004202	000763 				BR	10$		;BACK FOR ANOTHER ONE
    677					;
    678					;
    679	004204	005726 			GPRWAX:	TST	(SP)+		;CLEAN UP STACK
    680	004206	005024 				CLR	(R4)+		;MARK END OF LIST
    681	004210				PTRACX:	RETURN			;BACK TO THE SHADOWS AGAIN
	004210	000207 				RTS	PC
    682					;
    683					;
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 18-2
GTWACB/GTRACB/PTRACB -- ATTRIBUTE CONTROL

    684	004212				ILRWAT:	ERRX	IE.WAT,<ILLEGAL READ/WRITE ATTRIBUTE CONTROL LIST>
	004212	012700 	177741 			 MOV	#IE.WAT,R0
	004216	000137 	002470'			 JMP	ERRORX
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 19
GETFID/GETFI1 -- GET FILE-ID

    686						.SBTTL	GETFID/GETFI1 -- GET FILE-ID
    687					;
    688					; GETFID -- GET FILE-ID
    689					;
    690					; GETS THE USER'S SPECIFIED FILE-ID (IF ANY) AND/OR THE FILE-ID
    691					;  OF THE CURRENT ACCESSED FILE (IF ANY) INTO THE FE BUFFER (R4).
    692					;
    693					;  ERRORS IF FILE-ID'S CONFLICT OR NO FILE-ID EXISTS.
    694					;
    695					; ENTER AT GETFI1 TO ONLY GET FROM FILE-ID BLOCK OF ACCESSED FILE.
    696					;
    697	004222	016500 	000024 		GETFID:	MOV	R.FIDP(R5),R0	;GET ADDRESS OF USER'S FILE-ID BLOCK
    698	004226	001424 				BEQ	GETFI1		;NONE-- TRY FOR AN ACCESSED FILE
    699	004230	012701 	000004 			MOV	#4,R1		;GOT IT-- LENGTH IS FOUR BYTES
    700	004234					CALL	GETBUF		;GET THE FILE-ID FROM THE USER
	004234	004737 	004330'			JSR	PC,GETBUF
    701					;
    702	004240	013700 	000020'			MOV	FIDPTR,R0	;POINT TO THE ACCESSED FILE-ID BLOCK, IF ANY
    703	004244	001410 				BEQ	30$		;NONE-- ALL OK
    704	004246	026064 	000002 	177774 		CMP	F.IFID+0(R0),-4(R4) ;GOT IT-- THIS SAME AS REQUESTED FILE-ID?
    705	004254	001005 				BNE	99$		;NO-- CONFLICTING FILE-ID'S
    706	004256	026064 	000004 	177776 		CMP	F.IFID+2(R0),-2(R4) ;HOW ABOUT SECOND HALF?
    707	004264	001001 				BNE	99$		;NO DICE-- COMPLAIN
    708					;
    709	004266				30$:	RETURN			;OK-- RETURN FROM GETFID
	004266	000207 				RTS	PC
    710					;
    711	004270				99$:	ERRX	IE.BAD,<CONFLICTING FILE-ID'S>
	004270	012700 	177777 			 MOV	#IE.BAD,R0
	004274	000137 	002470'			 JMP	ERRORX
    712					;
    713					; GETFI1 -- GET FILE-ID FROM ACCESSED FILE-ID BLOCK
    714					;
    715	004300	013700 	000020'		GETFI1:	MOV	FIDPTR,R0	;GET THE POINTER TO THE FILE-ID BLOCK
    716	004304	001405 				BEQ	99$		;SORRY, MUST HAVE ONE
    717	004306	016024 	000002 			MOV	F.IFID+0(R0),(R4)+ ;GET FIRST HALF OF FILE-ID
    718	004312	016024 	000004 			MOV	F.IFID+2(R0),(R4)+ ; AND SECOND HALF, TOO, TO FE BUFFER
    719	004316					RETURN			;FROM GETFI1
	004316	000207 				RTS	PC
    720					;
    721					;
    722	004320				99$:	ERRX	IE.NLN,<NO FILE ACCESSED ON LUN>
	004320	012700 	177733 			 MOV	#IE.NLN,R0
	004324	000137 	002470'			 JMP	ERRORX
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 20
GETBUF/PUTBUF -- GET/PUT DATA FROM/TO USER

    724						.SBTTL	GETBUF/PUTBUF -- GET/PUT DATA FROM/TO USER
    725					;
    726					; GETBUF/PUTBUF -- TRANSFER DATA TO/FROM USER TO FE BUFFER
    727					;
    728					; R0 --	USER ADDRESS
    729					; R1 -- BYTE COUNT
    730					; R4 -- POINTER TO FEBUF
    731					; R5 --	I/O PACKET ADDRESS
    732					;
    733					; RETURNS R4 UPDATED, R0, R1, R2 DESTROYED, R3, R5 PRESERVED
    734					;
    735	004330				GETBUF:	PUSH	R3		;SAVE R3
	004330	010346 				MOV	R3,-(SP)
    736	004332					PUSH	#..BLXI		;SAY TO CALL READ FROM USER ROUTINE
	004332	012746 	000000G			MOV	#..BLXI,-(SP)
    737	004336	000403 				BR	GPTBUF		;DO THE TRANSFER
    738					;
    739	004340				PUTBUF:	PUSH	R3		;SAVE R3
	004340	010346 				MOV	R3,-(SP)
    740	004342					PUSH	#..BLXO		;SAY TO CALL WRITE TO USER ROUTINE
	004342	012746 	000000G			MOV	#..BLXO,-(SP)
    741					;
    742	004346	010103 			GPTBUF:	MOV	R1,R3		;SET BYTE COUNT
    743	004350	003002 				BGT	20$		;BYTE COUNT OK-- GO ON
    744	004352	005726 				TST	(SP)+		;DON'T TRANSFER NOTHING
    745	004354	000410 				BR	80$		;RESTORE AND RETURN
    746					;
    747	004356	010002 			20$:	MOV	R0,R2		;SET USER ADDRESS
    748	004360	010501 				MOV	R5,R1		;SET REQUEST NODE ADDRESS
    749	004362					CALL	@(SP)+		;CALL ..BLXI/..BLXO
	004362	004736 				JSR	PC,@(SP)+
    750	004364	103406 				BCS	99$		;ERROR-- INVALID TRANSFER
    751					;
    752	004366	060304 				ADD	R3,R4		;UPDATE THE POINTER TO FEBUF
    753	004370	005204 				INC	R4		;ROUND THE TRANSFER
    754	004372	042704 	000001 			BIC	#1,R4		; UP TO A WORD BOUNDARY
    755					;
    756	004376				80$:	POP	R3		;RESTORE R3
	004376	012603 				MOV	(SP)+,R3
    757	004400					RETURN
	004400	000207 				RTS	PC
    758					;
    759					;
    760	004402				99$:	ERRX	IE.SPC,<INVALID USER BUFFER>
	004402	012700 	177772 			 MOV	#IE.SPC,R0
	004406	000137 	002470'			 JMP	ERRORX
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 21
FEWAIT -- SEND REQUEST TO FE DEVICE

    762						.SBTTL	FEWAIT -- SEND REQUEST TO FE DEVICE
    763					;
    764					; FEWAIT -- SEND REQUEST TO FE DEVICE AND WAIT FOR COMPLETION
    765					;
    766					; R4 -- POINTER TO END OF DATA IN FEBUF
    767					;
    768					; RETURNS RESPONSE DATA IN FEBUF, R4 POINTING TO IT
    769					;
    770	004412	012700 	000022'		FEWAIT:	MOV	#FEBUF,R0	;GET ADDRESS OF DATA BUFFER TO FE
    771	004416	012701 	002106'			MOV	#FEQIOW+Q.IOPL,R1 ;ADDRESS PARAMETER LIST FOR QIO REQUEST
    772	004422	010021 				MOV	R0,(R1)+	;SOURCE ADDRESS: FEBUF
    773	004424	160004 				SUB	R0,R4		;COMPUTE LENGTH OF DATA IN BUFFER
    774	004426	010421 				MOV	R4,(R1)+	;SOURCE LENGTH
    775	004430	010021 				MOV	R0,(R1)+	;DESTINATION ADDRESS: ALSO FEBUF
    776	004432	016521 	000000G			MOV	R.FC(R5),(R1)+	;PARAMETER #1: I/O FUNCTION CODE
    777	004436	016521 	000000G			MOV	R.UI(R5),(R1)+	;PARAMETER #2: USER'S UIC
    778	004442	012721 	002000 			MOV	#FEBFSZ,(R1)+	;DESTINATION LENGTH: WHOLE BUFFER
    779					;
    780	004446					DIR$	#FEQIOW		;SEND TO THE FE DEVICE, AND WAIT
	004446	012746 	002072'			MOV	#FEQIOW,-(SP)
	004452	104375 				EMT	375
    781	004454	103405 				BCS	98$		;DIRECTIVE ERROR-- RETURN DIRECTIVE ERROR CODE
    782					;
    783	004456	105737 	000012'			TSTB	QIOSTS+0	;SUCCESS FROM FE DEVICE?
    784	004462	003411 				BLE	99$		;ERROR-- SEND USER OUR REGARDS
    785	004464	010004 				MOV	R0,R4		;SET ADDRESS OF BUFFER FOR RETURN ARGS
    786	004466					RETURN			;OK-- RETURN FROM FEWAIT
	004466	000207 				RTS	PC
    787					;
    788					;
    789	004470	013737 	000000G	000014'	98$:	MOV	$DSW,QIOSTS+2	;SAVE DIRECTIVE STATUS
    790	004476					ERRX	IE.ABO,<DIRECTIVE ERROR>
	004476	012700 	177761 			 MOV	#IE.ABO,R0
	004502	000137 	002470'			 JMP	ERRORX
    791					;
    792					;
    793	004506				99$:	ERRX
	004506	000137 	002474'			 JMP	ERRORZ
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 22
END STATEMENT

    795						.SBTTL	END STATEMENT
    796					;
    797					;
    798		002162'				.END	T20ACP
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 22-1
SYMBOL TABLE

ACCESS  002570R  	DIKL10= 000010   	GTRACB  004044R  	IE.MOD= 177753   	IO.CTI= 015400
A.HA  = ****** GX	DIRFNC  002504R  	GTWACB  003746R  	IE.NBF= 177731   	IO.CTL= 016400
BADPAR  003274R  	DLYCNT= 174400   	HGHFNC= 000030   	IE.NBK= 177727   	IO.DAC= 010000
BADPRM  002560R  	DON10C= 040000   	HIBYTE= 177400   	IE.NFI= 177704   	IO.DCI= 014400
BIT0  = 000001   	DON10S= 100000   	H.LUT = ****** GX	IE.NLN= 177733   	IO.DCT= 002470
BIT1  = 000002   	DON11C= 000100   	IE.ABO= 177761   	IE.NNC= 177674   	IO.DEL= 012400
BIT10 = 002000   	DON11S= 000200   	IE.ACT= 177771   	IE.NOD= 177751   	IO.DET= 002000
BIT11 = 004000   	DPS4  = 040000   	IE.ADP= 177636   	IE.NSF= 177746   	IO.DIS= 016000
BIT12 = 010000   	DRESET= 000100   	IE.ALN= 177736   	IE.OFL= 177677   	IO.DTI= 016000
BIT13 = 020000   	DR.DTE= 000011   	IE.AST= 177660   	IE.ONP= 177773   	IO.ENA= 006000
BIT14 = 040000   	DSEND = 000004   	IE.BAD= 177777   	IE.OVR= 177756   	IO.EOF= 003000
BIT15 = 100000   	DSPTAB  002122R  	IE.BBE= 177710   	IE.PRI= 177760   	IO.ESA= 002500
BIT2  = 000004   	DS04  = 004000   	IE.BDI= 177714   	IE.RAC= 177724   	IO.EXT= 011400
BIT3  = 000010   	DS05  = 002000   	IE.BDR= 177716   	IE.RAT= 177723   	IO.FCP= 001401
BIT4  = 000020   	DS06  = 001000   	IE.BDV= 177711   	IE.RBG= 177730   	IO.FDX= 003020
BIT5  = 000040   	DTECMD= 000451   	IE.BHD= 177700   	IE.RCN= 177722   	IO.FNA= 004400
BIT6  = 000100   	DTEFLG= 000444   	IE.BLK= 177754   	IE.RER= 177740   	IO.HDX= 003010
BIT7  = 000200   	DTEF11= 000450   	IE.BNM= 177712   	IE.RNM= 177715   	IO.HIS= 015000
BIT8  = 000400   	DTEMTD= 000455   	IE.BTF= 177675   	IE.RSU= 177757   	IO.INL= 002400
BIT9  = 001000   	DTEMTI= 000456   	IE.BTP= 177725   	IE.SDP= 177635   	IO.ITI= 017000
BPARER= 000020   	DUPE  = 000020   	IE.BVR= 177701   	IE.SNC= 177735   	IO.KIL= 000012
CDD   = 000020   	DURE  = 000004   	IE.BYT= 177755   	IE.SPC= 177772   	IO.LED= 012000
CHNPNT= 000001   	DXWRD1= 002000   	IE.CKP= 177766   	IE.SQC= 177734   	IO.LOV= 001010
CH.OFF= ****** GX	D1011 = 000040   	IE.CKS= 177742   	IE.SRE= 177762   	IO.LTK= 000050
CNUPE = 000002   	EBSEL = 000100   	IE.CLO= 177732   	IE.STK= 177706   	IO.MCS= 013400
CONTRL  003466R  	EBUSPC= 000020   	IE.CON= 177752   	IE.ULN= 177773   	IO.MDA= 016000
CREATE  003100R  	EBUSPS= 000004   	IE.DAA= 177770   	IE.UPN= 177777   	IO.MDI= 014400
CS.EXP= 177670   	EDONES= 040000   	IE.DAO= 177763   	IE.VER= 177774   	IO.MDO= 015400
CYCLS = 000002   	EF.QIO= 000001   	IE.DFU= 177750   	IE.WAC= 177743   	IO.MLO= 006000
DATE  = 000004   	EPTR  = 000000   	IE.DNA= 177771   	IE.WAT= 177741   	IO.MOD= 003000
DCOMST= 000001   	ERRORX  002470R  	IE.DNR= 177775   	IE.WER= 177737   	IO.MSO= 005000
DEACC   002736R  	ERRORZ  002474R  	IE.DUN= 177767   	IE.WLK= 177764   	IO.RAL= 001010
DELETE  003146R  	ERR10C= 010000   	IE.DUP= 177707   	IE.2DV= 177720   	IO.RAT= 013000
DEP   = 010000   	ERR10S= 020000   	IE.EBX= 177776   	IFLOP = 100000   	IO.RBC= 003000
DEX   = 000400   	ERR11C= 000001   	IE.EOF= 177766   	ILLFNC  002460R  	IO.RCI= 015000
DEXDON= 000004   	ERR11S= 000002   	IE.EOT= 177702   	ILRWAT  004212R  	IO.RCV= 015000
DEXWD1= 174406   	EXIT    002404R  	IE.EOV= 177765   	INTROF= 000010   	IO.RDB= 001200
DEXWD2= 174404   	EXTEND  003036R  	IE.EXP= 177676   	INTRON= 000040   	IO.RDN= 000022
DEXWD3= 174402   	E$$MSG= 000001   	IE.FEX= 177717   	INTSON= 000001   	IO.REL= 013400
DFUNC = 000200   	E$$TRP= 000001   	IE.FHE= 177705   	INT10S= 000400   	IO.RHD= 001010
DF.DMG= 000004   	E.FQIO= 000001   	IE.FOP= 177713   	INT11C= 002000   	IO.RLB= 001000
DF.DMN= 000007   	FEBFSZ= 002000   	IE.HFU= 177744   	INT11S= 004000   	IO.RLV= 001100
DF.DOR= 000001   	FEBUF   000022R  	IE.HWR= 177772   	IOFUNC  000010R  	IO.RNA= 005400
DF.EHG= 000010   	FELUN = 000001   	IE.IDU= 177644   	IOPKT   000004R  	IO.RNC= 001004
DF.EHM= 000011   	FEQIOW  002072R  	IE.IEF= 177637   	IO.ACE= 007400   	IO.RNE= 001020
DF.EMG= 000005   	FEWAIT  004412R  	IE.IFC= 177776   	IO.ACR= 006400   	IO.RTC= 003400
DF.EMN= 000006   	FIDPTR  000020R  	IE.IFU= 177747   	IO.ACW= 007000   	IO.RTI= 016400
DF.KLR= 000012   	FORPRO= 000020   	IE.ILL= 177726   	IO.ADS= 014000   	IO.RTK= 000060
DF.KLW= 000013   	F$$LVL= 000001   	IE.ILU= 177640   	IO.APC= 014000   	IO.RVB= 010400
DF.KLX= 000014   	F.IFID= 000002   	IE.INS= 177776   	IO.APV= 014010   	IO.RWD= 002400
DF.OFF= 000002   	F.ISIZ= 000010   	IE.IPR= 177641   	IO.ATT= 001400   	IO.RWU= 002540
DF.ON = 000003   	F.IWIN= 000000   	IE.ISQ= 177703   	IO.CCI= 014000   	IO.R1C= 002400
DF.PDP= 000016   	GETBUF  004330R  	IE.ITI= 177643   	IO.CCT= 002460   	IO.SAO= 004000
DF.PEX= 000015   	GETFID  004222R  	IE.ITS= 177770   	IO.CLN= 003400   	IO.SCS= 013000
DIAG1 = 174430   	GETFI1  004300R  	IE.LCK= 177745   	IO.CON= 015400   	IO.SDI= 013000
DIAG2 = 174432   	GPRWAX  004204R  	IE.LNL= 177646   	IO.CRC= 001020   	IO.SDO= 012400
DIAG3 = 174436   	GPTBUF  004346R  	IE.MBK= 177721   	IO.CRE= 012000   	IO.SEC= 002520
T20ACP -- TOPS-20 FILE CONTROL 	MACRO M1108  05-DEC-77 20:58  PAGE 22-2
SYMBOL TABLE

IO.SEM= 002440   	PROPNT= 000021   	RWATAB  003722R  	TO10ER= 020000   	.LCRM1= 057000
IO.SHT= 002410   	PRTOFF= 004000   	RWATCB  002022R  	TO11  = 000100   	.LCRM2= 056000
IO.SLO= 005400   	PR0   = 000000   	RWATSZ= 000050   	TO11AD= 174422   	.LCRM3= 055000
IO.SMO= 002560   	PR1   = 000040   	RWVBLK  003304R  	TO11BC= 174416   	.LCRM4= 054000
IO.SNM= 002450   	PR2   = 000100   	R$$10F= 000001   	TO11BM= 020000   	.LCRM5= 053000
IO.SPB= 002420   	PR3   = 000140   	R$$11D= 000001   	TO11DB= 004000   	.LDAR = 077000
IO.SPF= 002440   	PR4   = 000200   	R$$20F= 000001   	TO11DN= 000200   	.LDBRL= 043000
IO.SSO= 004400   	PR5   = 000240   	R.ACTL= 000034   	TO11DT= 174426   	.LDBRR= 042000
IO.SST= 002430   	PR6   = 000300   	R.AT  = ****** GX	TO11ER= 000002   	.LDCK1= 046000
IO.STC= 002500   	PR7   = 000340   	R.DP  = ****** GX	T20ACP  002162R  	.LDCK2= 047000
IO.STP= 016400   	PS    = 177776   	R.EXTD= 000030   	UNASG1= 000032   	.LDDIS= 045000
IO.SYN= 003040   	PSWW1 = 000005   	R.FC  = ****** GX	UNASG2= 000033   	.LDRJD= 064000
IO.TRM= 002410   	PSWW10= 000014   	R.FIDP= 000024   	UNASG3= 000034   	.LDRJV= 063000
IO.UNL= 000042   	PSWW11= 000015   	R.FNBP= 000036   	UNASG4= 000035   	.LDRM1= 060000
IO.WAT= 013400   	PSWW12= 000016   	R.LU  = ****** GX	UNASG5= 000036   	.LDRM2= 061000
IO.WLB= 000400   	PSWW13= 000017   	R.PB  = 000024   	UNASG6= 000037   	.LDRM3= 062000
IO.WLS= 000410   	PSWW2 = 000006   	R.RWAD= 000024   	U.ACP = ****** GX	.LDSEL= 044000
IO.WLV= 000500   	PSWW3 = 000007   	R.RWAT= 000026   	U.CH  = ****** GX	.MEMRS= 076000
IO.WVB= 011000   	PSWW4 = 000010   	R.RWCT= 000026   	U.VA  = ****** GX	.PCAB1= 150000
IO.XMT= 014400   	PSWW5 = 000011   	R.RWVB= 000032   	WEP   = 000010   	.PCAB2= 151000
IO.XNA= 014410   	PSWW6 = 000012   	R.TD  = ****** GX	ZSTOP = 040000   	.PCAB3= 152000
IQ.Q  = 000002   	PSWW7 = 000013   	R.UI  = ****** GX	$DSW  = ****** GX	.PCAB4= 153000
IQ.X  = 000001   	PTRACB  004146R  	SCD   = 000040   	$$    = 000036   	.RCRM1= 147000
IS.BV = 000005   	PTRACX  004210R  	SF.PT = ****** GX	$$MSG = 000000   	.RCRM2= 146000
IS.CLR= 000000   	PUDADR  000006R  	SPSAVE  000016R  	$$$ARG= 000014   	.RCRM3= 145000
IS.CR = 006401   	PULSE = 000020   	STAT  = 174434   	$$$OST= 000014   	.RCRM4= 144000
IS.ESC= 015401   	PUTBUF  004340R  	STATUS= 000022   	$$$T1 = 000004   	.RCSPF= 141000
IS.PND= 000000   	QIOSTS  000012R  	SWR   = 177570   	.BRCLK= 005000   	.RDJ14= 134000
IS.RDD= 000002   	QSIZE = 000023   	SWSLLT= 100000   	.CECLK= 004000   	.RDJ71= 135000
IS.SET= 000002   	Q.IOAE= 000012   	S.DRFN= 000032   	.CLRMR= 006000   	.RDMAB= 133000
IS.SUC= 000001   	Q.IOEF= 000006   	S.FW  = ****** GX	.CLRUN= 010000   	.SECLK= 003000
KLPWRF= 000010   	Q.IOFN= 000002   	TENAD1= 174410   	.CONBT= 012000   	.SETMR= 007000
LOAD11= 000004   	Q.IOLU= 000004   	TENAD2= 174412   	.CRTSK= ****** GX	.SETRN= 011000
LOWFNC= 000011   	Q.IOPL= 000014   	TOBM  = 000004   	.CSHRG= 164000   	.SSCLK= 002000
MAXRAT= 000012   	Q.IOPR= 000007   	TOD   = 000003   	.DRLTC= 015000   	.STPCL= 000000
MAXWAT= 000010   	Q.IOSB= 000010   	TOIP  = 000002   	.DSACF= 066000   	.STRCL= 001000
MPE11 = 001000   	RAMIS0= 010000   	TOIT  = 000001   	.DSIOJ= 065000   	.WRMBX= 071000
M$$HDR= 000001   	RCVBUF  000000R  	TO10  = 000200   	.EIOJA= 067000   	..ALCB= ****** GX
NULSTP= 000040   	RFMAD0= 100000   	TO10AD= 174420   	.GFNR = 102000   	..BLXI= ****** GX
NUPE  = 000002   	RFMAD1= 040000   	TO10BC= 174414   	.INICL= 070000   	..BLXO= ****** GX
PERCLR= 001000   	RFMAD2= 020000   	TO10BM= 000001   	.IRLTC= 014000   	..DECB= ****** GX
PHYS  = 100000   	RFMAD3= 010000   	TO10DB= 000400   	.LCRDL= 052000   	..IODN= ****** GX
PIDENT= 000000   	RM    = 000010   	TO10DN= 100000   	.LCRDR= 051000   	...GBL= 000000
PRI7  = 000340   	RWAT    003206R  	TO10DT= 174424

. ABS.	000000	   000
      	004512	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  7162 WORDS  ( 28 PAGES)
DYNAMIC MEMORY:  8384 WORDS  ( 32 PAGES)
ELAPSED TIME:  00:01:28
[53,10]T20ACP,[53,20]T20ACP/-SP=[53,30]RSXDC,T20ACP