Mail Archives: djgpp/1997/10/10/18:47:06
From: | "Nicholas Law" <fake_nic DOT law AT dial DOT pipex DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Mouse driver
|
Date: | 8 Oct 1997 18:29:16 GMT
|
Organization: | UUNET
|
Lines: | 35
|
Message-ID: | <01bcd417$eeb1d760$25f582c1@nicland>
|
NNTP-Posting-Host: | af037.du.pipex.com
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Hi all!
I'm writing a program in DJGPP that needs mouse support. However, when I
try to call function 0x00B to get the relative movement of the mouse I get
nonsense numbers. It seems to work when moving to the right or down, but
when moved up or left I get numbers like 3276750 (minimum) in the CX or DX
register. I cannot even see a way of storing such a number in those
registers!
I've attached a bit of code to the bottom of the posting. Am I missing
something obvious?
Thanks in advance,
Nick
--
To reply, please remove fake_ from the front of the return address
// Get mouse movement
// r is the dpmi regs structure
int x_mouse_move, y_mouse_move;
r.x.ax=0x000B;
r.x.cx=0;
r.x.dx=0;
r.x.bx=0;
__dpmi_int (0x33, &r);
x_mouse_move = r.x.cx;
y_mouse_move = r.x.dx;
- Raw text -