Mail Archives: djgpp/1997/01/22/09:08:04
On 22 Jan 1997, Don wrote:
> // Get all mouse position using relative mouse position function 11
> void mouse(void) {
> union REGS mou;
> mou.x.ax = 0x0b;
> int86(0x33, &mou, &mou);
There's a caveat in using `int86' (which is the main reason I suggest to
use `__dpmi_int' instead): the .x field is sometimes expected to be 16-bit
and sometimes 32-bit, which breaks some functions of some interrupts. I
think your code will work after you include one of the definitions
described in the libc reference under int86 (type from the DOS prompt:
"info libc alpha int86"). I suggest to check the naive option first:
#define _NAIVE_DOS_REGS
(define it *before* you #include <dos.h>).
- Raw text -