Date: Tue, 31 Dec 1996 13:09:34 +0200 (IST) From: Eli Zaretskii To: Delong 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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