.MCALL .MODULE .MODULE JTIME,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 Declarations .NLIST .ENABL LC .DSABL GBL .NLIST CND .LIST ; ++ ; FACILITY: ; ; RT-11 System Subroutine Library (SYSLIB) ; ; CALLABLE ENTRIES: ; ; JTIME ; ; 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. ; ; EXTERNAL REFERENCES: .GLOBL $GVAL ; Entry point to $GVAL routine - to return ; monitor fixed offset location .GLOBL $SYSLB ; Include system library work area. .GLOBL $TIME$ ; Entry point to TIMCNV - time conversion ; routine .SBTTL JTIME - Fortran-callable Routine ; ++ ; FUNCTIONAL DESCRIPTION: ; ; The JTIME routine converts the time specified to a two-word internal ; format time. ; ; CALLING SEQUENCE: ; ; CALL JTIME( hrs, min, sec, tick, time ) ; ; INPUT PARAMETERS: ; ; R5 - address of JTIME's argument block ; ; 0(R5) - argument count of JTIME call ; 2(R5) - address of integer no. of hours ; 4(R5) - address of integer no. of minutes ; 6(R5) - address of integer no. of seconds ; 10(R5) - address of integer no. of ticks ; 12(R5) - address of two-word area to receive internal format time ; ; ; OUTPUT PARAMETERS: ; ; time - converted internal format time ; ; -- .PSECT SYS$I JTIME:: ; Entry point to JTIME routine. TST (R5)+ ; Skip JTIME's argument count. CALL $TIME$ ; Convert specified time to internal format ; (result returned in R0 & R1). MOV @R5,R5 ; R5 <- address of two-word internal time. MOV R0,(R5)+ ; Return high-order word of internal time. MOV R1,@R5 ; Return low-order word of internal time. RETURN ; Return to caller. .SBTTL TIMCNV - Time conversion service rouitne ; ; It takes next 4 arguments from argument list and builds ; a two-word integer time in (r0,r1). ; Destroys R0,R1,R2,R3,R4 updates R5 beyond TIME arguments ; Called by: CALL $TIME$ ; $TIME$::CLR R0 ;CLEAR HIGH-ORDER TIME MOV @(R5)+,R1 ;AND INIT LOW ORDER TO HOURS MOV #60.,R4 ;SET MULTIPLIER JSR PC,MULAD JSR PC,MULAD MOV R0,-(SP) MOV #300,R0 CALL $GVAL BIT #40,R0 ;50 OR 60 CYCLE CLOCK? BEQ 10$ ;BRANCH IF 60 CYCLE MOV #50.,R4 10$: MOV (SP)+,R0 ;RESTORE IT MULAD: MOV R4,-(SP) ;COPY R4 MOV R0,R2 MOV R1,R3 CLR R0 CLR R1 10$: ROR @SP ;MULTIPLY ROUTINE FROM JMUL BCC 20$ ADD R3,R1 ADC R0 ADD R2,R0 TST @SP 20$: BEQ 30$ ASL R3 ROL R2 BR 10$ 30$: TST (SP)+ ADD @(R5)+,R1 ADC R0 RETURN ;RETURN WITH (R0,R1) SET .END