	.TITLE LTCH
	.GLOBL LTCH,%START,%ENTER
/LOAD TIMER CONTINUOUSLY AND SET HANDLER SUBROUTINE
/EXECUTION TIME:  85 TO 100 MICROSECONDS
/CALLING SEQUENCE:  CALL LTCH(TIME,HANDLER,ERROR)
/   TIME:  POSITIVE INTEGER CLOCK INTERVAL
/          (IN UNITS OF 16 2/3 MILLISECONDS)
/   HANDLER:  PARAMETERLESS FORTRAN IV SUBROUTINE NAME
/             (CLOCK INTERRUPT HANDLER)
/   ERROR=0:  NO ERROR
/        =1:  TIME NOT > 0
LTCH	0
	ISZ LTCH
	LAC* LTCH
	DAC TIME
	SPA
	LAC* TIME	/INDIRECT
	DAC TIME	/INTERVAL LOCATION
	ISZ LTCH
	LAC* LTCH
	DAC HANDLER
	SPA
	LAC* HANDLER	/INDIRECT
	DAC HANDLER	/USER SUBROUTINE
	ISZ LTCH
	LAC* LTCH
	DAC ERROR
	SPA
	LAC* ERROR	/INDIRECT
	DAC ERROR
	DZM* ERROR	/ERROR=0
	ISZ LTCH	/BUMP TO EXIT
	LAC* TIME
	SPA!SNA
	JMP ERROR1	/TIME NOT > 0
	JMS* %START	/START THE CLOCK
	LAC* TIME	/DESIRED INTERVAL
	DAC TIME
	LAC TIME
	JMS* %ENTER	/NOTIFICATION REQUEST
	CLOCK
	JMP* LTCH
CLOCK	0
	LAC TIME	/EVERY DESIRED INTERVAL
	JMS* %ENTER	/REQUEST NOTIFICATION AGAIN
	CLOCK
	JMS* HANDLER	/TO USER
	JMP* CLOCK
ERROR1	ISZ* ERROR	/ILLEGAL TIME REQUESTED
	JMP* LTCH
TIME
HANDLER
ERROR
	.END
