Mail Archives: djgpp/1996/12/31/06:22:40
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 -