.TITLE GTDATA .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 GTDATA (DATE [,STATUS]) ; or ; STATUS = GTDATA (DATE) ; ; or ; CALL GTDATA from MACRO-11 with ; R5 = 0 ; R4 = Address of DATE for output ; R0 = STATUS on output ; ; Where: ; DATE = ASCII Date in form DD-MMM-YY ; 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 ; ; ; GTDATA:: 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 CDATIA ; Convert Date to ASCII ; END: RETURN ; .END