	.TITLE	STCO
/
/  7 MAR 72 - MOD BY P. HENDERSON
/
/SET TIME CONSTANT SUBROUTINE
/EXECUTION TIME: 99(N,SEC),103(N,MS),
/                104(F,SEC), OR 108(F,MS)
/                MICROSECONDS
/CALLING SEQUENCE: CALL STCO(TIME,ERROR)
/     TIME=0: N,SEC (X1)
/         =1: F,SEC (X10)
/         =2: N,MS (X1000)
/         =3: F,MS (X10000)
/     ERROR=0: NO ERROR
/          =1: ILLEGAL TIME CONSTANT 
/              REQUESTED
/          =2: TIME CONSTANT FAILED 
/             TO SET PROPERLY
/
	.GLOBL	STCO,%RTCO
/
STCO	XX
	.ARG	STCO
	DAC TIME    /TIME CONSTANT LOC.
	.ARG
	DAC ERROR   /ERROR LOCATION
	DZM* ERROR  /ZERO ERROR CODE
	LAC* TIME
	AND (777774
	SZA
	JMP ERROR1  /ILL. TIME CONSTANT
	LAC* TIME
	RTR
	SPA!CLA
	LAC (002000 /FAST
	IOT3        /NORMAL
	JMP .-1
	TCNF        /SET TIME CONSTANT
	              /NORMAL OR FAST
	SZL!CLA
	LAC (002000 /MS
	IOT3        /SEC
	JMP .-1
	TCSM        /SET TIME CONSTANT
	              /SEC OR MS
	LAC	(RTIME	/CALL WITH ARGUMENT ADDRESS IN AC
	JMS*	%RTCO   /READ TIME CONSTANT
	LAC RTIME
	SAD* TIME
	JMP* STCO   /TIME CONSTANT OK
	LAC (2      /FAILED TO SET 
	DAC* ERROR
	JMP* STCO
ERROR1	ISZ* ERROR  /ILL. TIME CONSTANT 
	JMP* STCO
ERROR
TIME
RTIME
IOT3=703003
TCNF=705026
TCSM=705126
	.END
