	.TITLE	ISNGL	J TO INTEGER CONVERSION
/ 
/ 
/                   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 1971, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
/FOR HARDWARE FLOATING POINT PROCESSOR (FPP), DEFINE 90 FPP,
/EDIT #002 6-17-71   (000)***WAD***
	.GLOBL	ISNGL, .DA
	.IFUND %FPP
NORM=640444
	.GLOBL .JG
	.ENDC
	.IFUND	%FPP
	.DEFIN	ELD%,A
	JMS*	A		/EXTENDED INTEGER LOAD (.JG)
	.ENDM
	.ENDC
	.IFDEF	%FPP
ELD=713100
	.DEFIN	ELD%
	ELD
	.ENDM
	.ENDC
	.IFDEF %FPP
	.GLOBL .ZD	/EI TO SI
	.ENDC
/CALLING SEQUENCE--
/	JMS*	ISNGL
/	JMP	.+2
/	.DSA	ARG. ADDR.	/BIT #0=1 IF INDIRECT
ISNGL	0
	JMS*	.DA
	JMP	ISNG02
ISNG01	0
ISNG02	ELD%	.JG		/LD. J INTO AC,MQ
	.DSA	ISNG01+400000	/ARG.
	.IFDEF %FPP
	JMS* .ZD	/J TO INTEGER CONVERSION
	.ENDC
	.IFUND %FPP
	NORM-22			/SHIFT INTO AC 22(8)=18(10)
	DAC	ISNG03		/SAVE
	LACS			/STP. CNTR.
	SZA!CLL			/SKP IF NO OVFLO
	STL			/L=1 IF OVFLO
	LAC	ISNG03
	SNL
	JMP*	ISNGL		/NO OVFLO: RTN. VAL.
	RAL			/L=1 IF NEG.
	LAC	ISNG04		/377777(8)
	SZL			/IF POS., RTN. 377777 AS LARG. VAL.
	TAD	ISNG05		/NEG.: RTN. -377777
	.ENDC
	JMP*	ISNGL
ISNG03	0
	.IFUND %FPP
ISNG04	377777
ISNG05	2
	.ENDC
	.END
