	.TITLE	SLMO
/
/  7 MAR 72 - MOD BY P. HENDERSON
/
/SET LOGIC MODE SUBROUTINE
/EXECUTION TIME: 91 (RUN), 92 (CLEAR),
/                 OR 93 (STOP) MICROSECONDS
/CALLING SEQUENCE: CALL SLMO(MODE,ERROR)
/     MODE: 1=RUN,2=STOP,3=CLEAR
/     ERROR=0: NO ERROR
/          =1: ILLEGAL MODE REQUESTED
/          =2: MODE FAILED TO SET PROPERLY
/
	.GLOBL	SLMO,%RLMO
/
SLMO	XX
	.ARG	SLMO
	DAC MODE    /MODE LOCATION
	.ARG
	DAC ERROR   /ERROR LOCATION
	DZM* ERROR  /ZERO ERROR CODE
	LAC* MODE
	SNA
	JMP ERROR1  /MODE=0
	AND (777774
	SZA
	JMP ERROR1  /MODE<0 OR MODE>3
	LAC* MODE
	CLL!RAR
	RTR
	RTR
	RTR
	RTR
	IOT3
	JMP .-1
	SLM		/SET LOGIC MODE
	LAC	(RMODE	/CALL WITH ARGUMENT ADDRESS IN AC
	JMS*	%RLMO   /READ LOGIC MODE
	LAC RMODE
	SAD* MODE
	JMP* SLMO   /LOGIC MODE OK
	LAC (2      /FAILED TO SET 
	DAC* ERROR
	JMP* SLMO
ERROR1	ISZ* ERROR  /ILL. MODE REQUESTED
	JMP* SLMO
ERROR
MODE
RMODE
IOT3=703003
SLM=705226
	.END
