X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: Interrupt handler question Date: 12 Apr 2004 11:49:46 GMT Organization: Aachen University of Technology (RWTH) Lines: 23 Message-ID: References: <84e4e2a9 DOT 0404102155 DOT 6533748 AT posting DOT google DOT com> <84e4e2a9 DOT 0404111901 DOT 1c450a96 AT posting DOT google DOT com> NNTP-Posting-Host: accip02.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 1081770586 13850 137.226.33.41 (12 Apr 2004 11:49:46 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 12 Apr 2004 11:49:46 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Joel wrote: > Now, I hook a real mode interrupt and my routine is called. Now say, > at a certain point, I want the old handler called. I could try this: > _go32_set_real_mode_interrupt_vector(Interrupt Number, &OldInt); > Set the dpmi reg struct as needed > _dpmi_int(Interrupt Number, &r); Depends on where you do this from. Doing this from inside the "NewInt" handler function itself is almost certainly a no-no. Interrupts, or more particularly their handling routines, aren't generally reentrant. Generally speaking there's a limit as to what you can do in this area using C code. You'll have to revert to assembly sooner or later, at least for the "outer layers", i.e. the routines actually registered as interrupt handlers. C code can be called from there if you're careful. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.