PIPDIR M0222, LIST DIRECTORY CO	MACRO M1110  22-AUG-78 01:32

TABLE OF CONTENTS



     7-    1	**** PIPDIR VERSION M0222 ****

PIPDIR M0222, LIST DIRECTORY CO	MACRO M1110  22-AUG-78 01:32  PAGE 7





      1						.TITLE	PIPDIR M0222, LIST DIRECTORY COMMAND-PIP

						.SBTTL	**** PIPDIR VERSION M0222 ****

						.IDENT	/M0222/

      2					; ALTERED:

      3					; ANDREW C. GOLDSTEIN  7 NOV 76  15:26

      4					; BENN L. SCHREIBER	30-MAR-77

      5					;

      6					; B. SCHREIBER	27-AUG-77

      7					;

      8					;	BLS025 -- ADD EXIT WITH STATUS

      9					;

     10					; B. SCHREIBER	3-JUN-78

     11					;

     12					;	BLS052 -- INTEGRATE ODS-2 CHANGES DONE BY A. GOLDSTEIN AND

     13					;		E. MARISON

     14					;

     15					; COPYRIGHT (C) 1978, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.

     16					; COPYRIGHT (C) 1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.

     17					; COPYRIGHT 1975, DIGITAL EQUIPMENT CORP., MAYNARD MASS.

     18					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD MASS.

     19

     20					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE

     21					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION

     22					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT

     23					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.

     24

     25					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT

     26					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL

     27					; EQUIPMENT CORPORATION.

     28

     29					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY

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

     31					;

     32					; PETER H. LIPMAN	2-MAY-74

     33					;

     34						.IF	GT,R$$11M

     35						.MACRO	PUT$	A1,A2,A3,A4

     36						.MCALL	PUT$S

     37						PUT$S	A1,A2,A3,A4

     38						.ENDM	PUT$

     39						.ENDC

     40	000000					FLDSOF

     41						.MCALL	CSI$

     42	000000					CSI$

     43

     44						.MCALL	CALL,RETURN,QIO$S,WTSE$S

     45						.MCALL	FDBF$R,FDAT$R,OPEN$W,OFNB$W,PUT$,GTIM$S

     46

     47

     48		000014 				FF=14			;FORM FEED CHARACTER

     49					;

     50					; DIRECTORY LISTING  - CONVERSION STRINGS

     51	000000					MSGZ	LI01,< FILE ID %P,%P,%O>

     52	000000					MSGZ	LI02,<%N%X>

     53	000000					MSG	LI03,<READ ATTRIBUTES ERR - >

     54	000000					MSG	TOTH,<STORAGE USED/ALLOCATED FOR >

     55	000000					MSGZ	DIRH,<DIRECTORY %2A%O:>

PIPDIR M0222, LIST DIRECTORY CO	MACRO M1110  22-AUG-78 01:32  PAGE 7-1

**** PIPDIR VERSION M0222 ****



     56	000000					MSGZ	TIME,<%N%Y %2Z>

     57	000000					MSGZ	TOTL,<%N%NTOTAL OF %T./%T. BLOCKS IN %D. FILES>

     58	000000					MSGZ	GTOT,<%N%NGRAND TOTAL OF %T./%T. BLOCKS IN %D. FILES IN %D. DIRECTORIES>

     59	000000					IMPURE

     60

     61					;

     62					; ***** DO NOT SEPARATE THE FOLLOWING

     63					;

     64	000000	000006'	000012'		TOTP:	.WORD	FILUSD,FILALC	;POINTERS TO DOUBLE WORDS

     65	000004				FILCNT:	.BLKW	1		;COUNT OF FILES IN THIS DIRECTORY

     66	000006				FILUSD:	.BLKW	2		;COUNT OF BLOCKS USED

     67	000012				FILALC:	.BLKW	2		;COUNT OF BLOCKS ALLOCATED

     68

     69	000016	000026'	000032'		GTOP:	.WORD	GFLUSD,GFLALC	;POINTERS TO DOUBLE WORDS

     70	000022				GFLCNT:	.BLKW	1		;GRAND TOTAL FILE COUNT

     71	000024				DIRCNT:	.BLKW	1		;TOTAL DIRECTORY COUNT

     72	000026				GFLUSD:	.BLKW	2		;GRAND TOTAL BLOCKS USED

     73	000032				GFLALC:	.BLKW	2		;GRAND TOTAL BLOCKS ALLOCATED

     74					;

     75					; ***** DO NOT SEPARATE THE PRECEEDING

     76					;

     77	000036				USDMSG:	.BLKW	1		;0 IF NO "USED" MESSAGE IS TO BE OUTPUT

     78									;END OF MESSAGE POINTER IF MSG NEEDS TO BE TYPED

     79	000040				DIHDMG:	.BLKW	1		;0 IF NO DIRECTORY HEADER MESSAGE TO TYPE

     80									;END OF MESSAGE PTR IF NEED TO OUTPUT HDR

     81	000042				DIROUT:	.BLKW	1		;0 IF NO OUTPUT DONE YET

     82									;NON ZERO IF ANY OUTPUT HAS BEEN DONE

PIPDIR M0222, LIST DIRECTORY CO	MACRO M1110  22-AUG-78 01:32  PAGE 8

**** PIPDIR VERSION M0222 ****



     84	000044					PURE.I

     85

     86					; LIST THE DIRECTORY TO THE SPECIFIED OUTPUT FILE

     87

     88	000000	012767 	000000G	000000C	DIRLST::MOV	#OFNPT,FDBIN+F.DSPT ;ASSUME NO LISTING FILE SPEC

     89	000006	012767 	000000G	000000C		MOV	#NAMBLK,FDBIN+F.DFNB

     90	000014	012767 	000000G	000000C		MOV	#IFNPT,FDBOUT+F.DSPT	;NULL DSPT IF NO INPUT SPEC

     91	000022	012767 	000000G	000000C		MOV	#SYDFLT,FDBOUT+F.DFNB

     92	000030	016767 	000000G	000000C		MOV	CODEV,SYDFLT+N.DVNM ;DEFAULT OUTPUT TO CO:

     93	000036	016767 	000000G	000000C		MOV	COUNIT,SYDFLT+N.UNIT

     94	000044	012767 	000000G	000000G		MOV	#FD.PLC,INRACC

     95	000052	012767 	000000G	000000G		MOV	#FD.PLC,OURACC

     96	000060	005767 	000000G			TST	INSPEC		;WAS THERE AN INPUT SPEC?

     97	000064	001423 				BEQ	10$		;BRANCH IF NO

     98	000066	016767 	000000G	000000G		MOV	.OULCL,.LCLSW	;LOCAL SWITCHES ON OUTSPEC ARE STICKY

     99	000074	012767 	000000G	000000C		MOV	#IFNPT,FDBIN+F.DSPT ;USE INPUT SPECIFIER FOR DIRECTORY

    100	000102	012767 	000000G	000000C		MOV	#OFNPT,FDBOUT+F.DSPT ;OUTPUT SPEC FOR LISTING

    101	000110	032767 	000003 	000000G		BIT	#CS.DIF!CS.NMF,OUSPEC ;IF OUTPUT FILE NAME SPECIFIED

    102	000116	001406 				BEQ	10$

    103	000120	012767 	000000G	000000C		MOV	#SYDEV,SYDFLT+N.DVNM ;DEFAULT TO SY0:

    104	000126	012767 	000000G	000000C		MOV	#SYUNIT,SYDFLT+N.UNIT

    105					;

    106					; NORMAL DIRECTORY LISTING

    107	000134	005001 			10$:	CLR	R1		;R1 MEANS NO DEFAULT DIRECTORY ID

    108	000136	005002 				CLR	R2		;NO DEFAULT FILE NAME AND TYPE

    109	000140					CALL	STNMBK		;INIT THE NAMBLK

    110	000144	005067 	000036'			CLR	USDMSG		;NO TOTAL LINE TO BE TYPED

    111	000150	005067 	000042'			CLR	DIROUT		;NO OUTPUT DONE YET

    112	000154	012701 	000000C			MOV	#<<<LINBFS+3>&177774>+1000>,R1

    113	000160					CALL	.DYALC		;ALLOCATE A LINE AND HEADER BUFFER

    114	000164	062700 	000000C			ADD	#<<LINBFS+3>&177774>,R0 ;CALCULATE HEADER BUFFER ADDRESS

    115	000170	010067 	000000G			MOV	R0,.HDRAD	;AND SAVE IT

    116						.IF DF	O$$DS2								;BLS052

    117					;										;BLS052

    118					; SET UP READ ATTRIBUTES CONTROL LIST						;BLS052

    119					;										;BLS052

    120	000174	062700 	000020 			ADD	#AB.UAT,R0	;BUFFER ADDRESS OF RECORD ATTRIBUTES		;BLS052

    121	000200	010067 	000000G			MOV	R0,.UAT								;BLS052

    122	000204	062700 	000040 			ADD	#AB.PC-AB.UAT,R0 ;BUFFER ADDRESS OF UIC				;BLS052

    123	000210	010067 	000000G			MOV	R0,.UIC								;BLS052

    124	000214	062700 	000006 			ADD	#AB.REV-AB.PC,R0 ;BUFFER ADDRESS OF DATES			;BLS052

    125	000220	010067 	000000G			MOV	R0,.REV								;BLS052

    126					;										;BLS052

    127					; END OF ATTRIBUTE SETUP							;BLS052

    128					;										;BLS052

    129						.ENDC									;BLS052

    130	000224	012701 	000022'			MOV	#GFLCNT,R1	;POINT TO GRAND TOTALS

    131	000230	012702 	000006 			MOV	#6,R2

    132	000234	005021 			20$:	CLR	(R1)+		;INIT TOTALS TO 0

    133	000236					SOB	R2,20$

    134					;

    135					; HERE FOR EACH NEW DIRECTORY SPECIFIER

    136					;

    137	000242	012700 	000000G		DIRLS1:	MOV	#FDBIN,R0

    138	000246					CALL	PARSE

    139	000252	103007 				BCC	30$

    140	000254					CALL	PRSERR

PIPDIR M0222, LIST DIRECTORY CO	MACRO M1110  22-AUG-78 01:32  PAGE 8-1

**** PIPDIR VERSION M0222 ****



    141	000260	012767 	000000G	000000G		MOV	#EX$ERR,.EXSTS	;MAKE AN ERROR OUT OF IT

    142	000266	000167 	000000G			JMP	CLOSX

    143	000272	016267 	000014 	000000G	30$:	MOV	N.SPEC(R2),INSPEC ;MOV OUSPEC TO INSPEC IF NO LIST FILE

    144	000300	132760 	000000G	000000G		BITB	#FD.DIR,F.RCTL(R0)

    145	000306	001003 				BNE	40$		;BRANCH IF DIRECTORY DEVICE

    146	000310					ERROUX	DI08,1

	000310	104413 				TRAP	X

	000312	000000G				.WORD	DI08SZ

	000314	000000G				.WORD	DI08MG

    147	000316	016067 	000000G	000000G	40$:	MOV	F.FVER(R0),VERSAV

    148	000324	005762 	000016 			TST	N.FLID(R2)	;IF FILE ID WAS SPECIFIED, USE IT

    149	000330	001412 				BEQ	50$

    150	000332	016261 	000016 	000000G		MOV	N.FLID(R2),N.DID(R1) ;PUT FILE ID IN DIRECTORY ID SLOT

    151	000340	016261 	000020 	000002G		MOV	N.FLID+2(R2),N.DID+2(R1)

    152	000346	016261 	000022 	000004G		MOV	N.FLID+4(R2),N.DID+4(R1)

    153	000354	000407 				BR	DIRLS2		;NEW DIRECTORY TO LIST

    154	000356	032767 	000006 	000000G	50$:	BIT	#CS.DIF!CS.DVF,INSPEC ;NEW DIRECTORY?

    155	000364	001003 				BNE	DIRLS2		;BRANCH IF YES

    156	000366	005767 	000000C			TST	FDBOUT+F.BDB	;IF NOT FIRST DIRECTORY (OUT FILE OPEN)

    157	000372	001022 				BNE	DIRLS3		;THEN NOT A NEW DIRECTORY

    158	000374	016700 	000036'		DIRLS2:	MOV	USDMSG,R0	;PRINT "M BLOCKS USED IN N FILES"

    159	000400	001406 				BEQ	60$		;BRANCH IF NOTHING TO PRINT

    160	000402	005067 	000036'			CLR	USDMSG		;SO IT WON'T BE DONE AGAIN

    161	000406					CALL	EDTPT1		;OUTPUT THE"TOTAL" MESSAGE

    162	000412					CALL	GETTOT		;ACCUMULATE GRAND TOTAL DATA

    163	000416	012702 	000005 		60$:	MOV	#5,R2		;NO. OF WORDS OF FILE AND SIZE COUNTING

    164	000422	012701 	000004'			MOV	#FILCNT,R1	;REINIT THE COUNTS FOR THE NEW DIRECTORY

    165	000426	005021 			70$:	CLR	(R1)+

    166	000430					SOB	R2,70$

    167	000434	005267 	000040'			INC	DIHDMG		;FORCE THIS NON ZERO INDICATING NEW DIR

    168	000440	032767 	000001 	000000G	DIRLS3:	BIT	#CS.NMF,INSPEC	;IF NOT LISTING ENTIRE DIRECTORY

    169	000446	001012 				BNE	80$		;BRANCH IF NOT LISTING ENTIRE DIRECTORY

    170	000450	052767 	000001 	000000G		BIS	#CS.NMF,INSPEC	; SAY THAT FILE NAME WAS SPECIFIED		;BLS052

    171						.IF DF	O$$DS2								;BLS052

    172	000456	032767 	000000C	000000C		BIT	#NB.NAM!NB.TYP!NB.VER,FDBIN+F.FNB+N.STAT ; BRANCH		;BLS052

    173	000464	001003 				BNE	80$		; IF FILENAME DUE TO LOGICAL NAME		;BLS052

    174						.ENDC									;BLS052

    175															;BLS052

    176					;										;BLS052

    177					; LISTING ENTIRE DIRECTORY							;BLS052

    178	000466	052767 	000000G	000000C		BIS	#NB.SFN,FDBIN+F.FNB+N.STAT ;IT WAS *.*;*			;**-3

    179	000474	052767 	000000G	000000G	80$:	BIS	#FRSTIM,CPYCTL

    180	000502	012700 	000000G			MOV	#FDBOUT,R0

    181	000506	005760 	000000G			TST	F.BDB(R0)

    182	000512	001107 				BNE	100$		;BRANCH IF LISTING FILE ALREADY OPEN

    183	000514					FDAT$R	R0,#R.VAR,#0	;VARIABLE LENGTH, NO CARRIAGE CONTROL

    184					; OVERIDE DEFAULT BUFFER SIZE FOR LONG PARTIAL LOCATE MODE PUTS

    185	000526					FDBF$R	R0,,#LINBFS,#3 ;FORCE 3 BUFS

    186					;

    187						.IF DF	O$$DS2								;BLS052

    188					;  										;BLS052

    189					;	SAVE DEFAULT DIRECTORY STRING IN DYNAMIC BUFFER				;BLS052

    190					;										;BLS052

    191	000542	016700 	000000G			MOV	.DYBUF,R0	; GET SAVE BUFFER ADDR				;BLS052

    192	000546	013701 	000000G			MOV	@#.FSRPT,R1	; POINT TO DEFAULT DIRECTORY STRING DESC.	;BLS052

    193	000552	062701 	000000G			ADD	#A.DFDR,R1							;BLS052

    194	000556	012102 				MOV	(R1)+,R2	; GET SIZE					;BLS052

PIPDIR M0222, LIST DIRECTORY CO	MACRO M1110  22-AUG-78 01:32  PAGE 8-2

**** PIPDIR VERSION M0222 ****



    195	000560	010220 				MOV	R2,(R0)+	; AND SAVE IT					;BLS052

    196	000562	003405 				BLE	84$		; IF 0 OR MINUS ALL DONE			;BLS052

    197	000564	011101 				MOV	(R1),R1		; GET ADDR OF  STRING				;BLS052

    198	000566	010120 				MOV	R1,(R0)+	; SAVE IT					;BLS052

    199	000570	112120 			83$:	MOVB	(R1)+,(R0)+	; SAVE STRING					;BLS052

    200	000572					SOB	R2,83$								;BLS052

    201	000576	012700 	000000G		84$:	MOV	#FDBOUT,R0	; RESTORE R0 TO FDB				;BLS052

    202					;										;BLS052

    203					;  END OF SAVE EDIT								;BLS052

    204					;										;BLS052

    205						.ENDC									;BLS052

    206						.IF	EQ,R$$11M

    207						OPEN$W	R0,,,OURACC,#LINBUF,#LINBFS

    208						.IFF

    209	000602					CALL	PARSE

    210	000606	103007 				BCC	90$

    211	000610					CALL	PRSERR		;ERROR FROM PARSE

    212	000614	012767 	000000G	000000G		MOV	#EX$ERR,.EXSTS	;IF CAN'T OPEN OUTPUT FILE--ERROR

    213	000622	000167 	000000G			JMP	CLOSX

    214	000626				90$:	OFNB$W	R0,,,OURACC,#LINBUF,#LINBFS

    215						.ENDC

    216					;

    217	000662	103002 				BCC	91$		; BRANCH IF ALL OK (FIX BRANCH OUT OF RANGE)	;BLS052

    218	000664	000167 	000402 			JMP	210$		; JUMP IF FAILED TO OPEN OUTPUT FILE		;BLS052

    219	000670				91$:				; REF TAG					;BLS052

    220	000670					CALL	RECATT		;ATTACH DEVICE IF TTY				;BLS052

    221	000674	103567 				BCS	190$		;BRANCH IF FAILED				;BLS052

    222						.IF DF	O$$DS2								;BLS052

    223					;										;BLS052

    224					;	RESTORE THE DEFAULT DIR STRING						;BLS052

    225					;										;BLS052

    226	000676	016700 	000000G			MOV	.DYBUF,R0	; GET SAVE BUFFER ADDR				;BLS052

    227	000702	013701 	000000G			MOV	@#.FSRPT,R1	; GET ADDR OF DEFAULT DIR STRING DESC		;BLS052

    228	000706	062701 	000000G			ADD	#A.DFDR,R1							;BLS052

    229	000712	012002 				MOV	(R0)+,R2	; GET SIZE OF STRING				;BLS052

    230	000714	010221 				MOV	R2,(R1)+	; RESTORE IT					;BLS052

    231	000716	003405 				BLE	94$		; IF 0 OR MINUS ALL DONE			;BLS052

    232	000720	011011 				MOV	(R0),(R1)	; RESTORE ADDRESS				;BLS052

    233	000722	012001 				MOV	(R0)+,R1	; GET ADDRESS OF WHERE TO PUT STRING		;BLS052

    234	000724	112021 			93$:	MOVB	(R0)+,(R1)+	; RESTORE STRING				;BLS052

    235	000726					SOB	R2,93$								;BLS052

    236	000732				94$:										;BLS052

    237					;										;BLS052

    238					;  END OF RESTORE EDIT								;BLS052

    239					;										;BLS052

    240						.ENDC									;BLS052

    241	000732	016700 	000000G		100$:	MOV	.DYBUF,R0							;**-3

    242	000736	005767 	000042'			TST	DIROUT		;HAS THERE BEEN ANY OUTPUT YET?

    243	000742	001007 				BNE	110$		;BRANCH IF YES

    244	000744	132767 	000000G	000000C		BITB	#FD.TTY,FDBOUT+F.RCTL

    245	000752	001003 				BNE	110$

    246	000754	112720 	000014 			MOVB	#FF,(R0)+	;FORM FEED IF NOT TTY

    247	000760	000407 				BR	120$

    248	000762	112720 	000015 		110$:	MOVB	#15,(R0)+

    249	000766	012701 	000012 			MOV	#12,R1		;A FEW BLANK LINES FOR TTY

    250	000772	110120 				MOVB	R1,(R0)+

    251	000774	110120 				MOVB	R1,(R0)+

PIPDIR M0222, LIST DIRECTORY CO	MACRO M1110  22-AUG-78 01:32  PAGE 8-3

**** PIPDIR VERSION M0222 ****



    252	000776	110120 				MOVB	R1,(R0)+

    253	001000	010046 			120$:	MOV	R0,-(SP)

    254	001002					CALL	STFIND		;START THE FIRST FIND OPERATION

    255	001006	012600 				MOV	(SP)+,R0

    256	001010	016746 	000000C			MOV	FDBIN+F.UNIT,-(SP)

    257	001014	012746 	000000C			MOV	#FDBIN+F.DVNM,-(SP)

    258	001020	010602 				MOV	SP,R2

    259	001022	012701 	000110'			MOV	#DIRHMG,R1

    260	001026	032767 	000000G	000000G		BIT	#TOTLBT,CMDWRD	;IF JUST LISTING TOTALS

    261	001034	001402 				BEQ	130$

    262	001036	012701 	000055'			MOV	#TOTHMG,R1	;USE THE OTHER MESSAGE

    263	001042				130$:	CALL	$EDMSG		;"DIRECTORY DK0:"

    264	001046	022626 				CMP	(SP)+,(SP)+

    265	001050	016702 	000000C			MOV	FDBIN+F.DSPT,R2

    266	001054	005762 	000016 			TST	N.FLID(R2)	;WAS FILE ID OF DIRECTORY FILE GIVEN

    267	001060	001023 				BNE	150$		;BRANCH IF YES

    268					; DIRECTORY NAME

    269	001062	132767 	000000G	000000C		BITB	#FD.SDI,FDBIN+F.RCTL ;IF SINGLE DIRECTORY DEVICE

    270	001070	001025 				BNE	160$		;DON'T PRINT DIRECTORY NAME

    271	001072	016701 	000000C			MOV	FDBIN+F.DSPT,R1

    272	001076	016102 	000006 			MOV	N.DIRD+2(R1),R2	;R2=ADDRESS OF DIRECTORY STRING

    273	001102	016101 	000004 			MOV	N.DIRD(R1),R1	;R1=SIZE OF DIRECTORY STRING

    274	001106	001004 				BNE	140$		;BRANCH IF STRING IS NOT NULL

    275	001110					CALL	.RDFDR		;OTHERWISE USE DEFAULT DIRECTORY

    276	001114	005701 				TST	R1		;IF NULL DEFAULT DIRECTORY

    277	001116	001412 				BEQ	160$		;SKIP PRINTING THE DIRECTORY NAME

    278	001120	112220 			140$:	MOVB	(R2)+,(R0)+	;MOVE THE DIRECTORY STRING

    279	001122					SOB	R1,140$

    280	001126	000406 				BR	160$

    281					; LISTING DIRECTORY BY FILE ID

    282	001130	062702 	000016 		150$:	ADD	#N.FLID,R2

    283	001134	012701 	000000'			MOV	#LI01MG,R1

    284	001140					CALL	$EDMSG		;"FILE ID 401,5743"

    285	001144	032767 	000000G	000000G	160$:	BIT	#SHTLST,CMDWRD	;IF BRIEF DIRECTORY LISTING

    286	001152	001013 				BNE	170$		;SKIP THE DATE AND TIME

    287	001154	016702 	000000G			MOV	.HDRAD,R2

    288	001160					GTIM$S	R2		;READ TIME OF DAY

    289	001170	103434 				BCS	200$

    290	001172	012701 	000131'			MOV	#TIMEMG,R1

    291	001176					CALL	$EDMSG

    292	001202	112720 	000015 		170$:	MOVB	#15,(R0)+

    293	001206	112720 	000012 			MOVB	#12,(R0)+

    294	001212	005767 	000040'			TST	DIHDMG		;ZERO IF ALREADY TYPED HEADER

    295	001216	001415 				BEQ	180$

    296	001220	010067 	000040'			MOV	R0,DIHDMG	;NOTE HEADER MESSAGE TO BE TYPED

    297	001224	016701 	000000C			MOV	FDBIN+F.FNB+N.STAT,R1

    298	001230	042701 	000000C			BIC	#^C<NB.SDI!NB.SNM!NB.STP>,R1

    299	001234	022701 	000000C			CMP	#<NB.SDI!NB.SNM!NB.STP>,R1 ;IF [*,*]*.* (OR [*,*]*.*;*)

    300	001240	001004 				BNE	180$

    301	001242	005067 	000040'			CLR	DIHDMG		;PRINT THE DIRECTORY HEADER

    302	001246					CALL	EDTPT1		;WHETHER OR NOT THE DIRECTORY IS EMPTY

    303	001252	000414 			180$:	BR	GTENT		;OTHERWISE OUTPUT IT LATER

    304					;

    305					; FAILED TO ATTACH THE TTY

    306	001254				190$:	ERROUX	DI06,0,0

	001254	104427 				TRAP	X

	001256	000000G				.WORD	DI06SZ

PIPDIR M0222, LIST DIRECTORY CO	MACRO M1110  22-AUG-78 01:32  PAGE 8-4

**** PIPDIR VERSION M0222 ****



	001260	000000G				.WORD	DI06MG

    307					;

    308					; FAILED TO GET TIME INFORMATION

    309	001262				200$:	ERROUX	DI07

	001262	104403 				TRAP	X

	001264	000000G				.WORD	DI07SZ

	001266	000000G				.WORD	DI07MG

    310	001270	000403 				BR	220$

    311					;

    312					; FAILED TO OPEN LISTING FILE

    313	001272				210$:	ERROUT	OP02,0,0

	001272	104426 				TRAP	X

	001274	000000G				.WORD	OP02SZ

	001276	000000G				.WORD	OP02MG

    314	001300	000167 	000000G		220$:	JMP	CLOSX

PIPDIR M0222, LIST DIRECTORY CO	MACRO M1110  22-AUG-78 01:32  PAGE 9

**** PIPDIR VERSION M0222 ****



    316	001304	032767 	000000G	000000C	GTENT:	BIT	#NB.SFN,FDBIN+F.FNB+N.STAT ;ANY WILD CARDS?

    317	001312	001004 				BNE	10$		;BRANCH IF YES

    318	001314	032767 	000000G	000000G		BIT	#FRSTIM,CPYCTL	;IF FIRST FIND, DO IT

    319	001322	001416 				BEQ	20$		;OTHERWISE STOP NOW

    320	001324	042767 	000000G	000000G	10$:	BIC	#FRSTIM,CPYCTL	;NO LONGER THE FIRST TIME

    321	001332	012700 	000000G			MOV	#FDBIN,R0

    322	001336	012702 	000000G			MOV	#FNAEFN,R2	;R2=EVENT FLAG FOR PENDING FIND QI/O

    323	001342	012701 	000000G			MOV	#FNASTS,R1	;R1 = I/O STATUS BLOCK ADR FOR FIND

    324	001346					CALL	WATQIO		;WAIT FOR THE LAST FIND QI/O TO COMPLETE

    325	001352	103004 				BCC	30$		;BRANCH IF IT WAS SUCCESSFUL

    326	001354					CALL	FNDERR		;NORMAL TERMINATION IF NO SUCH FILE

    327	001360	000167 	000552 		20$:	JMP	LSTNXT

    328	001364	005267 	000004'		30$:	INC	FILCNT		;COUNT THIS FILE

    329	001370	016700 	000040'			MOV	DIHDMG,R0	;SEE IF DIRECTORY HEADER MSG TO OUTPUT

    330	001374	001404 				BEQ	40$		;BRANCH IF NONE

    331	001376	005067 	000040'			CLR	DIHDMG		;ONLY OUTPUT IT ONCE

    332	001402					CALL	EDTPT1

    333	001406	012701 	000000C		40$:	MOV	#FDBIN+F.FNB,R1

    334						.IF DF	O$$DS2								;BLS052

    335					;										;BLS052

    336					; COPY FILE ID INTO ATTRIBUTE BLOCK BUFFER					;BLS052

    337					;										;BLS052

    338	001412	016700 	000000G			MOV	.HDRAD+AB.FNU,R0 ;FILE ID IN ATTRIBUTE BLOCK			;BLS052

    339	001416	012120 				MOV	(R1)+,(R0)+							;BLS052

    340	001420	012120 				MOV	(R1)+,(R0)+							;BLS052

    341	001422	012120 				MOV	(R1)+,(R0)+							;BLS052

    342	001424	012701 	000000C			MOV	#FDBIN+F.FNB,R1							;BLS052

    343					;										;BLS052

    344					; END OF FILE ID COPY								;BLS052

    345					;										;BLS052

    346						.ENDC									;BLS052

    347	001430	012700 	000000G			MOV	#NMBLK1,R0

    348	001434	012702 	000000G			MOV	#S.FNBW,R2	;R2 = SIZE IN WORDS OF FILE NAME BLOCK

    349	001440	012120 			50$:	MOV	(R1)+,(R0)+	;MOVE FDB'S FNB TO NMBLK1

    350	001442					SOB	R2,50$

    351					;

    352					; R0=FILE NAME BLOCK ADDRESS TO LIST DIRECTORY FROM

    353					;

    354	001446	032767 	000000G	000000G		BIT	#SHTLST,CMDWRD	;IF BRIEF MODE LISTING

    355	001454	001031 				BNE	60$		;SKIP THE READ ATTRIBUTES

    356					;

    357					; START UP THE READ ATTRIBUTES, WAIT FOR COMPLETION LATER

    358					;

    359

    360						.IF	EQ,R$$DPB	;IF OLD DPB FORMAT

    361						QIO$S	#IO.RAT,#INLUN,#RATEFN,,#IOSTBK,,<#NMBLK1,#HDBLK,#STBLK>

    362						.IFF			;IF NEW DPB FORMAT

    363	001456					QIO$S	#IO.RAT,#INLUN,#RATEFN,,#IOSTBK,,<#NMBLK1,#RATCTL,,,,>

    364						.ENDC

    365

    366	001530	103003 				BCC	60$		;BRANCH IF QIO WAS OK

    367	001532	113767 	000000G	000000G		MOVB	@#$DSW,IOSTBK	;SET ERROR CODE FOR WAIT TO SEE

    368					;

    369					; START THE NEXT FIND NAME QI/O UNLESS JUST LISTING ONE FILE

    370					;

    371	001540	032767 	000000G	000000C	60$:	BIT	#NB.SFN,FDBIN+F.FNB+N.STAT

    372	001546	001402 				BEQ	70$		;BRANCH IF NO WILD CARDS

PIPDIR M0222, LIST DIRECTORY CO	MACRO M1110  22-AUG-78 01:32  PAGE 9-1

**** PIPDIR VERSION M0222 ****



    373	001550					CALL	STFIND		;START UP THE NEXT FIND QI/O

    374	001554	012702 	000000G		70$:	MOV	#NMBLK1,R2	;R2=FILE NAME BLOCK ADDRESS

    375	001560	016700 	000000C			MOV	FDBOUT+F.NRBD+2,R0 ;R0=ADDRESS TO STORE STRING TO PUT$

    376	001564	062702 	000000G			ADD	#N.FNAM,R2	;POINT AT FILE NAME FIELD

    377	001570	012701 	000022'			MOV	#LI02MG,R1

    378	001574					CALL	$EDMSG		;CONVERT THE FILE NAME

    379	001600	032767 	000000G	000000G		BIT	#SHTLST,CMDWRD

    380	001606	001126 				BNE	DIRPUT

    381	001610	162701 	000002 			SUB	#2,R1		;DON'T COUNT CR,LF

    382						.IF DF	O$$DS2								;BLS052

    383	001614	012705 	000000G			MOV	#$HDTB1,R5							;BLS052

    384	001620					CALL	$HDFIL		;ADD BLANKS TO FILL THE FIELD			;BLS052

    385						.IFF									;BLS052

    386						MOV	#HDRTB1,R5

    387						CALL	HDFILL		;ADD BLANKS TO FILL THE FIELD

    388						.ENDC									;BLS052

    389	001624					CALL	EDTPUT		;OUTPUT THE FILE NAME FIELD

    390	001630	012700 	000000G			MOV	#FDBIN,R0

    391	001634	012702 	000000G			MOV	#RATEFN,R2	;EVENT FLAG FOR READ ATTRIBUTES

    392	001640	012701 	000000G			MOV	#IOSTBK,R1	;I/O STATUS BLOCK FOR RD ATT

    393	001644					CALL	WATQIO		;WAIT FOR I/O DONE ON THE READ ATTRIB

    394	001650	103511 				BCS	RDATER		;BRANCH IF ERROR

    395					;

    396					; IF SEQUENTIAL DEVICE, THEN EFBK IS WRONG

    397					; PUTTING ZERO IN WILL TELL HDRMG TO PRINT ALLOCATED SPACE

    398	001652	016705 	000000G			MOV	.HDRAD,R5	;R5=ADDRESS OF FILE HEADER

    399	001656	132767 	000000G	000000C		BITB	#FD.SQD,FDBIN+F.RCTL

    400	001664	001402 				BEQ	80$

    401						.IF DF	O$$DS2								;BLS052

    402	001666	005065 	000022G			CLR	AB.UAT+F.EFBK+2(R5)						;BLS052

    403	001672	016500 	000020G		80$:	MOV	AB.UAT+F.EFBK(R5),R0 ;R0,R1 = EOF FROM RECORD ATTRIBUTES	;BLS052

    404	001676	016501 	000022G			MOV	AB.UAT+F.EFBK+2(R5),R1						;BLS052

    405						.IFF									;BLS052

    406						CLR	HH.UAT+F.EFBK+2(R5)

    407					80$:	MOV	HH.UAT+F.EFBK(R5),R0 ;R0,R1 = EOF FROM RECORD ATTRIBUTES

    408						MOV	HH.UAT+F.EFBK+2(R5),R1

    409						.ENDC									;BLS052

    410	001702	001007 				BNE	90$		;IF BOTH ZERO, THEN USE REAL FILE SIZE

    411	001704	005700 				TST	R0

    412	001706	001005 				BNE	90$

    413	001710	016700 	000004G			MOV	STBLK+4,R0	;R0, R1 = REAL FILE SIZE (ALLOCATED)

    414	001714	016701 	000006G			MOV	STBLK+6,R1

    415	001720	000406 				BR	100$

    416	001722				90$:										;BLS052

    417						.IF DF	O$$DS2								;BLS052

    418	001722	005765 	000020G			TST	AB.UAT+F.FFBY(R5) ;IF FFBY = 0 THEN EFBK IS 1 TOO BIG		;BLS052

    419						.IFF									;BLS052

    420						TST	HH.UAT+F.FFBY(R5) ;IF FFBY = 0 THEN EFBK IS 1 TOO BIG		;BLS052

    421						.ENDC									;BLS052

    422	001726	001003 				BNE	100$								;**-1

    423	001730	162701 	000001 			SUB	#1,R1		;MAKE IT SMALLER

    424	001734	005600 				SBC	R0

    425	001736	060167 	000010'		100$:	ADD	R1,FILUSD+2	;RECORD THIS FILE'S USED SPACE

    426	001742	005500 				ADC	R0

    427	001744	060067 	000006'			ADD	R0,FILUSD

    428	001750	066767 	000006G	000014'		ADD	STBLK+6,FILALC+2 ;AND RECORD SPACE ALLOCATED

    429	001756	005567 	000012'			ADC	FILALC

PIPDIR M0222, LIST DIRECTORY CO	MACRO M1110  22-AUG-78 01:32  PAGE 9-2

**** PIPDIR VERSION M0222 ****



    430	001762	066767 	000004G	000012'		ADD	STBLK+4,FILALC

    431	001770	016700 	000000C			MOV	FDBOUT+F.NRBD+2,R0

    432	001774	010501 				MOV	R5,R1		;R1=ADDRESS OF HEADER

    433	001776	012702 	000000G			MOV	#STBLK,R2	;R2=ADDRESS OF STATISTICS BLOCK

    434	002002	005003 				CLR	R3		;NO FILE NAME, NOT LONG FORM

    435	002004	032767 	000000C	000000G		BIT	#EVRYBT!TOTLBT,CMDWRD

    436	002012	001422 				BEQ	110$

    437	002014	012703 	000002 			MOV	#2,R3		;LONG FORM, STILL NO FILE NAME

    438	002020	016704 	000000G			MOV	LPTLEN,R4	; GET /FU:N

    439	002024	001403 				BEQ	105$		; IF DEFAULT GO

    440	002026	020467 	000000C			CMP	R4,FDBOUT+F.VBSZ ; SEE HOW IT COMPARES WITH DEV

    441	002032	003402 				BLE	106$		; IF LE OK

    442	002034	016704 	000000C		105$:	MOV	FDBOUT+F.VBSZ,R4 ; USE DEVICE SIZE

    443	002040	022704 	000204 		106$:	CMP	#132.,R4	; SEE IF OVER DEFAULT MAX?

    444	002044	002002 				BGE	107$		; IF GE ITS OK

    445	002046	012704 	000204 			MOV	#132.,R4	; NO--SETUP FOR DEFAULT MAX

    446	002052				107$:

    447	002052	000303 				SWAB	R3

    448	002054	050403 				BIS	R4,R3		; SET CORRECT SIZE

    449	002056	000303 				SWAB	R3

    450	002060				110$:										;BLS052

    451						.IF DF	O$$DS2								;BLS052

    452	002060					CALL	$FILMG		;CONVERT THE FILE HEADER INFO			;BLS052

    453						.IFF									;BLS052

    454						CALL	HDRMG		;CONVERT THE FILE HEADER INFO			;BLS052

    455						.ENDC									;BLS052

    456	002064				DIRPUT:	CALL	EDTPUT								;**-1

    457	002070	000167 	177210 			JMP	GTENT

    458					;

    459					;ERROR READING ATTRIBUTES

    460	002074	005367 	000004'		RDATER:	DEC	FILCNT		;DON'T COUNT FILES THAT CAN'T BE LISTED

    461	002100	016701 	000000C			MOV	FDBOUT+F.NRBD+2,R1

    462	002104	012702 	000026 			MOV	#LI03SZ,R2

    463	002110	012703 	000027'			MOV	#LI03MG,R3

    464	002114					CALL	MVSTRG

    465	002120	010100 				MOV	R1,R0

    466	002122	116701 	000000C			MOVB	FDBIN+F.ERR,R1

    467	002126					CALL	FCSERR		;CONVERT FCS ERROR TO MESSAGE

    468	002132	000167 	177726 			JMP	DIRPUT

PIPDIR M0222, LIST DIRECTORY CO	MACRO M1110  22-AUG-78 01:32  PAGE 10

**** PIPDIR VERSION M0222 ****



    470	002136	005067 	000036'		LSTNXT:	CLR	USDMSG		;NO "TOTAL" MESSAGE

    471	002142	032767 	000000G	000000G		BIT	#SHTLST,CMDWRD	;IF BRIEF MODE, DON'T LIST TOTALS

    472	002150	001025 				BNE	30$

    473	002152	005767 	000004'			TST	FILCNT		;IF NO FILES, SKIP THE TOTAL MESSAGE

    474	002156	001003 				BNE	10$

    475	002160	005767 	000040'			TST	DIHDMG		;IF DIRECTORY HEADER WAS PRINTED, ALLOW TOTALS

    476	002164	001017 				BNE	30$

    477	002166	016700 	000000G		10$:	MOV	.DYBUF,R0	;ADDRESS OF BUFFER TO BUILD MESSAGE

    478	002172	012701 	000142'			MOV	#TOTLMG,R1

    479	002176	012702 	000000'			MOV	#TOTP,R2	;ADDRESS OF USED COUNT

    480	002202					CALL	$EDMSG

    481	002206	022767 	000001 	000004'		CMP	#1,FILCNT	;IF ONLY 1 FILE

    482	002214	001001 				BNE	20$

    483	002216	005300 				DEC	R0		;STRIP OFF THE S FROM "FILES"

    484	002220	010067 	000036'		20$:	MOV	R0,USDMSG	;SAVE END POINTER OF MESSAGE

    485	002224				30$:	CALL	CLSIN

    486	002230	012700 	000000G			MOV	#FDBIN,R0

    487	002234					CALL	PRSREG

    488	002240					CALL	.NXDIR		;NEXT WILD CARD DIRECTORY IF ANY

    489	002244	103402 				BCS	40$

    490	002246	000167 	176122 			JMP	DIRLS2

    491	002252				40$:	CALL	FNDERR		;ERR MESSAGE IF NOT IE.NSF

    492	002256	012700 	000000G			MOV	#FDBIN,R0

    493	002262	016001 	000000G			MOV	F.DSPT(R0),R1

    494	002266	012702 	000000G			MOV	#INCSI,R2

    495	002272	020127 	000000G			CMP	R1,#IFNPT

    496	002276	001402 				BEQ	50$

    497	002300	012702 	000000G			MOV	#OUTCSI,R2

    498	002304				50$:	CALL	NXINOU		;GET NEXT SPECIFIER IF ANY

    499	002310	103402 				BCS	60$

    500	002312	000167 	175724 			JMP	DIRLS1

    501	002316	016700 	000036'		60$:	MOV	USDMSG,R0	;SEE IF TOTAL MESSAGE TO BE PRINTED

    502	002322	001011 				BNE	80$

    503	002324	005767 	000042'			TST	DIROUT		;IF NO OUTPUT HAS BEEN DONE YET

    504	002330	001003 				BNE	70$

    505	002332					ERROUX	FI03		;SAY NO SUCH FILES

	002332	104403 				TRAP	X

	002334	000000G				.WORD	FI03SZ

	002336	000000G				.WORD	FI03MG

    506	002340	016700 	000000G		70$:	MOV	.DYBUF,R0	;OTHERWISE JUST OUTPUT A FEW LF'S

    507	002344	000402 				BR	85$

    508	002346				80$:	CALL	GETTOT		;ACCUMULATE GRAND TOTAL DATA

    509	002352	026727 	000024'	000001 	85$:	CMP	DIRCNT,#1	;SEE IF WE LISTED MORE THAN 1 DIRECTORY

    510	002360	101406 				BLOS	90$		;BRANCH IF NO

    511	002362	012701 	000213'			MOV	#GTOTMG,R1	;GET MESSAGE STRING

    512	002366	012702 	000016'			MOV	#GTOP,R2	;AND PARAMETER BLOCK

    513	002372					CALL	$EDMSG		;PRODUCE GRAND TOTAL LINE

    514

    515	002376	112720 	000015 		90$:	MOVB	#15,(R0)+	;CR

    516	002402	012701 	000012 			MOV	#12,R1

    517	002406	110120 				MOVB	R1,(R0)+	;LF

    518	002410	132767 	000000G	000000C		BITB	#FD.TTY,FDBOUT+F.RCTL ;IF OUTPUT TO TERMINAL DEVICE

    519	002416	001402 				BEQ	100$

    520	002420	110120 				MOVB	R1,(R0)+	;ADD 2 MORE LF'S

    521	002422	110120 				MOVB	R1,(R0)+

    522	002424				100$:	CALL	EDTPT1

    523	002430	000167 	000000G		110$:	JMP	CLOSX

PIPDIR M0222, LIST DIRECTORY CO	MACRO M1110  22-AUG-78 01:32  PAGE 11

**** PIPDIR VERSION M0222 ****



    525					;

    526					; ACCUMULATE GRAND TOTAL DATA FROM TOTALS

    527					;

    528	002434	012701 	000004'		GETTOT:	MOV	#FILCNT,R1	;POINT TO SUMMARY BLOCKS

    529	002440	012702 	000022'			MOV	#GFLCNT,R2

    530	002444	062122 				ADD	(R1)+,(R2)+	;TOTAL FILE COUNT

    531	002446	005222 				INC	(R2)+		;DIRECTORY COUNT

    532	002450	062122 				ADD	(R1)+,(R2)+	;ACCUMULATE TOTAL FOR 1 DIRECTORY

    533	002452	062122 				ADD	(R1)+,(R2)+	;INTO GRAND TOTALS

    534	002454	005562 	177774 			ADC	-4(R2)

    535	002460	062122 				ADD	(R1)+,(R2)+	;SAME FOR BLOCKS ALLOCATED

    536	002462	062122 				ADD	(R1)+,(R2)+

    537	002464	005562 	177774 			ADC	-4(R2)

    538	002470					RETURN

    539					;

    540					; OUTPUT RECORD TO LISTING FILE

    541					; INPUTS:

    542					;	R0=POINTER TO END OF STRING

    543					;	FDBOUT+F.NRBD+2 = ADDRESS OF BEGIN OF STRING

    544					; OUTPUTS:

    545					;	R0 ALTERED, OTHERS PRESERVED

    546					; OPERATION:

    547					;	IF I/O ERROR TO LISTING FILE, GIVES ERROR MESSAGE AND

    548					; TERMINATES.  DOES NOT RETURN IN THIS CASE

    549

    550						.ENABL	LSB

    551

    552					;

    553					; HERE TO PRINT THE DIRECTORY HEADER MESSAGE AND TOTAL MESSAGE

    554					;

    555	002472	010067 	000042'		EDTPT1:	MOV	R0,DIROUT	;NOTE THAT OUTPUT HAS BEEN DONE

    556	002476	010146 				MOV	R1,-(SP)	; SAVE REGISTERS

    557	002500	010246 				MOV	R2,-(SP)

    558	002502	016701 	000000G			MOV	.DYBUF,R1	; ADDRESS OF RECORD TO PUT

    559	002506	016702 	000000C			MOV	FDBOUT+F.NRBD+2,R2 ; GET ADDRESS OF RECORD BUFFER

    560	002512	160100 				SUB	R1,R0		; COMPUTE BYTE COUNT

    561	002514	001426 				BEQ	30$		; EXIT ON NULL RECORD

    562	002516	010067 	000000C			MOV	R0,FDBOUT+F.NRBD ; SET RECORD SIZE IN FDB

    563	002522	112122 			10$:	MOVB	(R1)+,(R2)+	; COPY THE RECORD INTO THE BUFFER

    564	002524					SOB	R0,10$

    565	002530	012602 				MOV	(SP)+,R2	; RESTORE REGISTERS

    566	002532	012601 				MOV	(SP)+,R1

    567	002534	000411 				BR	20$

    568					;

    569					; HERE TO PRINT OUT THE DIRECTORY LISTING TEXT FOR EACH FILE

    570					;

    571	002536	032767 	000000G	000000G	EDTPUT:	BIT	#TOTLBT,CMDWRD	;IF JUST PRINTING TOTALS

    572	002544	001012 				BNE	30$		;DON'T PRINT THE DIRECTORY ENTRIES

    573	002546	010067 	000000C			MOV	R0,FDBOUT+F.NRBD

    574	002552	166767 	000000C	000000C		SUB	FDBOUT+F.NRBD+2,FDBOUT+F.NRBD

    575	002560				20$:	PUT$	#FDBOUT

    576	002570	103401 				BCS	40$

    577	002572				30$:	RETURN

    578	002574				40$:	ERROUX	CP14,0,0

	002574	104427 				TRAP	X

	002576	000000G				.WORD	CP14SZ

	002600	000000G				.WORD	CP14MG

PIPDIR M0222, LIST DIRECTORY CO	MACRO M1110  22-AUG-78 01:32  PAGE 11-1

**** PIPDIR VERSION M0222 ****



    579

    580						.DSABL	LSB

    581

    582					;

    583					; START UP A FIND QI/O OPERATION

    584					;

    585					; INPUTS:

    586					;	NONE

    587					; OUPTUTS:

    588					;	R0=INPUT FDB ADDRESS

    589					;	R1=(R0)+F.FNB

    590					;	R2=0

    591					;

    592	002602	012700 	000000G		STFIND:	MOV	#FDBIN,R0

    593	002606	012701 	000000C			MOV	#FDBIN+F.FNB,R1

    594	002612	005002 				CLR	R2

    595						.IF DF	O$$DS2								;BLS052

    596	002614	016161 	000000G	000004G		MOV	N.FVER(R1),N.FID+4(R1) ;COPY OLD VERSION			;BLS052

    597	002622	052761 	010000 	000000G		BIS	#NB.WLV,N.STAT(R1)     ;AND SET FLAG FOR ODS2 LOOKUP		;BLS052

    598						.ENDC									;BLS052

    599	002630	016761 	000000G	000000G		MOV	VERSAV,N.FVER(R1)

    600	002636					CALL	.WLDVC		;SPECIAL DEFAULT VERSION LOGIC?

    601	002642	103006 				BCC	50$		;BRANCH IF NO

    602	002644					CALL	.FNDNX		;DO THE SPECIAL FIND

    603	002650	116067 	000000G	000000G		MOVB	F.ERR(R0),FNASTS ;SET STATUS SO WAIT WILL WORK

    604	002656					RETURN

    605	002660				50$:

    606						.IF	EQ,R$$DPB	;IF OLD DPB FORMAT

    607						QIO$S	#IO.FNA,#INLUN,#FNAEFN,,#FNASTS,,<R1>

    608						.IFF			;IF NEW DPB FORMAT

    609	002660					QIO$S	#IO.FNA,#INLUN,#FNAEFN,,#FNASTS,,<,,,,,R1>

    610						.ENDC

    611

    612	002726	103003 				BCC	60$

    613	002730	113767 	000000G	000000G		MOVB	@#$DSW,FNASTS	;PUT ERROR BYTE WHERE WAIT WILL FIND IT

    614	002736				60$:	RETURN

    615					;

    616					; WAIT FOR THE COMPLETION OF A PREVIOUSLY ISSUED QI/O

    617					; INPUTS:

    618					;	R0=FDB ADDRESS, SET F.ERR

    619					;	R1=I/O STATUS BLOCK ADDRESS

    620					;	R2=EVENT FLAG NUMBER

    621					; OUTPUT:

    622					;	C=0 IF OPERATION WAS COMPLETED SUCCESSFULLY

    623					;	C=1 IF ERROR, F.ERR(R0) SET TO REASON

    624					;	ALL REGISTERS PRESERVED

    625					;

    626	002740	000241 			WATQIO:	CLC

    627	002742	111160 	000000G			MOVB	(R1),F.ERR(R0)	;SEE IF OPERATION COMPLETE FIRST

    628	002746	001005 				BNE	70$		;BRANCH IF IT IS

    629	002750					WTSE$S	R2		;WAIT FOR SPECIFIED EVENT FLAG

    630	002760	000767 				BR	WATQIO

    631	002762	003001 			70$:	BGT	80$

    632	002764	000261 				SEC

    633	002766				80$:	RETURN

    634

    635					;

PIPDIR M0222, LIST DIRECTORY CO	MACRO M1110  22-AUG-78 01:32  PAGE 11-2

**** PIPDIR VERSION M0222 ****



    636					;

    637		000001 				.END

PIPDIR M0222, LIST DIRECTORY CO	MACRO M1110  22-AUG-78 01:32  PAGE 11-3

SYMBOL TABLE



AB.CDT  000105   	DIRLS1  000242R     004	F.NRBD= ****** GX	NB.NAM= ****** GX	SHTLST= ****** GX

AB.CHU  000064   	DIRLS2  000374R     004	F.OVBS= ****** GX	NB.NXD= 020000   	STBLK = ****** GX

AB.EXP  000122   	DIRLS3  000440R     004	F.RACC= ****** GX	NB.SDI= ****** GX	STFIND  002602R     004

AB.FNU  000000   	DIROUT  000042R     003	F.RATT= ****** GX	NB.SFN= ****** GX	STNMBK= ****** GX

AB.FP   000062   	DIRPUT  002064R     004	F.RCTL= ****** GX	NB.SNM= ****** GX	SYDEV = ****** GX

AB.FSQ  000002   	DI06MG= ****** GX	F.RTYP= ****** GX	NB.STP= ****** GX	SYDFLT= ****** GX

AB.GC   000061   	DI06SZ= ****** GX	F.UNIT= ****** GX	NB.TYP= ****** GX	SYUNIT= ****** GX

AB.NAM  000006   	DI07MG= ****** GX	F.URBD= ****** GX	NB.VER= ****** GX	S.APPD= 000010

AB.PC   000060   	DI07SZ= ****** GX	F.VBSZ= ****** GX	NB.WLV= 010000   	S.FIDS= 000014

AB.RDT  000070   	DI08MG= ****** GX	GETTOT  002434R     004	NMBLK1= ****** GX	S.FNBW= ****** GX

AB.REV  000066   	DI08SZ= ****** GX	GFLALC  000032R     003	NXINOU= ****** GX	TIMEMG= 000131R     002

AB.UAT  000020   	EDTPT1  002472R     004	GFLCNT  000022R     003	N.DEVD= 000000   	TIMESZ= 000011

A.DFDR= ****** GX	EDTPUT  002536R     004	GFLUSD  000026R     003	N.DID = ****** GX	TOTHMG= 000055R     002

CLOSX = ****** GX	EVRYBT= ****** GX	GTENT   001304R     004	N.DIRD= 000004   	TOTHSZ= 000033

CLSIN = ****** GX	EX$ERR= ****** GX	GTOP    000016R     003	N.DVNM= ****** GX	TOTLBT= ****** GX

CMDWRD= ****** GX	FCSERR= ****** GX	GTOTMG= 000213R     002	N.FID = ****** GX	TOTLMG= 000142R     002

CODEV = ****** GX	FDBIN = ****** GX	GTOTSZ= 000102   	N.FLID= 000016   	TOTLSZ= 000051

COUNIT= ****** GX	FDBOUT= ****** GX	G.TICP= 000016   	N.FNAM= ****** GX	TOTP    000000R     003

CPYCTL= ****** GX	FD.DIR= ****** GX	G.TICT= 000014   	N.FNMD= 000010   	USDMSG  000036R     003

CP14MG= ****** GX	FD.PLC= ****** GX	G.TIDA= 000004   	N.FVER= ****** GX	VERSAV= ****** GX

CP14SZ= ****** GX	FD.SDI= ****** GX	G.TIHR= 000006   	N.SPEC= 000014   	WATQIO  002740R     004

CS.DIF= 000002   	FD.SQD= ****** GX	G.TIMI= 000010   	N.STAT= ****** GX	X     = 000027

CS.DVF= 000004   	FD.TTY= ****** GX	G.TIMO= 000002   	N.UNIT= ****** GX	$DSW  = ****** GX

CS.EQU= 000040   	FF    = 000014   	G.TISC= 000012   	OFNPT = ****** GX	$EDMSG= ****** GX

CS.INP= 000001   	FILALC  000012R     003	G.TIYR= 000000   	OP02MG= ****** GX	$FILMG= ****** GX

CS.MOR= 000020   	FILCNT  000004R     003	IFNPT = ****** GX	OP02SZ= ****** GX	$HDFIL= ****** GX

CS.NMF= 000001   	FILUSD  000006R     003	INCSI = ****** GX	OURACC= ****** GX	$HDTB1= ****** GX

CS.OUT= 000002   	FI03MG= ****** GX	INLUN = ****** GX	OUSPEC= ****** GX	$$$ARG= 000002

CS.WLD= 000010   	FI03SZ= ****** GX	INRACC= ****** GX	OUTCSI= ****** GX	$$$OST= 000020

C.CMLD= 000002   	FNAEFN= ****** GX	INSPEC= ****** GX	O$$DS2= 000001   	.DYALC= ****** GX

C.DEVD= 000006   	FNASTS= ****** GX	IOSTBK= ****** GX	PARSE = ****** GX	.DYBUF= ****** GX

C.DIRD= 000012   	FNDERR= ****** GX	IO.FNA= ****** GX	PAR$$$= 000027   	.EXSTS= ****** GX

C.DSDS= 000006   	FO.WRT= ****** GX	IO.RAT= ****** GX	PRSERR= ****** GX	.FNDNX= ****** GX

C.FILD= 000016   	FRSTIM= ****** GX	LINBFS= ****** GX	PRSREG= ****** GX	.FSRPT= ****** GX

C.MKW1= 000024   	F.BDB = ****** GX	LINBUF= ****** GX	RATCTL= ****** GX	.HDRAD= ****** GX

C.MKW2= 000026   	F.DFNB= ****** GX	LI01MG= 000000R     002	RATEFN= ****** GX	.LCLSW= ****** GX

C.SIZE= 000054   	F.DSPT= ****** GX	LI01SZ= 000022   	RDATER  002074R     004	.NXDIR= ****** GX

C.STAT= 000001   	F.DVNM= ****** GX	LI02MG= 000022R     002	RECATT= ****** GX	.OPFNB= ****** G

C.SWAD= 000022   	F.EFBK= ****** GX	LI02SZ= 000005   	R$$DPB= 000001   	.OULCL= ****** GX

C.TYPR= 000000   	F.ERR = ****** GX	LI03MG= 000027R     002	R$$DYM= 000001   	.PUTSQ= ****** G

DIHDMG  000040R     003	F.FACC= ****** GX	LI03SZ= 000026   	R$$EIS= 000000   	.RDFDR= ****** GX

DIRCNT  000024R     003	F.FFBY= ****** GX	LPTLEN= ****** GX	R$$MSG= 000000   	.REV  = ****** GX

DIRHMG= 000110R     002	F.FNB = ****** GX	LSTNXT  002136R     004	R$$VMS= 000001   	.UAT  = ****** GX

DIRHSZ= 000021   	F.FVER= ****** GX	MVSTRG= ****** GX	R$$11M= 000001   	.UIC  = ****** GX

DIRLST  000000RG    004	F.MBCT= ****** GX	NAMBLK= ****** GX	R.VAR = ****** GX	.WLDVC= ****** GX



. ABS.	000131	   000

      	000000	   001

MSGSTR	000315	   002

IMPURE	000044	   003

PURE$I	002770	   004

ERRORS DETECTED:  0



VIRTUAL MEMORY USED:  6192 WORDS  ( 25 PAGES)

DYNAMIC MEMORY:  6996 WORDS  ( 26 PAGES)

ELAPSED TIME:  00:00:37

OBJ$:PIPDIR,LIS$:PIPDIR/-SP=SRC$:PIPMAC,PIPDIR

