FORTRAN IV V02.04 Mon 20-Nov-78 16:25:30 PAGE 001 0001 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 0002 DIMENSION IPROG(4) 0003 DATA IPROG /3RSY0,3RHEL,3RLO ,3RSAV/ C 0004 100 TYPE 101 0005 101 FORMAT (' Hi there. Please enter the month',/ 1' as a number:') 0006 102 ACCEPT 500,IMONTH 0007 IF ( IMONTH .LT. 1 .OR. IMONTH .GT. 12 ) GOTO 110 0009 GOTO 200 0010 110 TYPE 111 0011 111 FORMAT (' Which month is that?') 0012 GOTO 102 C 0013 200 TYPE 201 0014 201 FORMAT (' Now tell me the day:') 0015 202 ACCEPT 500,IDATE 0016 IF ( IDATE .LT. 1 .OR. IDATE .GT. 31 ) GOTO 210 0018 GOTO 300 0019 210 TYPE 211 0020 211 FORMAT (' Is that really a day number? Try again:') FORTRAN IV V02.04 Mon 20-Nov-78 16:25:30 PAGE 002 0021 GOTO 202 C 0022 300 TYPE 301 0023 301 FORMAT (' Now enter the hour:') 0024 302 ACCEPT 500,IHOUR 0025 IF ( IHOUR .LT. 0 .OR. IHOUR .GT. 23 ) GOTO 310 0027 GOTO 400 0028 310 TYPE 311 0029 311 FORMAT (' Sounds suspicious to me.',/ 1' Please try something different:') 0030 GOTO 302 C 0031 400 TYPE 401 0032 401 FORMAT (' Lastly, give me the minute:') 0033 402 ACCEPT 500,IMIN 0034 IF ( IMIN .LT. 0 .OR. IMIN .GT. 59 ) GOTO 410 0036 GOTO 600 0037 410 TYPE 411 0038 411 FORMAT (' Now tell me the REAL minute:') 0039 GOTO 402 C 0040 500 FORMAT (I2) C 0041 600 TYPE 601 0042 601 FORMAT (' ',/' Thank you. - Wait one.',/,/,/) C 0043 CALL MONDAY( IMONTH * 256 + IDATE ) 0044 CALL HORMIN( IHOUR * 256 + IMIN ) C 0045 CALL CHAIN (IPROG,,0) C 0046 STOP ' HERE I AM!' C C 0047 END FORTRAN IV Storage Map for Program Unit SETCLK Local Variables, .PSECT $DATA, Size = 000024 ( 10. words) Name Type Offset Name Type Offset Name Type Offset IDATE I*2 000012 IHOUR I*2 000014 IMIN I*2 000016 IMONTH I*2 000010 Local and COMMON Arrays: Name Type Section Offset ------Size----- Dimensions IPROG I*2 $DATA 000000 000010 ( 4.) (4) Subroutines, Functions, Statement and Processor-Defined Functions: Name Type Name Type Name Type Name Type Name Type CHAIN R*4 HORMIN R*4 MONDAY I*2