www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/01/28/08:57:54

Date: Thu, 28 Jan 93 07:55:56 CST
From: (csaba AT vuse DOT vanderbilt DOT edu) <csaba AT vuse DOT vanderbilt DOT edu>
To: mbee AT oce DOT nl, djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: how to set up a timer interrupt catcher

On Thu, 28 Jan 93 12:05:50 +0100,
  Marcel Beelen writes:

>
>
>Hello all,
>
>I am trying to set up a timer interrupt catcher by changing the 0x70
>interrupt vector. But everything I try results in a hangup.
>
>I can read the old vector, which is f000:ff53, but if I replace this vector
                                     ^^^^^^^^^^
>by my own routine, which ends with an asm("iret"), the system hangs and should
>be turned off and on again. It may (or may not) have something to do with
>segment mapping, which I know virtually nothing about.
>
>I tried to wade through the faq, docs, sources and examples, but could
>not find anything to help me along.
>
>Can anyone provide me with a working example of how to set up such a thing,
>or even better with a working DJGPP-version of the Unix setitimer() call?
>
>Thanks,
>Rob Hegt
>
>
>      ###########################################################
>      #  This note does not necessarily represent the position  #
>      #     of Oce-Nederland B.V. Therefore no liability or     #
>      #      responsibility for whatever will be accepted.      #
>      ###########################################################

Based on the segment:offset address above I presume that you added the new 
interrupt handler to GO32. In the new interrupt handler did you:

  a) chain to the old (BIOS) timer interrupt routine, or
  b) send the EOI to the interrupt controller yourself?

If you did neither of the above then the described behavior is what should 
happen. As the timer interrupt is the highest priority interrupt on the PC 
it will disable all other interrupts (including the keybd) from happening 
until the IT controller gets the EOI. Result: not even ALT-CTRL-DEL will 
work, only RESET or the "BIG RED SWITCH".

Once you get this working the other part of your problem will be to pass 
control to a 32-bit callback function whenever your interrupt handler in 
GO32 is executed. For this you may want to consult the mouse cursor drawing 
part of the GO32/GRX event queue mechanism. Relevant files are:

   EVENTS.C EVINTR.ASM   from the GO32 sources (16 bit interrupt handling)
   EVENT32.C             from the GRX sources  (32 bit interface to above)


Hope this helps

Csaba Biegl
csaba AT vuse DOT vanderbilt DOT edu

- Raw text -


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