INT 33H 0018H: Set Alternate Event Handler
Expects: AX 0018H
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 = Shift down when button pressed (CX | 20H)
bit 6 = Ctrl down when button pressed (CX | 40H)
bit 7 = Alt down when button pressed (CX | 80H)
CX = 00ffH = handle all events
CX = 0000H = disable handler
ES:DX address of your event handler code
──────────────────────────────────────────────────────────────────
Returns: AX installation status: 0018H = installed
ffffH = Error: can't install
──────────────────────────────────────────────────────────────────
Info: This function is the more elegant version of INT 33H 000cH (which
see for specs on the custom handler code).
This function will inform your handler when a Shift-, Ctrl-, or
Alt- key was down when a mouse button was pressed. It also
allows you to install up to three separate event handlers,
provided that each has a different event mask in CX.
Bits 5, 6, and 7 specify the shift keys of interest. If you
don't require this information, you may use INT 33H 000cH or
INT 33H 0014H instead.
If an event handler for the specified event mask (in CX) already
exists, an error is returned (AX=ffffH upon return). In that
case, you may use INT 33H 0019H to obtain the address of the
previous handler. You may de-install that handler, install your
own, then re-install the old one later.
To de-install an alternate event handler, call this function with
the address of the handler and 0's in relevant bits of the event
mask. You should de-install event handlers before exiting your
program.
See Also: INT 33H: Mouse Support
Interrupts and BIOS Services
-♦-