[comp.os.msdos.programmer] Auto-detecting a mouse

hleaves@ruby.vcu.edu (EAVES,HUGH) (12/18/90)

I'm writing a program that uses some of the mouse driver's interrupt routines
(int 33h). How do I check to see if a mouse driver is present on my system
before I make any calls?

*******************************************************************************
** Hugh L. Eaves                      ** Internet: hleaves@ruby.vcu.edu      **
** Medical College of Virginia        ** Bitnet: hleaves@vcuruby             **
** Department of Human Genetics       ** Voice: (804) 371-8754               **
***************** All non-incendiary communication welcome! *******************

jdb@reef.cis.ufl.edu (Brian K. W. Hook) (12/19/90)

Whatever reference you are using for int 33H calls should have a function
called Initialize Mouse (I think it is functio 0) that returns in one of
the registers (AX, I think) -1 if not ready and 0 if it is ready.  That
is the easiest way I can think of, since you should have the documentatino
right in front of you.

rkl@cbnewsh.att.com (kevin.laux) (12/20/90)

In article <59797@brunix.UUCP>, hleaves@ruby.vcu.edu (EAVES,HUGH) writes:
> I'm writing a program that uses some of the mouse driver's interrupt routines
> (int 33h). How do I check to see if a mouse driver is present on my system
> before I make any calls?

	Invoke Int 33h with AX set to zero.  Upon return, examine the value
of AX.  If it is still zero, then the Mouse hardware/software is not installed.
If AX is set to -1, then the Mouse hardware is installed and the Mouse driver
is loaded.

--rkl