TITLE FZORKER
A=1
B=2

DSKI==1
DSKO==2

DSKBUF:	BLOCK	4000
OUTNM:
OUTDEV:	SIXBIT	/DSK/
OUTFN1:	SIXBIT	/FOO/
OUTFN2:	SIXBIT	/>/
OUTSNM:	SIXBIT	/SEND/


START:	.SUSET	[.RXUNAME,,A]
	CAME	A,[SIXBIT /TAA/]
	 .VALUE	[ASCIZ /:This program is NOT for general use and is NOT related to ZORK.
:KILL
/]
	MOVE	A,[115264173617]
	.CALL	[SETZ
		 SIXBIT	/OPEN/
		 [10,,DSKI]
		 OUTDEV
		 OUTFN1
		 OUTFN2
		 SETZ	OUTSNM]
	 JRST	DOCOPY
	.CALL	[SETZ
		 SIXBIT	/RFDATE/
		 MOVEI	DSKI
		 SETZM	A]
	 JFCL
	.CLOSE	DSKI,
	.CALL	[SETZ
		 SIXBIT	/DELETE/
		 OUTDEV
		 OUTFN1
		 OUTFN2
		 SETZ	OUTSNM]
	 JFCL
DOCOPY:	.CALL	[SETZ
		 SIXBIT	/OPEN/
		 [16,,DSKI]
		 [SIXBIT /DSK/]
		 [SIXBIT /T/]
		 [SIXBIT />/]
		 SETZ	[SIXBIT /TAA/]]
	 .BREAK	16,160000
	.CALL	[SETZ
		 SIXBIT	/OPEN/
		 [17,,DSKO]
		 OUTDEV
		 OUTFN1
		 OUTFN2
		 SETZ	OUTSNM]
	 .LOSE	1000
COPLOP:	MOVE	B,[-4000,,DSKBUF]
	.IOT	DSKI,B
	JUMPL	B,ENDLOP		; LAST BLOCK
	MOVE	B,[-4000,,DSKBUF]
	.IOT	DSKO,B
	JRST	COPLOP
ENDLOP:	.CLOSE	DSKI,
	HLRES	B
	ADD	B,[4000]
	MOVNS	B
	HRLZS	B
	HRRI	B,DSKBUF
	.IOT	DSKO,B
	.CALL	[SETZ
		 SIXBIT	/SDMPBT/
		 MOVEI	DSKO
		 SETZI	1]
	 .LOSE	1000
	.CALL	[SETZ
		 SIXBIT	/SFDATE/
		 MOVEI	DSKO
		 SETZ	A]
	 .LOSE	1000
	TRZ	A,-1
	.CALL	[SETZ
		 SIXBIT	/SRDATE/
		 MOVEI	DSKO
		 SETZ	A]
	 .LOSE	1000
	.CLOSE	DSKO,
	.BREAK	16,160000
END	START