.MCALL .MODULE .MODULE GTIM,VERSION=04,COMMENT=,IDENT=No,LIB=Yes ; Copyright (c) 1998 by Mentec, Inc., Nashua, NH. ; All rights reserved ; ; This software is furnished under a license for use only on a ; single computer system and may be copied only with the ; inclusion of the above copyright notice. This software, or ; any other copies thereof, may not be provided or otherwise ; made available to any other person except for use on such ; system and to one who agrees to these license terms. Title ; to and ownership of the software shall at all times remain ; in Mentec, Inc. ; ; The information in this document is subject to change without ; notice and should not be construed as a commitment by Digital ; Equipment Corporation, or Mentec, Inc. ; ; Digital and Mentec assume no responsibility for the use or ; reliability of its software on equipment which is not supplied ; by Digital or Mentec, and listed in the Software Product ; Description. .SBTTL Module Declaration .NLIST .ENABL LC .DSABL GBL .NLIST CND .LIST ; ++ ; FACILITY: ; ; RT-11 System Subroutine Library ; ; CALLABLE ENTRIES: ; ; GTIM ; ; ENVIRONMENT: ; ; This routine can be used by any job running in a single-job or ; multi-job environment . It uses "TRAP" to provide error processing. ; ; ; INCLUDE FILES: ; ; SYSMAC.SML ; RT-11 system macro library. .MCALL .GTIM ; GTIM programmed request. ; ; EXTERNAL REFERENCES: ; .GLOBL $SYSLB ; Include system library work area. .GLOBL $NXADR ; Entry point to next address rouitne .WEAK $MSARG ; Trap code for missing argument .SBTTL GTIM - Fortran-callable routines ; ++ ; FUNCTIONAL DESCRIPTION: ; ; GTIM routine returns current time of day. The time is returned ; in two words and is given in terms of clock ticks past midnight. If ; the system doesn't have a clock, a value of 0 is returned. If an ; RT-11 monitor TIME command has not be entered, the value returned is ; time elapsed since the system was bootsrapped. ; ; CALLING SEQUENCE: ; ; CALL GTIM( itime ) ; ; INPUT PARAMETERS: ; ; R5 - address of GTIM's argument block ; ; 0(R5) - argument count of GTIM call ; 2(R5) - address of two-word area to receive time of day ; ; ; OUTPUT PARAMETERS: ; ; itime - two-word area load with current system time ; word 1 - high-order time ; word 2 - low-order time ; ;-- .PSECT SYS$I GTIM:: MOV (R5)+,R4 ; R4 (low byte) contains argument count CALL $NXADR ; Get 'itime' address BCS 10$ ; If CS, error - 'itime' arg wasn't supplied MOV R0,-(SP) ; SP <- address of area to receive system time TST -(SP) ; Allocate space for GTIM's argument block. .GTIM SP ; Retrieve current system time (if available). CMP (SP)+,(SP)+ ; Purge stack of argument block. RETURN ; Return to caller with junk in R0 10$: TRAP $MSARG ; Handle any missing arguments in call RETURN .END