www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/02/22/17:32:31

To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: Replacing arbitrary interrupt handlers
Reply-To: dmb AT ai DOT mit DOT edu
Date: Mon, 22 Feb 93 17:26:38 -0500
From: David Baggett <dmb AT case DOT ai DOT mit DOT edu>

>You can't run TSRs from go32, so grabbing the terminate address is
>silly.  If you need to trap your own exit, use atexit().
>
>The mouse should be handled through the graphics library's event
>handler.

I guess I should be more clear on what I want to do: I want to make a
library that can be used with various 32-bit compilers, one of which
happens to be DJGCC.  This library is for writing games and hence needs
to steal some fairly low-level things, one of which is the mouse
interrupt.  I don't want to use the event handler in the graphics
library, because all I want is the *raw* mouse movement information.
My library handles putting the mouse image (and lots of other mouse
functions) up itself.

If the answer to my question is "no" (i.e., there is no general way to
replace interrupt handlers that are meaningful to DOS), then I can hack
around the things I'm doing now (using atexit, polling the mouse
instead of running an interrupt, etc.)  I'm just worried about
situations in the future where I'd really have to replace a vector.
(In this case, it's only luck that prevents me from having to steal the
mouse interrupt -- the mouse driver happens to queue button up/down
events so you won't miss them if you poll only periodicallly.)

Dave

- Raw text -


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