       .TITLE DSIGN  TRANSFER OF SIGN FOR DOUBLE ARGUMENT
/ 
/ 
/                   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.
/FOR HARDWARE FLOATING POINT PROCESSOR (FPP), DEFINE 90 FPP,
/EDIT #004  6-15-71
       .GLOBL DSIGN,.DA,
	.IFUND %FPP
	.GLOBL .AO,.AB
	.ENDC
	.IFUND %FPP
	.DEFIN DLD%,A
	JMS* A			/DOUBLE LOAD (.AO)
	.ENDM
	.ENDC
	.IFDEF %FPP
DLD=713150
	.DEFIN DLD%
	DLD
	.ENDM
	.ENDC
/             CALLING SEQUENCE
/      JMS*   (DSIGN)         SUBR CALL
/      JMP    .+3             SUBR RETURN
/      CAL/XCTADDR            ADDR OF ARG1
/      CAL/XCTADDR            ADDR OF ARG2 (XCT IF INDIRECT)
/FPP INSTR. NSS.
	.IFDEF %FPP
BPA=716604			/BR ON POS. FPP AC
FNG=713272			/MAKE FPP AC NEG.
	.ENDC
/
DSIGN  CAL    0              /ENTRY-EXIT
       JMS*   .DA            /GET ARGUMENT (.DA)
       JMP    DSIG03
DSIG01 CAL    0              /ARG1
DSIG02 CAL    0              /ARG2
DSIG03 DLD%   .AO            /LOAD DOUBLE (.AO)
       .DSA   DSIG02+400000  / (ARG2)
	.IFDEF %FPP
	CLC			/-1 TO AC
	BPA			/BR IS POS.
	DSIG04
	CLA			/NEG
DSIG04	TAD (FNG)		/POS
	DAC DSIG05
	DLD			/DOUBLE LOAD
	DSIG01+400000		/ARG 1
DSIG05	0			/FAB OR FNG
	0			/UNUSED
	.ENDC
	.IFUND %FPP
       LAC*   .AB            /GET SIGN WORD (.AB)
       AND    DSIG07         /KEEP SIGN ONLY
       DAC    DSIG06         /HOLD SIGN
       JMS*   .AO            /LOAD DOUBLE (.AO)
       .DSA   DSIG01+400000  / (ARG1)
       LAC*   .AB            /GET SIGN WORD (.AB)
       AND    DSIG08         /STRIP SIGN
       XOR    DSIG06         /ADD SIGN OF ARG2
	SAD DSIG07	/CHECK FOR -0.0 CASE
	CLA	/YES.  MAKE -0.0 A 0.0
       DAC*   .AB            /RESTORE IN SIGN WORD (.AB)
	.ENDC
       JMP*   DSIGN          /EXIT
	.IFUND %FPP
DSIG06	0
DSIG07        400000
DSIG08        377777
	.ENDC
       .END
