	.TITLE IFLOW
/ 
/ 
/                   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, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
	/EDIT 1    5--21--70
	/UNDERFLOW-OVERFLOW TEST
	/CAN BE USED AS LOGICAL OR INTEGER FUNCTION
	/HAS INTEGER ARGUMENT (IFLOW(I)) WHICH FUNCTIONS
	/AS FOLLOWS:
	/I<0, CHECK FOR UNDERFLOW-RETURNS (-1) IF TRUE
	/I>0, CHECK FOR OVERFLOW-RETURNS (-1) IF TRUE
	/I=0, NO CHECK-LOGICAL FALSE (0) RETURNED IN AC
	/EXTERNAL .GLOBL .OVUDF IS TESTED
	/.OVUDF<0 MEANS UNDERFLOW,.OVUDF>0 MEANS OVERFLOW
	/.OVUDF=0 MEANS NO UNDERFLOW NOR OVERFLOW
	/IN CASES WHERE TRUE CONDITION (-1) RESULTS FROM
	/A CHECK, .OVUDF IS REINITIALIZED TO ZERO, OTHERWISE
	/IT IS NOT MODIFIED BY THIS ROUTINE
	/CALLING SEQUENCE:
	/JMS* IFLOW
	/JMP .+2
	/CAL/XCT ADDR		XCT IF INDIRECT
	/INTERNAL .GLOBL
	.GLOBL IFLOW
	/EXTERNAL .GLOBL
	.GLOBL .OVUDF,.DA
IFLOW	0
	JMS* .DA		/GET ADDRESS OF INTEGER ARGUMENT
	JMP .+2
IFL1	0			/.STORAGE FOR ADDRESS OF ARGUMENT
	LAC* .OVUDF		/SEE IF ANY OVERFLOW-UNDERFLOW
	SNA			/ERROR FIRST
	JMP* IFLOW		/RETURN WITH ZERO AC-NO ERROR
	LAC* IFL1		/GET INTEGER ARGUMENT
	SNA
	JMP* IFLOW		/RETURN WITH ZERO AC-NO CHECK
	XOR* .OVUDF		/DETERMINE IF TRUE OR FALSE
	SPA!CLA			/SIGNS SHOUD MATCH IF TRUE.
	JMP* IFLOW		/FALSE. RETURN ZERO AC
	DZM* .OVUDF		/TRUE. REINIT FLAG
	CMA
	JMP* IFLOW
	.END
