/SUBROUTINE TO HA NDLE LIGHT PEN MENU PROBLEMS
 / WRITTEN BY GORDON J. SAVAGE   JAN. 1969.
	.TITLE	LITPEN
IDSP=700701
IDRS=700504
IDRA=700512
IDRC=700712
	.GLOBL	LITPEN,.DA
LITPEN	XX
	JMS*	.DA
	JMP	.+5
LP	0
IX	0
Y	0
ADRESS	0
	CAL
	16
	IDSP
	LPINT
	DBK
	JMP*	LITPEN
LPAC	0
LPOUT	0
TEMP	0
LPINT	DAC	LPAC	/SAVE THE AC
	LAC*	(0
	DAC	LPOUT	/SAVE PC,ETC
	IDRC	/READ CO ORDINATES
	DAC	TEMP	/STORE
	IDRA	/GET ADDRESS+1
	TAD	(-1
	DAC*	ADRESS	/PUT IN SLOT
	IDRS	/RESTART DISPLAY
/
	LAC	TEMP
	RAL	/POSITION
	AND	(1776	/MASK
	DAC*	Y	/STORE
	LAC	TEMP
	RTR
	RTR
	RTR
	RTR	/MOVE IN 8 BITS
	AND	(1776	/MASK HERE ALSO
	DAC*	IX	/STORE IN SLOT
/
	LAW	-1
	DAC*	LP	/PLACE SWITCH IN SLOT
	LAC	LPAC	/GET OLD AC
	ION
	DBR
	XCT	(JMP*	LPOUT
/
	.END
