Int 33H Function 0CH (12) Set user-defined mouse event handler

Sets the address and event mask for an application program's mouse event handler. The handler is called by the mouse driver whenever the specified mouse events occur.

Call with:

AX = 000CH

CX = event mask

Bit(s) Significance (if set)

0 mouse movement

1 left button pressed

2 left button released

3 right button pressed

4 right button released

5 center button pressed

6 center button released

7—15 reserved (0)

ES:DX = segment:offset of handler

Returns:

Nothing

Notes:

The user-defined event handler is entered from the mouse driver by a far call with registers set up as follows:

AX mouse event flags (see event mask) BX button state

Bit(s) Significance (if set) 0 left button is down 1 right button is down 2 center button is down 3—15 reserved (0)

CX horizontal (X) pointer coordinate DX vertical (Y) pointer coordinate SI last raw vertical mickey count DI last raw horizontal mickey count DS mouse driver data segment

If an event does not generate a call to the user-defined handler because its bit is not set in the event mask, it is still reported in the event flags during calls to the handler for events which are enabled.

Calls to the handler are disabled with Int 33H Function 00H or by calling this function with an event mask of zero.

See also Int 33H Functions 14H and 18H.