; Read an ST Mouse plugged into a Jaguar.
;
; Never before have felines and rodents had such a peculiar relationship
; or cooperated so well.
;
;
	.include 'jaguar.inc'

	BLOCK_S	equ	$20000
	BLOCK_E	equ	$100000

ClearMem:			; clear the memory into which the mouse
	move.l	#BLOCK_S,a0	; data will be written
	move.l	#BLOCK_E,a1
clear:	move.w	#0,(a0)+
	cmp.l	a0,a1
	bge	clear



Setup:
	move.l	#BLOCK_S,a1
	move.l	#BLOCK_S,d0
	move.l	#BLOCK_E,d1
	sub.l	d0,d1		; Size in bytes
	asr.l	#2,d1
	move.l	#JOY1,a0
squeak:
	move.l	(a0),d2
	and.l	#$f0000003,d2	; mask off uninteresting bits
	move.l	d2,(a1)+
        dbra    d1,squeak

Oops:
	illegal


