.TITLE SETTER - TCU-50 SET ROUTINES .IDENT /V02.00/ .ENABL LC .SBTTL Program Description ; ; Macro subroutines to set TCU-50 clock. ; ; Called from FORTRAN by: ; ; CALL MONDAY(ARG) ; ; CALL HORMIN(ARG) ; ; where ARG is built to satisfy the ; TCU-50 register format for month and day ; and for hour and minute. Seconds are ; always set to zero by this process. ; ; ; J. R. Cutler ; Space Physics Research Laboratory ; University of Michigan ; Ann Arbor, Michigan 48105 ; ; Under NASA contracts NAS5-25002, NAS5-25031, and NAS5-24296 .SBTTL Globals and Definitions ; ; ; You MUST define this for your system! ; TCUBAS =170770 ; address strapped on TCU-50 ; ; ; ; TCU-50 Register Definitions ; MODAY =TCUBAS HRMIN =TCUBAS+2 SECONDS =TCUBAS+4 STATUS =TCUBAS+6 ; ; Entry Points ; .GLOBL MONDAY,HORMIN,TCUBAS .SBTTL TCU-50 Set Procedure (Both Entries) .ENABL LSB MONDAY: MOV #MODAY,R1 ; month and day address BR 1$ HORMIN: MOV #HRMIN,R1 ; hour and minute address 1$: MOV (R5)+,R0 ; I'm ignoring argument count MOV (R5),R0 ; R0 now has pointer to ARG MOV (R0),R0 ; Now R0 has ARG MOV #SECONDS,R2 ; will write seconds to stop clock 2$: MOV R0,(R1) ; Start fast clock 3$: CMP (R1),R0 ; Check for done BNE 3$ ; Not done yet MOV R0,(R2) ; Stop fast clock CMP (R1),R0 ; Check for accuracy BNE 2$ ; Do it again RTS PC ; Back to call .DSABL LSB .END