/INITIALIZE SUBROUTINE
/EXECUTION TIME:  252 MICROSECONDS
/CALLING SEQUENCE:  CALL INIT(ERROR)
/   ERROR=0:  NO ERROR
/        =2:  CONSOLE FAILED TO SELECT
	.TITLE INIT
	.GLOBL INIT,%HALT,%HALTS
INIT	0
	ISZ INIT
	LAC* INIT
	DAC ERROR
	SPA
	LAC* ERROR  /INDIRECT
	DAC ERROR	/ERROR LOCATION
	ISZ INIT	/BUMP TO EXIT
	CLC
	IOT3
	JMP .-1
	SIMB	/MASK OFF INTERRUPTS
	LAC (400200
	IOT3
	JMP .-1
	CSIS	/SELECT CONSOLE;
	            /INTERRUPTS SUSPEND
	CLC
	IOT5
	JMP .-1
	ROCL	/RESET ALL CONTROL LINES
	LAW+17770
	DAC COUNT	/8 SENSE LINES
	LAC (XCT TABLE
	DAC .+3	/DEPOSIT RESET 0
	IOT5
	JMP .-1
	XX	/TEST AND RESET SENSE LINE
	ISZ .-1	/RESET +1
	ISZ COUNT
	JMP .-5	/RESET NEXT SENSE LINE
	LAC (400000
	IOT3
	JMP .-1
	CDIR	/DESELECT CONSOLE;
		/ENABLE INTERRUPTS
	IOT3
	JMP .-1
	RCSR	/READ CONSOLE SELECT
		/REGISTER
	DZM* ERROR	/ERROR=0
	SAD (000200
	JMP .+4
	LAC (2	/CONSOLE SELECT FAIL
	DAC* ERROR	/ERROR=2
	JMP* INIT
	JMP* INIT
%HALT
%HALTS
COUNT
ERROR
TABLE	TSL0
	TSL1
	TSL2
	TSL3
	TSL4
	TSL5
	TSL6
	TSL7
IOT3=703003
IOT5=703005
CSIS=705326
RCSR=705333
SIMB=705006
CDIR=703426
ROCL=705306
TSL0=705013
TSL1=705113
TSL2=705213
TSL3=705313
TSL4=703413
TSL5=703513
TSL6=703613
TSL7=703713
	.EJECT
	.END
