🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.programmer
Article #1073

Re: A Better Mousetrap

#1073
From: Edward J Kalenda
Date: Sat, 10 Oct 1992 18:28
31 lines
1899 bytes
From article <$dougn.64.0@sasb.byu.edu>, by $dougn@sasb.byu.edu (Douglas R. Nebeker - MIS_SAS):
> 
> I'm building a mouse trap of sorts....
> 
> Actually, I just want to know if the mouse is being used (like the 
> _good_ screen saver TSRs out there--they don't blank your screen when no 
> keyboard input is coming in as long as the mouse is being moved).
> 
> I've successfully hooked the serial port interrupt (Int 14h?) and the mouse 
> interrupt (Int 33h).  The mouse works like it always has, but my variable 
> 'busy' never gets changed... (actually, that's a lie--when the mouse is 
> initialized, busy=M, but while the mouse is moving and buttons are being 
> pushed, busy doesn't get changed)
> 
> My question then is this:  is there another way to access the mouse besides 
> through Int 33h?  Does each mouse driver use a different Int for their 
> driver?  Do I need to hook the DOS int 21h too?

Many programs that use the mouse do not poll the driver for position
and button state. They use the asynchronous notification functions of
the mouse driver. With these, you set up a mask of events you want to
be told about and the driver calls a routine in your program to tell
you about the event. All kinds of restrictions on what the event handler
routine can do, but better than polling in many cases.

You will need to insert yourself between the driver and the program's
event handler.
-- 

Ed
ekalenda@netcom.COM
Technical Details
Message-ID: <1992Oct10.182844.26093@netcom.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!olivea!spool.mu.edu!umn.edu!csus.edu!netcom.com!ekalenda
References: <$dougn.64.0@sasb.byu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!olivea!spool.mu.edu!umn.edu!csus.edu!netcom.com!ekalenda
From: ekalenda@netcom.com (Edward J Kalenda)
Newsgroups: comp.sys.ibm.pc.programmer,comp.os.msdos.programmer
Subject: Re: A Better Mousetrap
Message-ID: <1992Oct10.182844.26093@netcom.com>
Date: 10 Oct 92 18:28:44 GMT
References: <$dougn.64.0@sasb.byu.edu>
Organization: Netcom - Online Communication Services  (408 241-9760 guest)
Lines: 31