       .TITLE SNGL   CONVERT DOUBLE ARGUMENT TO REAL
/ 
/ 
/                   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. 01754
/EDIT 4  3-20-71
/FOR HARDWARE FLOATING POINT PROCESSOR (FPP), DEFINE %FPP,
       .GLOBL SNGL,.DA,
	.IFUND %FPP
       .GLOBL .AB,.AO,.CH,.CE
	.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*   (SNGL)          SUBR CALL
/      JMP    .+2             SUBR RETURN
/      CAL/XCTADDR            ADDR OF ARGUMENT (XCT IF INDIRECT)
/FPP INSTR. ASS.
	.IFDEF %FPP
FST=713640			/FLT. STORE
FLD=713050			/FLT. LOAD
	.ENDC
/
SNGL   CAL    0              /ENTRY-EXIT
       JMS*   .DA            /GET ARGUMENT (.DA)
       JMP    SNGL02
SNGL01 CAL    0              /ARGUMENT
SNGL02 DLD%   .AO            /LOAD DOUBLE (.AO)
       .DSA   SNGL01+400000  / (ARG1)
	.IFDEF %FPP
	FST			/ROUND + STR FLOATING
	SNGL03	/SINGLE PREC.
	FLD			/RELOAD FPP AC
	SNGL03
	.ENDC
	.IFUND %FPP
       LAC*   .AB            /GET SIGN WORD
       AND    SNGL03         /SAVE SIGN ONLY
       DAC*   .CE
       LAC*   .AB            /GET SIGN WORD AGAIN
       AND    SNGL04         /SAVE MAGNITUDE ONLY
       DAC*   .AB            /RESTORE
       JMS*   .CH            /ROUND AND SIGN
              400
              777000
	.ENDC
       JMP*   SNGL           /EXIT
	.IFUND %FPP
SNGL03        400000         /MASK FOR SIGN
SNGL04        377777         /MASK FOR MAGNITUDE
	.ENDC
	.IFDEF %FPP
SNGL03	0
	0
	.ENDC
       .END
