	.TITLE *** COUNTER FOR POOL OF EMPTY NODES ***
/ 
/ 
/                   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
/
/ EDIT #3	JULY 22 74	M. HEBENSTREIT
/
/ COPYRIGHT 1974 DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
/
/ THIS PROGRAM SHOULD BE SCHEDULED BY THE OPERATOR EVERY FEW
/ SECONDS TO COUNT THE POOL OF EMPTY NODES. THE PROGRAM WILL
/ PRINT OUT A WARNING MESSAGE IF THE POOL IS NEARLY EMPTY.
/
/ DEFINE COUNT TO SPECIFY THE CRITICAL NUMBER OF NODES IN
/ THE POOL SO THE WARNING MESSAGE WILL BE PRINTED. (DEFAULT=20)
/
	.IFUND COUNT
COUNT=20
	.ENDC
/
IDX=ISZ
POOL=240
.INH=705522
.ENB=705521
MSGLUN=3
X10=10
/
/
	DZM	NODES
START	LAC	(START		/GET XR ADJUSTMENT
	AND	(70000
	TCA
	DAC	XRADJ
	LAC	(POOL		/SET UP TO START COUNTING NODES
	.INH
	TAD	XRADJ
	PAX
CONT	LAC	0,X		/GET THE POINTER TO NEXT NODE
	SAD	(POOL		/END OF DEQUE?
	JMP	FINISH		/YES -- GO DO THE PRINTOUT AS DESIRED
	TAD	XRADJ
	PAX
	LAC	NODES		/NO -- BUMP THE NODE COUNT
	IAC
	DAC	NODES
	SAD	(COUNT+1	/HAS THE CRITICAL POINT BEEN REACHED?
	SKP			/YES -- STOP COUNTING NODES
	JMP	CONT		/CONTINUE THE SCAN
FINISH	LAC	NODES		/PREPARE BUFFER FOR PRINTOUT
	.ENB
	TCA
	TAD	(COUNT
	SPA
EXIT	CAL	(10
	CAL	PRINT
	CAL	WAIT
	CAL	(10
/
EV	0
NODES	0
XRADJ	0
/
PRINT	2700
	EV
	MSGLUN
	2
	BUFF
/
WAIT	20
	EV
/
BUFF	MSGEND-BUFF/2*1000
	0
	.ASCII "**** POOL IS NEARLY EMPTY ****"<15>
MSGEND=.
	.END
