🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #7262

Re: Mouse Buttons

#7262
From: Bob Fahey <NECR0SIS>
Date: Fri, 07 Dec 1990 20:33
34 lines
1902 bytes
lances@techbook.com (Lance Shorb) writes:
> I'm interested in finding a method to determine the status of both mouse
> buttons (ie.  LeftDown, LeftUp, RightDown, RightUp) without having to 
> sort through a pile of IDCPM, or CONSOLE device messages.  
>     There's got to be an easier way.

Yes, indeed, there is an easier way: Check the registers.
From what I remember, here's how it goes:

mouse:	btst	#6,$bfe001	;0 = lbutton up, 1 = lbutton down
	beq.s	out
	btst	#10,$dff016	;0 = rbutton up, 1 = rbutton down
	bne.s	mouse
out:	...

This will repeat the loop until either the l- or r-button is hit.

Ok, I have a question for the net: How do you read the middle button on 
a mouse? (i.e. optical)

Hope this helps. (And if the addr's are wrong, I am sure the net will correct
me, but I am pretty certain about the #'s I gave)

>-- 
>Lance Shorb                          Voice: 1-503-230-7747
>lances@techbook.COM  ...!{tektronix!nosun,uunet}techbook!lances
>Public Access UNIX at (503) 644-8135 (1200/2400) Voice: +1 503 646-8257
>Public Access User --- Not affiliated with TECHbooks

bob
|      ///| a.k.a. NECR0SIS     faheyr@silver.ucs.indiana.edu  -or-          |
|  \\\///_|                     faheyr@rose.ucs.indiana.edu                  |
|   \XX/  |  M  I  G  A      "'Ere long done do does did..."  - The Smiths   |
|             "...life is seen through the eyes of a dog..."  - Skinny Puppy |
Technical Details
Message-ID: <faheyr.660601986@silver>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!news.cs.indiana.edu!iuvax!silver!faheyr
References: <1990Dec7.041658.14294@techbook.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!news.cs.indiana.edu!iuvax!silver!faheyr
From: faheyr@silver.ucs.indiana.edu (Bob Fahey <NECR0SIS>)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Mouse Buttons
Message-ID: <faheyr.660601986@silver>
Date: 7 Dec 90 20:33:06 GMT
References: <1990Dec7.041658.14294@techbook.com>
Sender: news@iuvax.cs.indiana.edu
Distribution: na
Lines: 34