delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/22/09:08:04

Date: Wed, 22 Jan 1997 15:50:20 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Don <6dcb AT qlink DOT queensu DOT ca>
cc: djgpp AT delorie DOT com
Subject: Re: The mouse thing again.
In-Reply-To: <01bc07fb$c28c6da0$a3f80f82@default>
Message-ID: <Pine.SUN.3.91.970122154111.695A-100000@is>
MIME-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019