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'
47 MyEvent MOUSE_EVENT < >
57 ;************************************************************************
58 ;**************** FLAT MODEL CODE SEGMENT STUFF *************************
59 ;************************************************************************
61 _TEXT SEGMENT BYTE PUBLIC USE32 'CODE'
71 xor ax, ax ; Reset mouse
73 mov NumberOfButtons, bx
81 mov ax, 0020h ; Enable driver
104 mov ax, 03h ; Get Mouse Position and Button Status
106 ; bx = buttons, cx = x, dx = y
120 PUBLIC mouse_get_delta_
132 mov eax, 0bh ; Read Mouse Motion Counters
147 PUBLIC mouse_get_btns_
155 mov ax, 03h ; Get Mouse Position and Button Status
157 ; bx = buttons, cx = x, dx = y
176 mov ax, 01fh ; Disable mouse driver
195 mov MyEvent.MouseDX, cx
196 mov MyEvent.MouseDY, dx
197 mov MyEvent.MouseButtons, bx
198 mov MyEvent.MouseFlags, ax
200 mov eax, offset MyEvent
209 PUBLIC mouse_set_handler_
219 mov MyEventHandler, edx
221 mov ecx, eax ; Event flags
225 mov ax, 0Ch ; Set User-defined Mouse Event Handler
236 PUBLIC mouse_clear_handler_
238 mouse_clear_handler_:
246 mov MyEventHandler, 0
248 mov ecx, 0 ; Event flags
252 mov ax, 0Ch ; Set User-defined Mouse Event Handler
264 PUBLIC mouse_set_limits_
273 push edx ; Save Vertical stuff
289 ;extern void mouse_set_pos( short x, short y);
292 PUBLIC mouse_set_pos_