.TITLE SETTIT - TCU-100 SET ROUTINES .IDENT /V02.00/ .ENABL LC .SBTTL Program Description ; ; Macro subroutines to set TCU-100 clock. ; ; Called from FORTRAN by: ; ; CALL MONDAY(ARG) ; ; CALL HORMIN(ARG) ; ; where ARG is built to satisfy the ; TCU-100 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-100 ; ; ; ; TCU-100 Register Definitions ; MODAY =TCUBAS HRMIN =TCUBAS+2 SECONDS =TCUBAS+4 STATUS =TCUBAS+6 ; ; Entry Points ; .GLOBL MONDAY,HORMIN,TCUBAS .SBTTL TCU-100 Set Procedure (Both Entries) .ENABL LSB MONDAY: MOV #MODAY,R1 ; month and day address BR 1$ HORMIN: MOV #HRMIN,R1 ; Hour and minute register 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 ADD #40100,R0 ; Add set enable constant MOV R0,(R1) ; Initiate the set 2$: TSTB @#STATUS ; Check for done BPL 2$ ; Not done yet RTS PC ; Back to call .DSABL LSB .END