1 ; THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
2 ; SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
3 ; END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
4 ; ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
5 ; IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
6 ; SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
7 ; FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
8 ; CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
9 ; AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
10 ; COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
11 ;***************************************************************************
12 ;***************************************************************************
14 ;***** M O U S E . A S M *****
16 ;***** Contains routines for a mouse interface. *****
19 ;***** PROCEDURES *****
21 ;***** VARIABLES *****
24 ;***** CONSTANTS *****
27 ;***************************************************************************
28 ;***************************************************************************
32 ;************************************************************************
33 ;**************** FLAT MODEL DATA SEGMENT STUFF *************************
34 ;************************************************************************
36 _DATA SEGMENT BYTE PUBLIC USE32 'DATA'
38 rcsid db "$Id: mouse.asm,v 1.1.1.2 2001-01-19 03:33:49 bradleyb Exp $"
49 MyEvent MOUSE_EVENT < >
59 ;************************************************************************
60 ;**************** FLAT MODEL CODE SEGMENT STUFF *************************
61 ;************************************************************************
63 _TEXT SEGMENT BYTE PUBLIC USE32 'CODE'
73 xor ax, ax ; Reset mouse
75 mov NumberOfButtons, bx
83 mov ax, 0020h ; Enable driver
106 mov ax, 03h ; Get Mouse Position and Button Status
108 ; bx = buttons, cx = x, dx = y
122 PUBLIC mouse_get_delta_
134 mov eax, 0bh ; Read Mouse Motion Counters
149 PUBLIC mouse_get_btns_
157 mov ax, 03h ; Get Mouse Position and Button Status
159 ; bx = buttons, cx = x, dx = y
178 mov ax, 01fh ; Disable mouse driver
197 mov MyEvent.MouseDX, cx
198 mov MyEvent.MouseDY, dx
199 mov MyEvent.MouseButtons, bx
200 mov MyEvent.MouseFlags, ax
202 mov eax, offset MyEvent
211 PUBLIC mouse_set_handler_
221 mov MyEventHandler, edx
223 mov ecx, eax ; Event flags
227 mov ax, 0Ch ; Set User-defined Mouse Event Handler
238 PUBLIC mouse_clear_handler_
240 mouse_clear_handler_:
248 mov MyEventHandler, 0
250 mov ecx, 0 ; Event flags
254 mov ax, 0Ch ; Set User-defined Mouse Event Handler
266 PUBLIC mouse_set_limits_
275 push edx ; Save Vertical stuff
291 ;extern void mouse_set_pos( short x, short y);
294 PUBLIC mouse_set_pos_