       .TITLE AMOD   REMAINDERING FOR REAL ARGUMENTS  ARG1(MOD ARG2)
/ 
/ 
/                   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 1970,1971, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
/EDIT 3  6-24-71
/FOR HARDWARE FLOATING POINT PROCESSOR (FPP), DEFINE %FPP,
	.GLOBL AMOD,.DA,.AW,.AX
	.IFUND %FPP
	.GLOBL .AG,.AL,.AM,.AK
	.ENDC
	.IFUND %FPP
	.DEFIN FLD%,A		/FLOATING LOAD (.AG)
	JMS* A
	.ENDM
	.ENDC
	.IFDEF %FPP
FLD=713050
	.DEFIN FLD%
	FLD
	.ENDM
	.ENDC
	.IFUND %FPP
	.DEFIN FDV%,A		/FLOATING DIVIDE (.AL)
	JMS* A
	.ENDM
	.ENDC
	.IFDEF %FPP
FDV=712040
	.DEFIN FDV%
	FDV
	.ENDM
	.ENDC
	.IFUND %FPP
	.DEFIN FRS%,A		/FLOATING REVERSE SUBTRACT
	JMS* A			/(.AM)
	.ENDM
	.ENDC
	.IFDEF %FPP
FRS=711040
	.DEFIN FRS%
	FRS
	.ENDM
	.ENDC
	.IFUND %FPP
	.DEFIN FMP%,A
	JMS* A			/FLOATING MULTIPLY (.AK)
	.ENDM
	.ENDC
	.IFDEF %FPP
FMP=711440
	.DEFIN FMP%
	FMP
	.ENDM
	.ENDC
/             CALLING SEQUENCE
/      JMS*   (AMOD)          SUBR CALL
/      JMP    .+3             SUBR RETURN
/      CAL/XCTADDR            ADDR OF ARGUMENT 1
/      CAL/XCTADDR            ADDR OF ARGUMENT 2 (XCT IF INDIRECT)
/
AMOD   CAL    0              /ENTRY-EXIT
       JMS*   .DA            /GET ARGUMENTS (.DA)
       JMP    AMOD03
AMOD01 CAL    0              /ARG 1
AMOD02 CAL    0              /ARG 2
AMOD03 FLD%   .AG            /LOAD REAL
       .DSA   AMOD01+400000  / (ARG1)
       FDV%   .AL            /DIVIDE REAL (.AL)
       .DSA   AMOD02+400000  / (ARG1/ARG2)
       JMS*   .AX            /FIX TO INTEGER (.AX)
       JMS*   .AW            /FLOAT TO ACC (.AW)
       FMP%   .AK            /MULTIPLY REAL
       .DSA   AMOD02+400000  / (ARG2 * INTEGER)
       FRS%   .AM            /REVERSE SUBTRACT (.AM)
       .DSA   AMOD01+400000  / (ARG1-(ARG2(ARG1/ARG2)))
       JMP*   AMOD           /EXIT
       .END
