home *** CD-ROM | disk | FTP | other *** search
- /*
- * m_event.c
- *
- * Public Domain (p) March 1990 By Rodney Loos
- * Syntax modified by S. Sampson
- */
-
- #include <dos.h>
- #include "mouse.h"
-
- /*
- * Define a subroutine to be executed conditionally
- * by the mouse software
- */
-
- void m_event(unsigned mask, void (far * func)(void))
- {
- _ES = FP_SEG(func); /* segment of function */
- _DX = FP_OFF(func); /* offset of function */
- _CX = mask; /* condition call mask */
- _AX = 12; /* mouse function 12 */
-
- geninterrupt(0x33); /* mouse function call */
-
- /*
- * NOTE: The subroutine called must do a far return.
- * on entry to the subroutine:
- *
- * ax contains the condition mask
- * bx contains the button state
- * cx contains the horizontal cursor coordinate
- * dx contains the vertical cursor coordinate
- */
- }