TITLE TRIVIA DATA BASE COPIER

A=1
B=2
C=3

DSKI==0
DSKO==1

INPBLK:	BLOCK 2000
ERROR:	0

START:	.CALL TVOPN
	 .LOSE 1000
	.CALL COPDEL
	 JFCL
	.CALL COPOPN
	 .LOSE 1000
	.VALUE [ASCIZ /:PROCED
/]
CPLOOP:	SETZ A,
	MOVE B,[-2000,,INPBLK]
	.CALL COPIOT
	 .LOSE 1000
	JUMPL B,COPFIN
	MOVEI A,1
	MOVE B,[-2000,,INPBLK]
	.CALL COPIOT
	 .LOSE 1000
	JRST CPLOOP	
	
COPFIN:	.CLOSE DSKI,
	.CALL SFDUMP
	 .LOSE 1000
	.CLOSE DSKO,
	.BREAK 16,60000

TVOPN:	SETZ
	SIXBIT /OPEN/
	MOVSI .BII
	MOVEI DSKI
	[SIXBIT /DSK/]
	[SIXBIT /TV/]
	[SIXBIT /FILE/]
	SETZ [SIXBIT /MADMAN/]

COPDEL:	SETZ
	SIXBIT /DELETE/
	[SIXBIT /DSK/]
	[SIXBIT /TV/]
	[SIXBIT /FOO/]
	SETZ [SIXBIT /MADMAN/]

COPOPN:	SETZ
	SIXBIT /OPEN/
	MOVSI .BIO
	MOVEI DSKO
	[SIXBIT /DSK/]
	[SIXBIT /TV/]
	[SIXBIT /FOO/]
	SETZ [SIXBIT /MADMAN/]
	
COPIOT:	SETZ
	SIXBIT /IOT/
	MOVES ERROR
	A
	SETZ B
	
SFDUMP:	SETZ
	SIXBIT /SDMPBT/
	MOVEI DSKO
	SETZI 1

	END START