/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
	.TITLE TGPI
	.GLOBL TGPI
TGPI	0
	ISZ TGPI
	LAC* TGPI
	DAC NUMBER
	SPA
	LAC* NUMBER /INDIRECT
	DAC NUMBER  /GPI NUMBER
	ISZ TGPI    /BUMP TO EXIT
	LAC* NUMBER
	AND (777770
	SZA!CLA
	JMP* TGPI   /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
	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
