	.TITLE DRAWS
/				BY J.A.SMITH
/				   DEPT. OF SYSTEMS DESIGN
	.GLOBL .DA,DRAWS,SETUP
CLDC=705403
SKPIOT=706001
START=705106
STOP=705306
REP.OP=400000
AUTO10=10
AUTO11=11
ADDRES
COUNT
LINES
TEMP1
/
/ THIS SUBROUTINE INITIATES THE HYBRID SET UP AND SETS UP FOR
/ THE INTERRUPTS.
SETUP	XX
	CLC
	703003
	JMP	.-1
	705006		/ MASK OFF ALL INTERRUPTS
/
	LAC	(400200
	703003
	JMP	.-1
	705326		/ SELECT CONSOLE # 1, SUSPEND INTERRUPTS
/
/ ENABLE OPERATIONAL CONTROL LINES
	703005
	JMP	.-1
/
	LAC	(REP.OP
	STOP		/ FORCE ANALOG COMPUTER INTO IC MODE
/ SETUP TO HANDLE INTERRUPTS
	CAL	62
	16
	SKPIOT
	ANALOG		/ INTERRUPT HANDLING ROUTINE ADDRESS
	DBK
/
	LAC	(400000
	703003
	JMP	.-1
	703426		/ SELECT CONSOLE # 1, ENABLE INTERRUPTS
/
	LAC	(200000
	703003
	JMP	.-1
	703606		/ UNMASK INTERRUPTS
/
	703005
	JMP	.-1	/ ENABLE OPERATIONAL LINES AGAIN
	JMP*	SETUP
/
/
/ THIS SUBROUTINE CONNECTS IN THE CORRECT DISPLAY FILE
/ AND INITIATES THE DISPLAY.
DRAWS	XX
	JMS*	.DA
	JMP	.+4
FILE
I1STRT
I1END
	LAC*	I1STRT
	TAD	(-1
	CLL
	MUL
	.DSA	4	/ FILE IS A 4 BY X ARRAY
	LACQ
	TAD	(-1	/ FOR AUTO-INDEX REGISTER
	TAD*	FILE	/ ADD START ADDRESS OF FILE
	DAC	ADDRES	/ STORE IT
	LAC*	I1END
	CMA
	TAD*	I1STRT
	DAC	LINES	/THE NUMBER OF LINES TO BE DRAWN
	NOP
	LAC	(JMP* DRAWS
	DAC	.-2
	JMS	SETADR
	JMS	OUTPUT
	JMP*	DRAWS
/
/
/ THIS SUBROUTINE RESETS THE AUTO-INDEX REGISTER TO POINT
/ AT THE TOP OF THE DISPLAY FILE AGAIN & RESETS COUNTER.
SETADR	XX
	LAC	ADDRES
	DAC*	(AUTO10
	LAC	LINES
	DAC	COUNT
	JMP*	SETADR
/
/ THE FOLLOWING SECTION IS BRANCHED TO WHENEVER AN INTERRUPT
/ IS RECEIVED & IT CAUSES NEW VALUES TO BE OUTPUT.
ANALOG	XX		/ API ENTRY
	DAC	TEMP1	/ STORE AC
/
	JMS	OUTPUT
	ISZ	COUNT
	JMP	EXIT
	JMS	SETADR
/
EXIT	LAC	TEMP1
	ION
	DBR
	XCT	.+1
	JMP*	ANALOG
/
/ THIS SUBROUTINE EXTRACTS THE DATA FROM THE LINE FILE & OUTPUTS
/ IT TO THE D-A CONVERTERS.
OUTPUT	XX
	LAC	(REP.OP
	STOP		/ FORCE ANALOG COMPUTER INTO IC MODE
	LAC*	AUTO10
	CLDC
	LAC*	AUTO10
	CLDC
	LAC*	AUTO10
	CLDC
	LAC*	AUTO10
	CLDC
	LAC	(REP.OP
	START
	JMP*	OUTPUT
/
	.END
