Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mouse Driver Source COde

0 views
Skip to first unread message

joema...@yahoo.com

unread,
Dec 14, 1998, 3:00:00 AM12/14/98
to
G'day,

I would like to add an inbuilt mouse driver to a program I am writting in
VB1.0. Does anyone know of some BASIC source code for a mouse driver that I
could add to my program. I would rather build the driver into my program
than distribute it as a seperate exe.

Thanks
Joe Marriott

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

Steve Rush

unread,
Dec 14, 1998, 3:00:00 AM12/14/98
to
>I would like to add an inbuilt mouse driver to a program I am writting in
>VB1.0. Does anyone know of some BASIC source code for a mouse driver that I
>could add to my program. I would rather build the driver into my program
>than distribute it as a seperate exe.

Most systems will have a mouse driver installed by the time the user loads your
program. You use the driver by calling INT 33h with four parameters. You can
see if the driver is present by PEEKing the four bytes beginning at 0000:0033h.
If they are all zero, the driver isn't there. If the driver is loaded, INT
33h, service 0 will test for the presence of the mouse hardware and report how
many buttons the mouse has. There are about three dozen other services.

If you can still find it, "The Microsoft Mouse Programmer's Reference" has all
the details. If you can't find the book, try The Interrupt List and the ABC
packets.

I have an example program, but it's in QuickBasic.

**********************************************************************
If it's spam, it's a scam. Don't do business with Net abusers.


Dekah

unread,
Dec 16, 1998, 3:00:00 AM12/16/98
to
There's no Mouse Driver Source Code, but there's some of the Interrupts:

_________________________________________________
2.4 - Mouse INTERRUPTs ...
* Service : &H33

Call Interrupt(&H33, Regs, Regs)
_________________________________________________
2.4.0 - Function : &H0 - Mouse Reset and Status

[IN] Regs.ax = &H0
_________________________________________________
2.4.1 - Function : &H1 - Show Cursor

[IN] Regs.ax = &H1
_________________________________________________
2.4.2 - Function : &H2 - Hide Cursor

[IN] Regs.ax = &H2
_________________________________________________
2.4.3 - Function : &H3 - Get Button Status and Mouse Position

[IN] Regs.ax = &H3

[OUT] Regs.bx = ButtonPressed% ( 1=Left, 2=Right, 3=Both )
[OUT] Regs.cx = Horizontal%
[OUT] Regs.dx = Vertical%
_________________________________________________
2.4.4 - Function : &H4 - Set Mouse Cursor Position

[IN] Regs.ax = &H4
[IN] Regs.cx = Horizontal%
[IN] Regs.dx = Vertical%
_________________________________________________
2.4.5 - Function : &H5 - Get Button Press Information

[IN] Regs.ax = &H5
[IN] Regs.bx = ButtonPressed% ( 0=Left, 1=Right )

[OUT] Regs.cx = HBtnPressedLoc%
[OUT] Regs.dx = VBtnPressedLoc%
_________________________________________________
2.4.6 - Function : &H6 - Get Button Release Information

[IN] Regs.ax = &H6
[IN] Regs.bx = ButtonReleased% ( 0=Left, 1=Right )

[OUT] Regs.cx = HBtnReleasedLoc%
[OUT] Regs.dx = VBtnReleasedLoc%
_________________________________________________
2.4.7 - Function : &H7 - Set Min. and Max. Horizontal Cursor Position

[IN] Regs.ax = &H7
[IN] Regs.cx = HMinimumRange%
[IN] Regs.dx = HMaximumRange%
_________________________________________________
2.4.8 - Function : &H8 - Set Min. and Max. Vertical Cursor Position

[IN] Regs.ax = &H8
[IN] Regs.cx = VMinimumRange%
[IN] Regs.dx = VMaximumRange%
_________________________________________________
2.4.9 - Function : &H9 - Set Graphic Cursor Block

**** Note: Must be in Graphic Mode ****

[IN] Regs.ax = &H9
[IN] Regs.bx = HorizontalHotSpot%
[IN] Regs.cx = VerticalHotSpot%
[IN] Regs.dx = OffsetOfBinaryMasks%
ЪДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДї
і DIM [SHARED] Mask(15, 1) AS INTEGER і
і COMMON Mask() AS INTEGER і
і і
і Mask%(0, 0) = 0 ' 0000000000000000 і
і ........ ....... і
і Mask%(15, 0) = -1 ' 1111111111111111 і
і і
і Mask%(0, 1) = -32768 ' 1000000000000000 і
і ........ ....... і
і Mask%(15, 1) = 32767 ' 0111111111111111 і
АДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДЩ

!!! NOTE: Use CODEB.DAT for the Binary Mask Codes. !!!
_________________________________________________
2.4.10 - Function : &HA - Set Text Cursor

[IN] Regs.ax = &HA
[IN] Regs.bx = CursorSelect%
[IN] Regs.cx = ScreenMaskValue% or ScanLineStart%
[IN] Regs.dx = CursorMaskValue% or ScanLineStop%
_________________________________________________
2.4.11 - Function : &HB - Read Mouse Motion Counters

[IN] Regs.ax = &HB

[OUT] Regs.cx = HorizontalMoveRange%
[OUT] Regs.dx = VerticalMoveRange%
_________________________________________________
2.4.12 - Function : &HC - Set Interrupt SubRoutine Call Mask And Address

[IN] Regs.ax = &HC
[IN] Regs.cx = CallMask%
[IN] Regs.dx = SubRoutineAddress%
_________________________________________________
2.4.13 - Function : &HD - Light Pen Emulation Mode ON

[IN] Regs.ax = &HD
_________________________________________________
2.4.14 - Function : &HE - Light Pen Emulation Mode OFF

[IN] Regs.ax = &HE
_________________________________________________
2.4.15 - Function : &HF - Set Mickey/Pixel Ration

[IN] Regs.ax = &HF
[IN] Regs.cx = HorizontalRatio%
[IN] Regs.dx = VerticalRatio%
_________________________________________________
2.4.16 - Function : &H10 - Conditional OFF

[IN] Regs.ax = &H10
[IN] Regs.si = HorizontalRange%
[IN] Regs.di = VerticalRange%
_________________________________________________
2.4.17 - Function : &H13 - Set Double-Speed ThresHold

[IN] Regs.ax = &H13
[IN] Regs.dx = Speed%
_________________________________________________
2.4.18 - Function : &H1A - Set Mouse Sensitivity

[IN] Regs.ax = &H1A
[IN] Regs.bx = HorizontalRange%
[IN] Regs.cx = VerticalRange%
[IN] Regs.dx = ThresholdForDoubleSpeed%
_________________________________________________
2.4.19 - Function : &H1B - Get Mouse Sensitivity

[IN] Regs.ax = &H1B

[OUT] Regs.bx = HorizontalRange%
[OUT] Regs.cx = VerticalRange%
[OUT] Regs.dx = ThresholdForDoubleSpeed%
_________________________________________________
2.4.20 - Function : &H1F - Disable Mouse Driver

[IN] Regs.ax = &H1F

[OUT] Regs.bx = ErrorStatus% ( -1 if error occured )
[OUT] Regs.cx = OffSetOfOldInterrupt33HVector%
[OUT] Regs.dx = SegmentOfOldInterrupt33HVector%
_________________________________________________
2.4.21 - Function : &H20 - Enable Mouse Driver

[IN] Regs.ax = &H20

-Dekah
ICQ 9115468
de...@home.com

0 new messages