.TITLE CDATIW .IDENT /V01/ .ENABLE LC ; ; 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 30-Jun-80 Phil Stephensen-Payne ; ; Calling Sequence: ; ; This subroutine is called via the standard FORTRAN calling sequence as: ; ; CALL CDATIW (DAY,MONTH,YEAR,WEKDAY [,STATUS]) ; or ; STATUS = CDATIW (DAY,MONTH,YEAR,WEKDAY) ; or ; CALL CDATIW from MACRO-11 (with R5=0) ; ; Where: ; DAY = Number of day (1-31) (R1 for MACRO calls) ; MONTH = Number of month (1-12) (R2 for MACRO calls) ; YEAR = Year since 1950 (1950=0) (R3 for MACRO calls) ; WEKDAY = Weekday Number (Sunday=0) (R1 for MACRO calls) ; STATUS = Optional error return ; ; Errors returned: ; ; STATUS = 0 if the operation was successful ; = -1 if a parameter error was detected ; = -2 if an invalid input date was specified ; ; External references: ; ; This module calls the subroutines DISP1,GETI,PUTW,CDATID,CDATDW ; ; ; CDATIW:: MOV #5,R0 ; Thissun needs five parameters CALL DISP1 ; Call the dispatcher .WORD GETI ; Get Type I .WORD CDATID ; Convert to Type D .WORD CDATDW ; Convert that to Type W .WORD PUTW ; And store W .END