
/VIDEO DISPLAY TEST PROGRAM.
/SET SWITCHES TO DATA, AC0 = BAR/NORMAL (1/0)
/TYPE 1 FOR RAMP, L FOR LOG, ANYOTHER FOR PARALLELS
	.ABS
	.LOC 1
	JMP INTRUP
	.LOC 100
START	IOF
	CAF
	LAC (61
	DAC KEY
	JMS SET
	LAC (1
	700724	/ENABLE DISPLAY INTERRUPT
	ION
LOOP	LAC INFLAG
	SNA
	JMP LOOP
	JMS SET
	JMP LOOP
KEY	0
INFLAG	0
SET	0	/SET BUFFER ROUTINE
	LAC BUFAD
	TAD (-1
	DAC 10
	LAW -1000
	DAC COUNT
	LAC KEY
	SAD (61
	JMP RAMP
	SAD (114
	JMP LOGS	/LOG SCALE
	LAS	/SET FOR PARALLELS
	DAC* 10
	ISZ COUNT
	JMP .-2
	JMP DONE
RAMP	LAS	/SET FOR RAMP
	AND (377777
	DAC YDEL	/Y INCREMENT
	LAS
	AND (400000
	DAC BAR
	DZM YAXIS
CONT	LAC YAXIS
	TAD BAR
	DAC* 10
	LAC YAXIS
	TAD YDEL
	DAC YAXIS
	ISZ COUNT
	JMP CONT
	JMP DONE
LOGS	LAS	/LOG SCALE
	DAC LOGINC
	DAC LOGY
LOGA	LAC LOGY
	JMS LOG
	DAC* 10
	LAC LOGY
	TAD LOGINC
	DAC LOGY
	ISZ COUNT
	JMP LOGA
	JMP DONE
DONE	DZM INFLAG
	JMP* SET
BAR	0
COUNT	0
YAXIS	0
YDEL	0
LOGY	0
LOGINC	0
INTRUP	DAC AC		/INTERRUPT ROUTINE
	700701
	SKP
	JMP DISPLY
	700301
	SKP
	JMP KEYBRD
RETN	LAC AC
	ION
	JMP* 0
AC	0
DISPLY	700712		/READ COLUMN, CLEAR FLAG
	TAD BUFAD
	DAC DISP1
	LAC* DISP1
	700704		/SEND Y VALUE
	JMP RETN
DISP1	0
KEYBRD	700312	/READ KEYBOARD
	AND (177
	SAD (3
	JMP 17720
	DAC KEY
	CLA!IAC
	DAC INFLAG
	JMP RETN
/
/CRUDE LOG APPROXIMATION FOR DISPLAY ONLY.
LOG	0
	DAC LOG0	/SAVE
	LAW -20
	DAC LOGCNT
	LAC LOG0
LOG1	SPA
	JMP LOG2
	CLL!RAL
	ISZ LOGCNT
	JMP LOG1
LOG2	RTR
	SWHA
	AND (77
	DAC LOG3	/SAVE
	LAC LOGCNT	/GET MSB
	CMA!IAC
	RTL	/MULTIPLY BY 64
	RTL
	RTL
	AND (7700
	TAD LOG3	/ADD LINEAR APPROX PART
	JMP* LOG	/RETURN
LOGCNT	0
LOG3	0
LOG0	0
/
BUFAD	BUFAD+1
	.BLOCK 1000
	.END START
