Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!dali.cs.montana.edu!milton!ogicse!zephyr.ens.tek.com!vice!bobb From: bobb@vice.ICO.TEK.COM (Bob Beauchaine) Newsgroups: comp.lang.pascal Subject: Re: Where's my mouse? Message-ID: <6257@vice.ICO.TEK.COM> Date: 7 Nov 90 20:26:05 GMT References: <13000017@uxh.cso.uiuc.edu> Organization: Tektronix Inc., Beaverton, Or. Lines: 29 In article <13000017@uxh.cso.uiuc.edu> mead@uxh.cso.uiuc.edu writes: > >I was hoping someone (brighter than I) would know how to (where to) >directly access the mouse driver (and thus determine it's existance). I thought there would be a multitude of appropriate answers to this post by now, but this is the method I use. (I've lost the original post, so I assume you're using Turbo Pascal). The easiest way to determine the existence of a mouse is to check interrupt vector $33 (33 hex). *All* Microsoft compatible mouse drivers intercept this vector for compatibility. There are three possibilities for this interrupt vector. 1. The vector itself (i.e., the byte at memory location 0000:0033 hex is 0). Conclusion : no mouse present. 2. The byte pointed to by vector $33 is an interrupt return instruction, $CF. I.e, byte(ptr(0,$33)^) = CF. Conclusion : no mouse present. 3. Neither of the above. Conclusion : a mouse driver is present. I have never seen this method fail. Bob Beauchaine bobb@vice.ICO.TEK.COM