PROGRAM CLOCKS C C This program will enable the user to turn the Line Frequensy C Clock on or off easily. To run enter : C C >RUN CLOCKS/CMD="OPT" C C Where OPT is either START or STOP. C C CLOCKS stops the Line Frequency Clock by using the routine C STOPIT in LBAWORK.MAC to clear the Interupt Enable bit of the C Clock Status Register. C C CLOCKS starts the Line Frequency Clock by using the routine C STARIT in LABWORK.MAC to set the Interupt Enable bit of the C Clock Status Register. It then gets the correct time from our C systems TCU-150 time keeper and sets the Line Clock. If your C system does not have a TCU-150 then you can modify this program C to ask for the proper time and then modify the routine STARIT C to use the user passed information set the Clock. If you do C have a TCU-150 then please check the module DEFINE in LABWORK.MAC C for the proper Register definitions. C C Author : Richard A. Crawford C E-Systems Inc. C P.O. Box 1056 CBN-27 C Greenville, Texas 75401 C (214) 457-6018 C C Date : January 19, 1984 C BYTE MCRLIN(80) CHARACTER*1 ANS CHARACTER*80 CHAR INTEGER ARRAY(6) LOGICAL*1 STOPP, START EQUIVALENCE ( MCRLIN , CHAR ) DATA STOPP, START/ .FALSE. , .FALSE. / C C Suppress End-of-File Message : C CALL ERRSET(24,.TRUE.,.FALSE.,.TRUE.,.FALSE.,15) C C Get the MCR Command Line : C CALL GETMCR(MCRLIN,IDS) C C Decode the Command Line : C IF(IDS.GT.0)THEN DO 100 I=1,75 IF(CHAR(I:I+4).EQ.'START')THEN START = .TRUE. GOTO 200 ELSE IF(CHAR(I:I+3).EQ.'STOP')THEN STOPP = .TRUE. GOTO 200 END IF 100 CONTINUE WRITE(5,*)'Command Line Not Recognized' END IF C C If the Command Line not found or understood the ask what to do : C WRITE(5,120) 110 READ(5,130,END=500)ANS 120 FORMAT(1X,$'Do you want to Start(1) or Stop(2) the Clock : ') 130 FORMAT(A1) IF(ANS.EQ.'1')THEN START = .TRUE. ELSE IF(ANS.EQ.'2')THEN STOPP = .TRUE. ELSE WRITE(5,140) GOTO 110 140 FORMAT(1X,$'Please enter 1 or 2 : ') END IF C C Now Start or Stop the Line Frequency Clock : C 200 CONTINUE IF(START)THEN !Start the Line Frequency Clock CALL STARIT(ARRAY) WRITE(5,210)(ARRAY(I),I=4,6),ARRAY(2),ARRAY(3),ARRAY(1) 210 FORMAT(1X,'The time is now ',I2.2,':',I2.2,':',I2.2,' on ' 1 ,I2.2,'/',I2.2,'/',I2.2) ELSE IF(STOPP)THEN !Stop the Line Frequency Clock CALL STOPIT WRITE(5,*)'The systems line clock is now stopped' END IF C C Take care of ^Z input responses : C 500 WRITE(5,*)' CLOCKS -- EXITING ' CALL EXIT END