	.TITLE	JMOD	J REMAINDER
/ 
/ 
/                   FIRST PRINTING, FEBRUARY 1974
/ 
/ THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO 
/ CHANGE WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED
/ AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION.
/ DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPON-
/ SIBILITY FOR ANY ERRORS THAT MAY APPEAR IN THIS
/ DOCUMENT.
/ 
/ THE SOFTWARE DESCRIBED IN THIS DOCUMENT IS FUR-
/ NISHED TO THE PURCHASER UNDER A LICENSE FOR USE ON
/ A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH
/ INCLUSION OF DIGITAL'S COPYRIGHT NOTICE) ONLY FOR 
/ USE IN SUCH SYSTEM, EXCEPT AS MAY OTHERWISE BE PRO-
/ VIDED IN WRITING BY DIGITAL.
/ 
/ DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY
/ FOR THE USE OR RELIABILITY OF ITS SOFTWARE ON EQUIP-
/ MENT THAT IS NOT SUPPLIED BY DIGITAL.
/ 
/ COPYRIGHT (C) 1974, BY DIGITAL EQUIPMENT CORPORATION
/ 
/ 
        .EJECT
/COPYRIGHT 1972, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
/FOR HARDWARE FLOATING POINT PROCESSOR (FPP), DEFINE %FPP,
/EDIT #003  9-27-73
	.GLOBL	JMOD, .DA,
	.IFUND %FPP
	.GLOBL .JG, .JK, .JL, .JM
	.ENDC
	.IFUND	%FPP
	.DEFIN	ELD%,A
	JMS*	A		/EXTENDED INTEGER LOAD (.JG)
	.ENDM
	.ENDC
	.IFDEF	%FPP
ELD=713100
	.DEFIN	ELD%
	ELD
	.ENDM
	.ENDC
	.IFUND	%FPP
	.DEFIN	EDV%,A
	JMS*	A		/EXTENDED INTEGER DIVIDE (.JL)
	.ENDM
	.ENDC
	.IFDEF %FPP
EDV=712100
	.DEFIN	EDV%
	EDV
	.ENDM
	.ENDC
	.IFUND	%FPP
	.DEFIN	ERS%,A
	JMS*	A		/EXTENDED INTEGER REV. SUB. (.JM)
	.ENDM
	.ENDC
	.IFDEF	%FPP
ERS=711100
	.DEFIN	ERS%
	ERS
	.ENDM
	.ENDC
	.IFUND	%FPP
	.DEFIN	EMP%,A
	JMS*	A		/EXTENDED INTEGER MULT. (.JK)
	.ENDM
	.ENDC
	.IFDEF	%FPP
EMP=711500
	.DEFIN	EMP%
	EMP
	.ENDM
	.ENDC
/CALLING SEQUENCE--
/	JMS*	JMOD
/	JMP	.+3
/	.DSA	ARG1 ADDR.		/BIT #0=1 IF INDIRECT
/	.DSA	ARG2 ADDR.		/ "
JMOD	0
	JMS*	.DA
	JMP	JMOD03
JMOD01	0
JMOD02	0
JMOD03 ELD%	.JG		/LD. ARG1 INTO AC,MQ
	.DSA	JMOD01+400000	/ARG1
	EDV%	.JL		/DIVIDE
	.DSA	JMOD02+400000	/ARG1/ARG2 INTO AC,MQ
	EMP%	.JK		/MULT.
	.DSA	JMOD02+400000	/(ARG1/ARG2)*ARG2
	ERS%	.JM		/REV. SUBTRACT
	.DSA	JMOD01+400000	/ A1-((A1/A2)*A2)
	JMP*	JMOD
	.END
