Function 11 - Read Motion Counters
PSS ID Number: Q19852
Article last modified on 05-27-1993
PSS database name: H_Mouse

1.x 2.x 3.x 4.x 5.x 6.x 7.x 8.x

MS-DOS


--------------------------------------------------------------------
The information in this article applies to:

 - Microsoft Mouse Driver for MS-DOS, versions 1.x, 2.x, 3.x, 4.x, 
   5.x, 6.x, 7.x, 8.x, and 9.0
--------------------------------------------------------------------

Summary:

This article describes mouse function 11, which is used to return 
relative motion information from the mouse driver. 

Inputs are:

   AX = 11

Outputs are:

   CX = Count (horizontal)
   DX = Count (vertical)

More Information:

Function 11 returns the horizontal and vertical mickey count since the 
last call to this function, and is always within the range -32768 to 
32767 (limited by the size of a SIGNED INT). Overflow is ignored. The 
mickey count is set to zero after this call is done.  

A POSITIVE horizontal count (bit 'F' = 0) indicates RIGHT motion.
A NEGATIVE horizontal count (bit 'F' = 1) indicates LEFT motion.
A POSITIVE vertical count (bit 'F' = 0) indicates DOWN motion.
A NEGATIVE vertical count (bit 'F' = 1) indicates UP motion.

Note that if F11 is called, the mouse is moved and then returned to
exactly the same position, and F11 is called again, the returned
mickey counts are zero. 

Additional reference words: 7.00 7.04 7.05 8.00 8.10 8.20 9.00

Copyright Microsoft Corporation 1993.