X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: jbs30000 AT aol DOT com (Joel) Newsgroups: comp.os.msdos.djgpp Subject: Re: Interrupt handler question Date: 11 Apr 2004 20:01:37 -0700 Organization: http://groups.google.com Lines: 25 Message-ID: <84e4e2a9.0404111901.1c450a96@posting.google.com> References: <84e4e2a9 DOT 0404102155 DOT 6533748 AT posting DOT google DOT com> NNTP-Posting-Host: 172.140.242.173 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1081738897 17124 127.0.0.1 (12 Apr 2004 03:01:37 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Mon, 12 Apr 2004 03:01:37 +0000 (UTC) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hans-Bernhard Broeker wrote in message news:... > Joel wrote: > > Anyway, is it possible to call the old routine stored with > > _go32_dpmi_get_real_mode_interrupt_vector while in the middle of the > > new routine? > > I doubt it. The problem being that the end of an interrupt handler is > signalled by a IRET instruction. The old routine will be ending in > such an IRET. So at the minimum, you'ld have to use the DPMI simulate > interrupt call method to call it, and I'm not sure that's allowed from > inside an interrupt handler. At the risk of posting too many replies at a time, here's one more. I see you're warning against this kind of thing, so it might not work, but I might try this and see how it works. say I have _go32_dpmi_seginfo OldInt, NewInt; to store the old interrupt vector and create a new one. 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); _go32_set_real_mode_interrupt_vector(Interrupt Number, &NewInt); Probably not safe with int 21H, but it could work with others, I think.