.TITLE ITIME ;+ ; ITIME is a fortran callable routine to get the system time and ; return it as hours, minutes, seconds, and ticks. ; ; Input parameter: none ; Output parameters: hours, minutes, seconds, ticks (Integer*2) ; i (<> 0 if no LTC on system) ; ; The calling sequence is: ; CALL ITIME ( hours , minutes , seconds , ticks [, i] ) ; ; Actions: ; Use the .GTIM EMT to get the time. Call CVTIM to convert ; the time to hours, minutes, seconds, and ticks. ; R0 through R4 are destroyed. ;- .ITIME==1 .PSECT SYS$I I,LCL,REL,CON .MCALL .GTIM .GLOBL CVTTIM ITIME:: TST (R5)+ ; ignore parameter count CMP -(SP),-(SP) ; room for coded time words MOV SP,R4 ; save this position as pointer CMP -(SP),-(SP) ; make room for four words CMP -(SP),-(SP) ; on stack MOV SP,R0 ; R4 --> data pointer .rept 4 ; copy hrs, min, sec, tick on stack MOV (R5)+,(R0)+ ; in that order .endr CMP -(SP),-(SP) ; make room for EMT area .GTIM SP,R4 ; get time of day MOV R4,2(SP) ; set up address of time words MOV #5,@SP ; set up parameter count MOV SP,R5 ; load parameter pointer CALL CVTTIM ; convert values ADD #20,SP ; clean stack RETURN .END