www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/31/06:22:40

Date: Tue, 31 Dec 1996 13:09:34 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Delong <dandelong AT osha DOT igs DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: having mouse driver call my function during interrupt
In-Reply-To: <32C89853.729D@osha.igs.net>
Message-ID: <Pine.SUN.3.91.961231130403.14457A-100000@is>
MIME-Version: 1.0

On Mon, 30 Dec 1996, Delong wrote:

> I am trying to convert my old real-mode DOS program to DJGPP v2 and am
> having trouble getting my old mouse handling function to install to the
> mouse driver properly.
> 
> I tried making my function an 'interrupt' function by sticking the usual
> push and pop instructions on either end of the function. Am I doing this
> right?

Although you didn't tell much about how your real-mode code handles the 
mouse, I don't think you need to make your function look like an 
interrupt handler.  All you need is to tell the mouse driver a real-mode 
address which it will call, and then to arrange that your DJGPP function 
will be called when the driver calls that address.  The DJGPP FAQ list 
(v2/faq202b.zip) tells you how to achieve that in section 18.8.  If that 
method somehow doesn't help you, please tell more about your old code.

> The FAQ stuff I did find about
> address conversion showed converting seg:off to linear. How do I do the
> reverse properly?

  SEG = (linear >> 4) & 0xffff
  OFF = linear & 15

- Raw text -


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