PROGRAM SETCLK C C A program to set the TCU-50 clock by C building the required arguments for C the device month and day register and C for the device hour and minute register C and then calling MACRO routines to do C the actual set. C C This program asks for the date and C time, calls MONDAY to set the TCU C date word, calls HORMIN to set the C TCU hour and minute word (thereby C zeroing the seconds word) and then C chains to HELLO.SAV which will then C set the system clock from the TCU-50. C C C CALL formats: C C CALL MONDAY(MODAY) where MODAY = MON * 256 + DAY C C CALL HORMIN(HRMIN) where HRMIN = HOUR * 256 + MINUTE C C C Chip M and Jim C C Space Physics Research Laboratory C University of Michigan C Ann Arbor, Michigan 48105 C C Supported in part by NASA contracts NAS5-24296, C NAS5-25002, and NAS5-25031. C C DIMENSION IPROG(4) DATA IPROG /3RSY0,3RHEL,3RLO ,3RSAV/ C 100 TYPE 101 101 FORMAT (' Hi there. Please enter the month',/ 1' as a number:') 102 ACCEPT 500,IMONTH IF ( IMONTH .LT. 1 .OR. IMONTH .GT. 12 ) GOTO 110 GOTO 200 110 TYPE 111 111 FORMAT (' Which month is that?') GOTO 102 C 200 TYPE 201 201 FORMAT (' Now tell me the day:') 202 ACCEPT 500,IDATE IF ( IDATE .LT. 1 .OR. IDATE .GT. 31 ) GOTO 210 GOTO 300 210 TYPE 211 211 FORMAT (' Is that really a day number? Try again:') GOTO 202 C 300 TYPE 301 301 FORMAT (' Now enter the hour:') 302 ACCEPT 500,IHOUR IF ( IHOUR .LT. 0 .OR. IHOUR .GT. 23 ) GOTO 310 GOTO 400 310 TYPE 311 311 FORMAT (' Sounds suspicious to me.',/ 1' Please try something different:') GOTO 302 C 400 TYPE 401 401 FORMAT (' Lastly, give me the minute:') 402 ACCEPT 500,IMIN IF ( IMIN .LT. 0 .OR. IMIN .GT. 59 ) GOTO 410 GOTO 600 410 TYPE 411 411 FORMAT (' Now tell me the REAL minute:') GOTO 402 C 500 FORMAT (I2) C 600 TYPE 601 601 FORMAT (' ',/' Thank you. - Wait one.',/,/,/) C CALL MONDAY( IMONTH * 256 + IDATE ) CALL HORMIN( IHOUR * 256 + IMIN ) C CALL CHAIN (IPROG,,0) C STOP ' HERE I AM!' C C END