.TITLE DATE Get and convert (ASCII format) system's date ;+ ; DATE is a fortran callable routine to get the system date and ; return it in ASCII dd-mmm-yy format. ; ; Input parameter: none ; Output parameter: datstr (logical*1 strng(9)) ; ; The calling sequence is: ; CALL DATE (datstr) ; ; Actions: ; Calls IDATE to get the system date. IDATE returns the ; month, day, and year in R0, R1, and R2 respectively. ; ; Calls $DAT$ to convert the month, day, and year in ; R0, R1, and R2 to an ASCII string in dd-mmm-yy format. ; On return, R0 through R4 are destoyed. ;- .DATE==1 .PSECT SYS$I I,LCL,REL,CON .GLOBL IDATE $DAT$ DATE:: TST (R5)+ ; ignore parameter count MOV (R5),R0 ; copy date string buffer address .rept 3 TST -(SP) ; free room on the stack MOV SP,(SP) ; for year, month, day address .endr MOV #3,-(SP) ; set up argument count MOV SP,R5 ; load parameter address pointer MOV R0,-(SP) ; save register CALL IDATE ; get system date in 3 integer format MOV (SP)+,R5 ; restore register, R0 --> ASCII buffer ADD #10,SP ; bump stack CALL $DAT$ ; convert and store result RETURN .END