.DECSAVE
USR:	0
BLCK:	100
	BLOCK	77
PASS:	BLOCK	100

START:	Movsi 1,(RC%AWL)
	Hrroi 2,[Asciz 'PS:<*>']
	RCDIR
	movem 3,USR
	tlnn 1,(RC%NOM\RC%AMB\RC%NMD)
	 tlnn 1,(RC%WLD)	;This is neccessary due to RCDIR bugs
	  HALT	.
Loop:	movei 1,.priou
	Move 2,USR
	DIRST
	 ERJMP NEXT
	movei 2,^i
	bout
	move 1,USR
	movei 2,blck
	hrroi 3,pass
	gtdir
	 erjmp next
	hrroi 1,pass
	psout
	hrroi	1,[asciz '
']
	psout
Next:	Movsi 1,(rc%awl+rc%stp)	;Step to the next directory
	Hrroi 2,[Asciz 'PS:<*>']
	Move 3,USR
	RCDIR
	movem 3,USR
	tlnn 1,(rc%nom\rc%amb\rc%nmd)
	 tlnn 1,(rc%wld)	;This is neccessary due to RCDIR bugs
	  JRST DONE
	JRST LOOP
DONE:	HALTF
	Jrst Start
	END Start
