.TITLE IDATE ;+ ; IDATE is a fortran callable routine to get the system date and ; convert it to month, day and year integer codes as follows: ; ; month is a 0 > month <= 12 INTEGER*2 value ; day is a 0 > day <= 31 INTEGER*2 value ; year is a 71 > year <= 103 INTEGER*2 value ; ; Input parameter: none ; Output parameters: month, day, year (Integer*2) ; ; Errors: none ; ; The calling sequence is: ; CALL IDATE ( month , day , year ) ; ; Actions: ; Calls GDATE to get the system date in internal INTEGER*2 ; format. ; ; Calls $DATI to convert internal format to month, day, and ; year. ; ; On return, R0 through R4 are destroyed. ;- .IDATE==1 .PSECT SYS$I I,LCL,REL,CON .GLOBL GDATE, $DATI IDATE:: TST (R5)+ ; ignore parameter count MOV R5,-(SP) ; save actual parameter pointer TST -(SP) ; free one word on stack MOV SP,@SP ; for address of date value MOV #1,-(SP) ; load argument count MOV SP,R5 ; set up parameter pointer CALL GDATE ; get system date CMP (SP)+,(SP)+ ; clean stack CALL $DATI ; convert date value to three words MOV (SP)+,R5 ; restore parameter pointer MOV R0,@(R5)+ ; copy month MOV R1,@(R5)+ ; copy day MOV R2,@(R5)+ ; copy year RETURN .END