delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/02/22/15:30:39

Date: Mon, 22 Feb 93 15:02:47 EST
From: DJ Delorie <dj AT ctron DOT ctron DOT com>
To: dmb AT ai DOT mit DOT edu
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Replacing arbitrary interrupt handlers

>   Does anyone have any clue why this might be happening?  (It seems
>   awfully bizarre to me.)

You must declare the global to be "volatile" so that gcc won't
optimize the reference away (after all, you don't change it in the
loop).

>2. The code that steals the timer interrupt seems to be specific to
>   go32.  Is there any way I can steal other vectors?  I need to grab
>   the "terminate addresss" vector (called by DOS when the program
>   terminates) and the mouse movement interrupt in particular.  I'd
>   like to be able to do this without hacking go32.  Is it possible?
>   (BTW, I don't care how disgusting the process is, as long as I can
>   get something working. :)

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.

DJ

- Raw text -


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