/READ SINGLE AC SWITCH FUNCTION
/EXECUTION TIME:  32 TO 41 MICROSECONDS
/CALLING SEQUENCE:  RSAC(SWITCH)
/   SWITCH:  0-17 SWITCH NUMBER
/EXIT:  AC=TRUE (777777) IF SWITCH IS UP
/       AC=FALSE(000000) IF SWITCH IS DOWN
/         OR IF SWITCH NUMBER IS ILLEGAL
	.TITLE RSAC
	.GLOBL RSAC
RSAC	0
	ISZ RSAC
	LAC* RSAC
	DAC SWITCH
	SPA
	LAC* SWITCH /INDIRECT
	DAC SWITCH	/SWITCH LOC.
	ISZ RSAC	/BUMP TO EXIT
	LAC* SWITCH
	SPA
	JMP ERROR	/SWITCH<0
	TAD (-22
	SMA
	JMP ERROR	/SWITCH>17
	LAC* SWITCH	/STEP COUNT
	TAD (ALS	/AC LEFT SHIFT
	DAC .+2	/FIX VARIABLE SHIFT
	LAS	/LOAD AC SWITCHES
	XX	/SHIFT SWITCH INTO AC0
	SPA!CLA	/SKIP ON SWITCH DOWN
	CMA	/SWITCH UP - RSAC=TRUE
	JMP* RSAC
ERROR	CLA	/ILLEGAL SWITCH NUMBER
	JMP* RSAC
SWITCH
	.END
