Date: Thu, 2 Sep 1999 11:11:53 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: "David Dean - [DS]Deaner666" cc: djgpp AT delorie DOT com Subject: Re: mouse probs In-Reply-To: <7qk7j9$klb$1@news6.svr.pol.co.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 31 Aug 1999, David Dean - [DS]Deaner666 wrote: > This works fine, except it doesn't give values in the range 0 - 319 for the > x axis and 0 - 199 for the y axis (I'm using mode 13h). I believe you are being hit by the 16-bitness as opposed to 32-bitness of the registers in union REGS. Did you read the documentation of `int86' in the library reference? If not, type "info libc alpha int86" from the command line and read there. Generally, I'd recommend to stay away of `int86' altogether, and use `__dpmi_int' instead. Section 18.1 of the DJGPP FAQ list explains why; here's an excerpt: Note that calling `int86' and `intdos' can sometimes cause trouble due to size (16 bits as opposed to 32 bits) of the members in the `union REGS' structure. Do *not* assume that e.g. `regs.x.ax' is always 16 bit! This problem and the facilities available to specify the width of the registers are all described in the library reference; see description of the int86 function in "libc.a reference", or point your Web browser to http://www.delorie.com/djgpp/doc/libc-2.01/libc_411.html#SEC411. In particular, programs which interface with the mouse via calls to the `int86' library function, should mask off the high 16 bits of the registers which report mouse position and other values, since the high 16 bits aren't necessarily zeroed (which will wreak havoc in any program that interfaces to the mouse).