	.TITLE	TGPI
/
/  7 MAR 72 - MOD BY P. HENDERSON
/
/TEST GENERAL PURPOSE INTERRUPT FUNCTION
/EXECUTION TIME: 39(TRUE) OR 38(FALSE)
/          MICROSECONDS
/CALLING SEQUENCE: TGPI(NUMBER)
/NUMBER:GENERAL PURPOSE INTERRUPT NUMBER
/EXIT: AC=777777 IF THE GPI IS HIGH
/      AC=000000 IF THE GPI IS LOW
/       OR IF AN ILLEGAL GPI WAS REQUESTED
/
	LOGAC
/
	.GLOBL TGPI
/
TGPI	XX
	.ARG	TGPI
	DAC NUMBER  /GPI NUMBER
	LAC* NUMBER
	AND (777770
	SZA!CLA
	JMP	SET   /GPI<0 OR GPI>7
	LAC* NUMBER /X
	TAD (XCT TABLE /XCT TABLE+X
	DAC .+3     /DEPOSIT TGP(NUMBER)
	IOT5
	JMP .-1
	XX    /TEST GPI AS SENSE LINE
	SPA!CLA     /SKIP ON GPI LOW
	CMA         /GPI IS HIGH
SET	DAC*	LOGICA
	LAC	(600000
	DAC*	.MODEA	/SET DATA MODE TO LOGICAL
	JMP* TGPI
NUMBER
TABLE	TGP0
	TGP1
	TGP2
	TGP3
	TGP4
	TGP5
	TGP6
	TGP7
IOT5=703005
TGP0=705033
TGP1=705133
TGP2=705233
TGP3=705333
TGP4=703433
TGP5=703533
TGP6=703633
TGP7=703733
	.END
