MTH$MOD         FORTRAN MOD ROUTINES                             21-AUG-1978 19:07:40   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (2)     100  HISTORY		; Detailed Current Edit History

   (3)     100  DECLARATIONS

   (4)     100  MTH$MOD

   (5)     100  MTH$JMOD

MTH$MOD         FORTRAN MOD ROUTINES                             21-AUG-1978 19:07:40   VAX-11 MACRO X0.3-11               Page   1

0-3                                                                                                                              (1)



                                     0000   100 	.TITLE	MTH$MOD		FORTRAN MOD ROUTINES

                                     0000   200 	.IDENT	/0-3/		; File: MTHMOD.MAR

                                     0000   300 

                                     0000   400 ;

                                     0000   500 ; Copyright (C) 1977

                                     0000   600 ; Digital Equipment Corporation, Maynard, Massachusetts 01754

                                     0000   700 ;

                                     0000   800 ; This software is furnished under a license for use only on a single

                                     0000   900 ; computer  system  and  may be copied only with the inclusion of the

                                     0000  1000 ; above copyright notice. This software, or any other copies thereof,

                                     0000  1100 ; may not be provided or otherwise made available to any other person

                                     0000  1200 ; except for use on such system and to one who agree to these license 

                                     0000  1300 ; terms.  Title to  and  ownership of the software shall at all times 

                                     0000  1400 ; remain in DEC.

                                     0000  1500 ;

                                     0000  1600 ; The information in the software is subject to change without notice

                                     0000  1700 ; and should  not  be construed  as a commitment by Digital Equipment 

                                     0000  1800 ; Corporation.

                                     0000  1900 ;

                                     0000  2000 ; DEC assumes  no  responsibility  for the use or  reliability of its

                                     0000  2100 ; software on equipment which is not supplied by DEC.

                                     0000  2200 ;

                                     0000  2300 ;

                                     0000  2400 ; FACILITY: MATH LIBRARY

                                     0000  2500 ;++

                                     0000  2600 ; ABSTRACT:

                                     0000  2700 ;	This module contains routines IMOD and JMOD:

                                     0000  2800 ;	Return remainder after divisor.

                                     0000  2900 ;

                                     0000  3000 ;

                                     0000  3100 ;--

                                     0000  3200 ;

                                     0000  3300 ; VERSION: 0

                                     0000  3400 ;

                                     0000  3500 ; HISTORY:

                                     0000  3600 ;

                                     0000  3700 ; AUTHOR:

                                     0000  3800 ;	Jonathan M. Taylor, 11-JUL-77: Version 0

                                     0000  3900 ;

                                     0000  4000 ; MODIFIED BY:

                                     0000  4100 ;

                                     0000  4200 ;

                                     0000  4300 ;

MTH$MOD         FORTRAN MOD ROUTINES                             21-AUG-1978 19:07:40   VAX-11 MACRO X0.3-11               Page   2

0-3             HISTORY  ; Detailed Current Edit History                                                                         (2)



                                     0000   100 	.SBTTL	HISTORY		; Detailed Current Edit History

                                     0000   200 

                                     0000   300 

                                     0000   400 ; Edit History for Version 0 of MTHMOD

                                     0000   500 ;

                                     0000   600 ; 0-3	- Remove MTH$FLAG_JACKET.  TNH 5-July-78

MTH$MOD         FORTRAN MOD ROUTINES                             21-AUG-1978 19:07:40   VAX-11 MACRO X0.3-11               Page   3

0-3             DECLARATIONS                                                                                                     (3)



                                     0000   100 	.SBTTL	DECLARATIONS

                                     0000   200 

                                     0000   300 ;

                                     0000   400 ; INCLUDE FILES:

                                     0000   500 ;	oerr.mar

                                     0000   600 ;

                                     0000   700 

                                     0000   800 ;

                                     0000   900 ; EXTERNAL SYMBOLS:

                                     0000  1000 ;	NONE

                                     0000  1100 ;

                                     0000  1200 

                                     0000  1300 ;

                                     0000  1400 ; MACROS:

                                     0000  1500 ;	NONE

                                     0000  1600 ;

                                     0000  1700 

                                     0000  1800 ;

                                     0000  1900 ; PSECT DECLARATIONS:

                                 00000000  2000 	.PSECT	MTH$CODE	PIC, SHR, LONG, EXE, NOWRT

                                     0000  2100 

                                     0000  2200 ;

                                     0000  2300 ; EQUATED SYMBOLS:

                                     0000  2400 ;	NONE

                                     0000  2500 ;

                                     0000  2600 

                                     0000  2700 ;

                                     0000  2800 ; OWN STORAGE:

                                     0000  2900 ;	NONE

                                     0000  3000 ;

MTH$MOD         FORTRAN MOD ROUTINES                             21-AUG-1978 19:07:40   VAX-11 MACRO X0.3-11               Page   4

0-3             MTH$MOD                                                                                                          (4)



                                     0000   100 	.SBTTL	MTH$MOD

                                     0000   200 

                                     0000   300 ;++

                                     0000   400 ; FUNCTIONAL DESCRIPTION:

                                     0000   500 ;	Return remainder after division.

                                     0000   600 ;

                                     0000   700 ;

                                     0000   800 ; CALLING SEQUENCE:

                                     0000   900 ;	Remainder.ww.v = MTH$IMOD (dividend.rw.r, divisor.rw.r)

                                     0000  1000 ;	

                                     0000  1100 ;

                                     0000  1200 ;

                                     0000  1300 ; INPUT PARAMETERS:

                                     0000  1400 ;	The two parameters are one-word values and are call-by-reference.

                                     0000  1500 ;	

                                     0000  1600 ;

                                     0000  1700 ; IMPLICIT INPUTS:

                                     0000  1800 ;	NONE

                                     0000  1900 ;

                                     0000  2000 ; OUTPUT PARAMETERS:

                                     0000  2100 ;	NONE

                                     0000  2200 ;

                                     0000  2300 ; IMPLICIT OUTPUTS:

                                     0000  2400 ;	NONE

                                     0000  2500 ;

                                     0000  2600 ; COMPLETION CODES:

                                     0000  2700 ;	NONE

                                     0000  2800 ;

                                     0000  2900 ; SIDE EFFECTS:

                                     0000  3000 ;	Integer Overflow and Divide by Zero exceptions can occur.

                                     0000  3100 ;	

                                     0000  3200 ;

                                     0000  3300 ;--

                                     0000  3400 

                                     0000  3500 

                                     0000  3600 

                                     0000  3700 

                               4004' 0000  3800 	.ENTRY	MTH$IMOD,	^M<R2, IV> ; enable integer overflow

            50         04 BC     32  0002  4000 	CVTWL	@4(AP), R0	; R0 = divd

            01            50     7A  0006  4100 	EMUL	R0, #1, #0, R0	; R0/R1 = quadword divd

            50            00         0009       

            52         08 BC     32  000B  4200 	CVTWL	@8(AP), R2	; R2 = divr

            50            52     7B  000F  4300 	EDIV	R2, R0, R0, R0	; R0 = longword remainder

            50            50         0012       

            50            50     F7  0014  4400 	CVTLW	R0, R0		; R0 = word remainder

                                 04  0017  4500 	RET

MTH$MOD         FORTRAN MOD ROUTINES                             21-AUG-1978 19:07:40   VAX-11 MACRO X0.3-11               Page   5

0-3             MTH$JMOD                                                                                                         (5)



                                     0018   100 	.SBTTL	MTH$JMOD

                                     0018   200 

                                     0018   300 ;++

                                     0018   400 ; FUNCTIONAL DESCRIPTION:

                                     0018   500 ;	Return the remainder after division.

                                     0018   600 ;

                                     0018   700 ;

                                     0018   800 ; CALLING SEQUENCE:

                                     0018   900 ;	Remainder.wl.v = MTH$JMOD (dividend.rl.r, divisor.rl.r)

                                     0018  1000 ;	

                                     0018  1100 ;

                                     0018  1200 ;

                                     0018  1300 ; INPUT PARAMETERS:

                                     0018  1400 ;	The two parameters are longword values and are call-by-reference.

                                     0018  1500 ;	

                                     0018  1600 ;

                                     0018  1700 ; IMPLICIT INPUTS:

                                     0018  1800 ;	NONE

                                     0018  1900 ;

                                     0018  2000 ; OUTPUT PARAMETERS:

                                     0018  2100 ;	NONE

                                     0018  2200 ;

                                     0018  2300 ; IMPLICIT OUTPUTS:

                                     0018  2400 ;	NONE

                                     0018  2500 ;

                                     0018  2600 ; COMPLETION CODES:

                                     0018  2700 ;	NONE

                                     0018  2800 ;

                                     0018  2900 ; SIDE EFFECTS:

                                     0018  3000 ;	NONE

                                     0018  3100 ;

                                     0018  3200 ;--

                                     0018  3300 

                                     0018  3400 

                               4004' 0018  3500 	.ENTRY	MTH$JMOD,	^M<R2, IV> ; enable integer overflow

            01         04 BC     7A  001A  3700 	EMUL	@4(AP), #1, #0, R0 ; R0 = quadword divd

            50            00         001E       

            50         08 BC     7B  0020  3800 	EDIV	@8(AP), R0, R0, R0 ; R0 = longword remainder

            50            50         0024       

                                 04  0026  3900 	RET

                                     0027  4000 

                                     0027  4100 

                                     0027  4200 	.END

MTH$MOD         FORTRAN MOD ROUTINES                             21-AUG-1978 19:07:40   VAX-11 MACRO X0.3-11               Page   6

SYMBOL TABLE                                                                                                                     (5)



FOR$K_ERR_PREFX= 00000018            

MTH$IMOD         00000000 RG    02   

MTH$JMOD         00000018 RG    02   

MTH$K_ERR_PREFX= 00000016            

MTH__FLOOVEMAT = 00000058            

MTH__FLOUNDMAT = 00000059            

MTH__INVARG    = 00000051            

MTH__LOGZERNEG = 00000053            

MTH__SINSIGLOS = 00000057            

MTH__SQUROONEG = 00000054            

MTH__UNDEXP    = 00000052            

MTH__WRONUMARG = 00000050            





PROGRAM SECTION SYNOPSIS



.  ABS  .        00000000      00     NOPIC   USR   CON   ABS   LCL NOSHR NOEXE NORD  NOWRT BYTE  

. BLANK .        00000000      01     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  

MTH$CODE         00000027      02       PIC   USR   CON   REL   LCL   SHR   EXE   RD  NOWRT LONG  





THERE WERE NO ERRORS OR WARNINGS.

28048. BYTES LEFT IN FREE MEMORY POOL.

OBJ$:MTHMOD,LIS$:MTHMOD/-SP=LIB$:S/ML,SRC$:P,MTHMOD

0 MLB DIR RDS - 0 GETS TO DEFINE 0 MACROS. 2 INTER. FILE WRITES. 

