.TITLE GTDATD .IDENT /V01/ .ENABLE LC .MCALL GTIM$S ; ; This module forms part of the suite of Date Routines returning the ; current date in one of the following forms, or converting one form to ; another. ; Form I - Day, Month & Year since 1950 as 3 byte values ; Form A - ASCII DD-MMM-YY ; Form D - Integer*2 days since 1st January 1950 ; Form E - Integer*2 encoded date ; Form W - Weekday Number (0 = Sunday) ; ; Author: V01 15-Jul-80 Phil Stephensen-Payne ; ; Calling Sequence: ; ; This subroutine is called via the standard FORTRAN calling sequence as: ; ; CALL GTDATD (DAYS [,STATUS]) ; or ; STATUS = GTDATD (DAYS) ; ; or ; CALL GTDATD from MACRO-11 with ; R5 = 0 ; R1 = DAYS on output ; R0 = STATUS on output ; ; Where: ; DAYS = Number of days since 1/1/50 (1/1/50=1) ; STATUS = Optional error return ; ; Errors returned: ; ; STATUS = 0 if the operation was successful ; = -1 if a parameter error was detected ; ; External references: ; ; This module calls the subroutines PRMCHK ; ; ; GTDATD:: TST R5 ; Called directly from MACRO-11? BEQ 10$ ; If eq yes - omit PRMCHK ; ; Specify number of parameters including error return. R5 not affected. ; MOV #2,R0 ; Check Number of Parameters CALL PRMCHK ; BCS END ; If CS parameter error - exit at once MOV (R5)+,PRM ; Set up dummy parameter block ADD #3,PRM ; MOV (R5)+,PRM+8. ; MOV (R5)+,PRM+10. ; MOV #PRM,R5 ; ; 10$: MOV R5,-(SP) ; Save R5 CLR R5 ; Do a MACRO-call to GTDATI CALL GTDATI ; MOV (SP)+,R5 ; Restore R5 JMP CDATID ; Convert Date to ASCII ; END: RETURN ; .END