	.TITLE *** RSX SPOOLER POLLER ***
/
/ COPYRIGHT (C) 1975
/ DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
/
/ THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY
/ ON A SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH
/ THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS
/ SOFTWARE, OR ANY OTHER COPIES THEREOF, MAY NOT BE PRO-
/ VIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON
/ EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO
/ THESE LICENSE TERMS.  TITLE TO AND OWNERSHIP OF THE
/ SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.
/
/ THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE
/ WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED AS A COM-
/ MITMENT BY DIGITAL EQUIPMENT CORPORATION.
/
/ DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
/ OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY
/ DEC.
/
	.EJECT
/ 
/ EDIT #2	M. HEBENSTREIT		NOV. 9, 1973
/ EDIT #3	SCR			2/5/74
/ EDIT #4	SCR			3/7/74
/ EDIT #5	MJH			7/26/74
/ EDIT #6	MJH			8/11/75
/
/ COPYWRITE 1973 DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
/ 
/ THIS TASK WHEN REQUESTED PERIODICALLY WILL INTERROGATE SPOOLER STATUS.
/
X10=10
SIOA=706001	/SKIP OF TCPB DONE FLAG
LIOR=706006	/LOAD TCPB REGISTER AND CLEAR FLAG
/
LUN=3		/FOR ERRORS
	DZM	REV		/CLEAR THE EV
	LAC	(TCPB		/ISSUE THE STATUS TCPB
	SIOA
	JMP	.-1
	LIOR
	CAL	WAITR		/WAIT FOR REV
	LAC	REV		/WHERE THERE ANY ERRORS?
	RTL
	SPA
	JMP	ERR2		/YES -- LET THE OPERATOR KNOW
	LAW	-13		/NO -- WHAT'S THE STATUS?
	DAC	TSKCNT		/SET UP DEVICE COUNT
	LAC	(STATUS
	AAC	2
LOOP	DAC	TEMP		/GET STATUS FOR EACH DEVICE
	LAC*	TEMP
	AND	(177777
	SZA			/WAS THERE AN ERROR?
	JMS	OUTMES		/YES -- PRINT MESSAGE
	LAC	TEMP		/NO -- PREPARE TO ACCESS NEXT STATUS WD
	AAC	3
	ISZ	TSKCNT		/ARE WE DONE?
	JMP	LOOP		/NO -- CONSIDER NEXT DEVICE
	CAL	(10		/YES -- EXIT
/
/ SUBROUTINE OUTMES -- PRINT A TASK NAME AND ERROR CODE
/ 
/ ALTERED REGISTERS: ALL
/
/ ON ENTRY TEMP POINTS TO THE DEVICE NAME AND STATUS
/
OUTMES	0
	CAL	WRITE
	CAL	WAIT
	LAW	-2
	TAD	TEMP
	DAC	TEMP1
	LAC*	TEMP1		/GET THE DEVICE NAME
	AND	(177777
	LMQ			/PREPARE TO PRINT IN IMAGE ASCII
	JMS	SHIFT
	DAC	IMSG+2
	JMS	SHIFT
	DAC	IMSG+3
	JMS	SHIFT
	DAC	IMSG+4
	CAL	PRINT		/WRITE OUT DEVICE NAME
	CAL	WAIT
	LAC*	TEMP		/GET THE ERROR CODE PRINTED
	AND	(177777
	LMQ
	LAC	(INUM
	DAC	PRINT+4
	LAC	(INUM+1
	DAC*	(X10
	JMS	ENTER
	JMS	ENTER
	JMS	ENTER
	JMS	ENTER
	JMS	ENTER
	JMS	ENTER
	CAL	PRINT		/PRINT THE STATUS
	CAL	WAIT
	LAC	(IMSG
	DAC	PRINT+4
	JMP*	OUTMES
/
/ SUBROUTINE ENTER -- ENTER IMAGE NUMERIC DATA INTO BUFFER
/
ENTER	0
	CLA
	LLS	3
	AAC	60
	DAC*	X10
	JMP*	ENTER
/
/ SUBROUTINE SHIFT -- SHIFT A TASK NAME INTO BUFFER
/
SHIFT	0
	CLA
	LLS	6
	AAC	100
	JMP*	SHIFT
/
/ ERROR ROUTINES
/
ERR2	LAC	(MSG2
	DAC	WRITE+4
	CAL	WRITE
	CAL	WAIT
	CAL	(10
/
/ ERROR MESSAGES
/
MSG2	MSG3-MSG2/2*1000
	0
	.ASCII "STATUS TCPB REJECTED"<15>
MSG3=.
/ 
/ VARIABLES AND CPBS
/
WAIT	20
	EV
WAITR	20
	REV
PRINT	2700
	EV
	LUN
	3
	IMSG
WRITE	2700
	EV
	LUN
	2
	AMSG
TCPB	0
	601
REV	0
	1400
STATUS	.BLOCK 41
TSKCNT	0
TEMP	0
TEMP1	0
AMSG	INUM-AMSG/2*1000
	0
	.ASCII "*** UC15 ERROR "<175>
INUM	IMSG-INUM/2*1000
	0
	.BLOCK 6
	15
	12
IMSG	EV-IMSG/2*1000
	0
	.BLOCK 3
	40
	175
	0
EV	0
	.END
