Expects: AX    000cH
CX    event mask (events which you want sent to your handler)
bit 0 = mouse movement           (CX | 01H)
bit 1 = left button pressed      (CX | 02H)
bit 2 = left button released     (CX | 04H)
bit 3 = right button pressed     (CX | 08H)
bit 4 = right button released    (CX | 10H)
bit 5 = center button pressed    (CX | 20H)
bit 6 = center button released   (CX | 40H)
All events:      CX = 007fH
Disable handler: CX = 0000H
ES:DX address of your event handler code
Returns: none
Info: This installs a custom mouse event handler.  Specify which events
you want to monitor via bit-codes in CX, and pass the address of
your handler in ES:DX.  When any of the specified events occur,
the code at ES:DX will get control via a far CALL.

On entry to your handler:
AX contains a bit mask identifying which event has occurred (it is
encoded in the same format as described for CX, above).

BX contains the mouse button status:
bit 0 = left button    (BX & 1) == 1
bit 1 = right button   (BX & 2) == 2
bit 2 = center button  (BX & 4) == 4

CX horizontal position (in text mode, divide by 8 for character clm)
DX vertical position (in text mode, divide by 8 for character line)

SI distance of last horizontal motion (mickeys: <0=left; >0=right)
DI distance of last vertical motion (mickeys: <0=upward, >0=down)

DS mouse driver data segment
You will need to set up DS to access your own variables.  You
need not save/restore CPU registers, since the driver does this
for you.

Exit your custom handler via a FAR RETurn (not an IRET).

To enable or disable selected events for your handler, use this
function again, passing a modified mask in CX.  To disable all
events for the handler, call this function again passing a value
of 0000H in CX.

Warning: You must disable your custom event handler (call with CX=0)
before exiting to DOS.  For TSRs, you must enable each time you
pop up and disable each time you pop down.

Notes: You may prefer to use the more-flexible INT 33H 0014H (exchange
handlers) or INT 33H 0018H (install mouse+key handler).

- -

INT 33H 000cH: Set Mouse Event Handler