/

/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
//	LTORPB	003  LIGHT PEN OR PUSH BUTTON ROUTINE
/
/LIGHT PEN AND PUSHBUTTON HANDLER, R. HUBERT  8/70
/  EDIT #002 S. ROOT 10/24/73 MODIFY FOR F4 VERSION 044
/  EDIT	#003	SCR	9/17/75	COPYRIGHT
/
/THIS FUNCTION WILL RETURN A .T. IF A INTERRUPT HAD OCCURRED
/OTHERWISE A .F.
/
	.GLOBL	LTORPB,.DA
VT15=10
LTORPB	0
	JMS*	.DA
	JMP	.+6
VTRX	.DSA	0
VTRY	.DSA	0
VTRNR	.DSA	0
VTRPB	.DSA	0
VTWICH	.DSA	0
/
/READ FOR A LP OR PB HIT
/
VTLT	NOP
VTRD	.READ	VT15,7,VTRBUF,1	/ALLOW LP OR PB HIT
	317100
VTWT	.WAITR	VT15,VTADR	/
	LAC	(NOP
	DAC	VTLT
	LAC	VTRBUF		/WHICH INTR WAS IT?
	AND	(300000
	SAD	(200000
	JMP	PBTN		/PB INTERRUPT
LTPN	LAC	(1		/LP INTERRUPT
	SKP
PBTN	LAC	(2
	DAC*	VTWICH
VTPBST	CLA
	RS2
	AND	(770000
	DAC	TTEMP		/SAVE FOR GETTING ARRAY ELEMENTS
	SKP		// EDIT #002 NO LONGER NEED XTRA INDIRECTION 
/			/FOR ARRAYS. INSTRUCTION WAS LAC* VTRPB
/			/KEEP SIZE OF NEW VERSION SAME IN CASE CONVENIENT
	DAC	VTRPB
	LAW	-6		/6 PB
	DAC	VTRCNT
	LAC	TTEMP		/PB REGISTER
LTPB10	RCL			/1ST BIT INTO LINK
	DAC	TTEMP		/SAVE THE REST
	LAW	-1
	SNL
	CLA
	DAC*	VTRPB		/DEPOSIT IN ARRAY
	ISZ	VTRPB		/NEXT ARRAY ELEMENT
	LAC	TTEMP
	ISZ	VTRCNT		/CHECK FOR 6
	JMP	LTPB10		/RECYCLE
	LAC	VTRBUF+2		/GET X
	DAC*	VTRX		/RETURN X TO USER
	LAC	VTRBUF+3		/GET Y
	DAC*	VTRY		/RETURN Y TO USER
	LAC	VTRBUF+5
	DAC*	VTRNR
	LAW	-1
	JMP*	LTORPB
VTADR	LAC	(JMP VTWT
	DAC	VTLT
	CLA
	JMP*	LTORPB
VTRBUF	.BLOCK	6
RS2=703022
TTEMP	0
VTRCNT	0
	.END
