

                22-Aug-1978 02:48:55	VAX-11 FORTRAN IV-PLUS V1.0-2      Page 1   

					TIMCMP.FOR.7        



0001    	INTEGER*4 FUNCTION TIMCMP(A,B)

         

        C

        C	EQUATED SYMBOLS:

        C

        C			None.

        

        C

        C	INCLUDED FILES:

        C

        C			None.

         

        C

        C	OWN STORAGE:

        C

        C			None.

         

        C++

        C

        C	FUNCTIONAL DESCRIPTION:

        C

        C

        C	INTEGER*4 FUNCTION TIMCMP is used to compare two VAX/VMS

        C	absolute time values.  Each time value is a binary number

        C	in 100-nanosecond units offset from the system base date

        C	and time, which is 17-NOV-1858 00:00:00.0.   Each absolute

        C	time is a positive value.

        C

         

        C

        C	FORMAL PARAMETERS:

        C

0002    	INTEGER*4	A(0:1)

0003    	INTEGER*4	B(0:1)

         

        C

        C	IMPLICIT INPUTS:

        C

        C				None.

         

        C

        C	IMPLICIT OUTPUTS:

        C

        C	If A > B then a positive number is returned.

        C

        C	If A = B then 0 is returned.

        C

        C	If A < B then a negative number is returned.

        C

         

        C

        C	SIDE EFFECTS:

        C

        C				None.

        C--

         



TIMCMP          22-Aug-1978 02:48:55	VAX-11 FORTRAN IV-PLUS V1.0-2      Page 2   

					TIMCMP.FOR.7        



         

0004    	TIMCMP	= A(1) - B(1)

         

0005    	IF(TIMCMP .NE. 0)  RETURN

         

0006    	IF(IAND(IEOR(A(0),B(0)),'80000000'X) .EQ. 0)

        	1	THEN

0007    			TIMCMP = A(0) - B(0)

0008    		ELSE

0009    			TIMCMP = B(0)

0010    	ENDIF

         

0011    	RETURN

         

0012    	END



TIMCMP          22-Aug-1978 02:48:55	VAX-11 FORTRAN IV-PLUS V1.0-2      Page 3   

					TIMCMP.FOR.7        



		.TITLE	TIMCMP

		.IDENT	01



    0004	.PSECT	$LOCAL

    0004	.LONG	^X04080004

    0008	.LONG	^X00000000

    000C	.LONG	^X01200000,^X00000008

    0014	.LONG	^X00000000

    0018	.LONG	^X04080004

    001C	.LONG	^X00000000

    0020	.LONG	^X01200000,^X00000008

    0028	.LONG	^X00000000



    0000	.PSECT	$CODE

    0000  TIMCMP::

    0000	.WORD	^M<IV,R9,R10,R11>

    0002	MOVAL	$LOCAL+^X4, R11

    0009	MOVL	A(AP), $LOCAL+^X8(R11)

    000E	MOVL	A(AP), $LOCAL+^X14(R11)

    0013	MOVL	B(AP), $LOCAL+^X1C(R11)

    0018	MOVL	B(AP), $LOCAL+^X28(R11)

									    ; 0004

    001D	MOVAL	@$LOCAL+^X14(R11), R10

    0021	MOVAL	@$LOCAL+^X28(R11), R9

    0025	SUBL3	4(R9), 4(R10), TIMCMP(R11)

									    ; 0005

    002C	BEQL	L$IAHE

    002E	MOVL	TIMCMP(R11), R0

    0032	RET	

    0033  L$IAHE:

									    ; 0006

    0033	XORL3	(R9), (R10), R0

    0037	BITL	R0, #^X80000000

    003E	BNEQ	L$IANE

									    ; 0007

    0040	SUBL3	(R9), (R10), TIMCMP(R11)

									    ; 0008

    0045	BRB	L$IADH

    0047  L$IANE:

									    ; 0009

    0047	MOVL	(R9), TIMCMP(R11)

									    ; 0010

    004B  L$IADH:

									    ; 0011

    004B	MOVL	TIMCMP(R11), R0

    004F	RET	

		.END



TIMCMP          22-Aug-1978 02:48:55	VAX-11 FORTRAN IV-PLUS V1.0-2      Page 4   

					TIMCMP.FOR.7        



PROGRAM SECTIONS



    Name                 Bytes   Attributes



  0 $CODE                   80   PIC CON REL LCL   SHR   EXE   RD NOWRT LONG

  2 $LOCAL                  44   PIC CON REL LCL NOSHR NOEXE   RD   WRT LONG





ENTRY POINTS



    Address  Type Name           



  0-00000000  I*4 TIMCMP         





ARRAYS



    Address  Type Name		       Bytes  Dimensions



 AP-00000004@ I*4 A                        8  (0:1)

 AP-00000008@ I*4 B                        8  (0:1)





Total Space Allocated = 124 Bytes





COMPILER OPTIONS



/CHECK=(NOBOUNDS,OVERFLOW)

/DEBUG=(NOSYMBOLS,TRACEBACK)

/OPTIMIZE  /WARNINGS  /I4  /NOD_LINES  

