	.TITLE IFLOW
/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
