home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name moinst -- Install mouse interrupt handler unconditionally.
- *
- * Synopsis ercode = moinst(pfunc,call_mask);
- *
- * int ercode Error return code:
- * MO_OK if successful;
- * MO_ABSENT if mouse not found.
- *
- * void (far *pfunc)()
- * Function to install.
- * unsigned call_mask
- * Bit mask indicating classes of
- * events that should call the
- * handler:
- *
- * MO_MOVE Mouse moved.
- * MO_L_PRESS Left button depressed.
- * MO_L_RELEASE Left button released.
- * MO_R_PRESS Right button depressed.
- * MO_R_RELEASE Right button released.
- * MO_M_PRESS Middle button depressed.
- * MO_M_RELEASE Middle button released.
- *
- *
- * Description This function installs a mouse interrupt handler.
- *
- * Returns ercode Error return code:
- * MO_OK if successful;
- * MO_ABSENT if mouse not found.
- * b_mouse Number of mouse buttons (0 if no driver).
- *
- * Version 6.00 (C)Copyright Blaise Computing Inc. 1989
- *
- **/
-
- #include <bmouse.h>
-
- int moinst(pfunc,call_mask)
- void (far *pfunc)();
- unsigned call_mask;
- {
- DOSREG regs;
-
- regs.ax = 12;
- regs.cx = call_mask;
- regs.dx = utoff(pfunc);
- regs.es = utseg(pfunc);
- return mogate(®s,®s);
- }