       .TITLE .EC    POLYNOMIAL EVALUATOR (C1X + C3X3 + C5X5 +...CNXN)
/ 
/ 
/                   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 1  1-25-71
/FOR HARDWARE FLOATING POINT PROCESSOR (FPP), DEFINE %FPP,
	.GLOBL .EC,
	.IFUND %FPP
	.GLOBL .AH,.AK,.AG,.AI
	.ENDC
	.IFUND %FPP
	.DEFIN FST%,A		/FLOATING STORE (.AH)
	JMS* A
	.ENDM
	.ENDC
	.IFDEF %FPP
FST=713640
	.DEFIN FST%
	FST
	.ENDM
	.ENDC
	.IFUND %FPP
	.DEFIN FMP%,A
	JMS* A			/FLOATING MULTIPLY (.AK)
	.ENDM
	.ENDC
	.IFDEF %FPP
FMP=711440
	.DEFIN FMP%
	FMP
	.ENDM
	.ENDC
	.IFUND %FPP
	.DEFIN FAD%,A		/FLOATING ADD (.AI)
	JMS* A
	.ENDM
	.ENDC
	.IFDEF %FPP
FAD=716040
	.DEFIN FAD%
	FAD
	.ENDM
	.ENDC
	.IFUND %FPP
	.DEFIN FLD%,A		/FLOATING LOAD (.AG)
	JMS* A
	.ENDM
	.ENDC
	.IFDEF %FPP
FLD=713050
	.DEFIN FLD%
	FLD
	.ENDM
	.ENDC
/             CALLING SEQUENCE         (SINGLE PRECISION)
/      JMS*   (.EC)           SUBR CALL (FLOATACC HAS X)
/      CAL    ADDR            ADDR OF PARAMETERS
/      NEXT   INSTRUCTION     SUBR RETURN
/             PARAMETERS
/ADDR  -N+1                   TWO@S COMP + 1 OF NO OF COEFFICIENTS
/      C(N)   (1)             LAST COEFFICIENT (IN REAL FORMAT)
/             (2)
/      C(N-1) (1)             NEXT TO LAST
/             (2)
/        .
/        .
/      C(1)   (1)             FIRST COEFFICIENT
/             (2)
/
.EC    CAL    0              /ENTRY-EXIT
       LAC*   .EC            /GET PARAM ADDR
       DAC    EC01           /STORE AS POINTER
       LAC*   EC01           /GET 1ST PARAM (N)
       DAC    EC02           /STORE N
       ISZ    EC01           /BUMP POINTER TO 1ST COEFF
       ISZ    .EC            /BUMP EXIT ADDR
       FST%   .AH            /STORE REAL (.AH)
       .DSA   EC04           / (ARG)
       FMP%   .AK            /MULTIPLY REAL (.AK)
       .DSA   EC04           /(ARG * ARG = ARG2)
       FST%   .AH            /STORE REAL (.AH)
       .DSA   EC06           / (ARG2)
       FLD%   .AG            /LOAD REAL (.AG)
       .DSA   EC01+400000    / (C(N) AS TERM)
EC09   FMP%   .AK            /MULTIPLY REAL (.AK)
       .DSA   EC06           / (TERM * ARG2)
       ISZ    EC01           /BUMP POINTER FOR NEXT COEFF
       ISZ    EC01
       FAD%   .AI            /ADD REAL (.AI)
       .DSA   EC01+400000    / (CN +(TERM * ARG2) = TERM)
       ISZ    EC02           /BUMP N
       JMP    EC09           /NOT DONE-CYCLE
       FMP%   .AK            /DONE-MULTIPLY REAL (.AK)
       .DSA   EC04           / (TERM * ARG = RESULT)
       JMP*   .EC            /EXIT
EC01   CAL    0              /POINTER
EC02   CAL    0              / N
EC04   CAL    0              /ARG STORAGE (1)
       CAL    0              /           (2)
EC06   CAL    0              /ARG2 STORAGE (1)
       CAL    0              /             (2)
       .END
