Mail Archives: djgpp/1996/09/26/08:55:52
In article <32488EB9 DOT 8F4 AT df DOT allcon DOT com>,
Dennis Jan Franken <DjFranken AT df DOT allcon DOT com> writes:
> Is it possible to set up a mouse handler in DJGPP without using
> an ASM wrapper ????
Just use the dos interrupt 0x33 to access the mouse, for example:
union REGS rg;
rg.x.ax = 3; /* Get button status and mouse position */
int86(0x33, &rg, &rg);
x = rg.x.dx >> 3;
y = rg.x.cx >> 3;
buttons = rg.x.bx;
The buttons are the low order bits.
There are similar calls to set the mouse esolution, speed and position.
--
Eyal Lebedinsky (eyal AT eyal DOT emu DOT id DOT au)
- Raw text -