From: firewind Newsgroups: comp.os.msdos.djgpp Subject: Re: Handling Interrupts Date: 10 Aug 1997 23:21:52 GMT Organization: Netcom Lines: 21 Message-ID: <5slieg$agg@sjx-ixn7.ix.netcom.com> References: <33E74A35 DOT D5761524 AT tin DOT it> NNTP-Posting-Host: elp-tx2-04.ix.netcom.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Pancheri Paolo wrote: > Whit the functions > _go32_dpmi_get_protected_mode_interrupt_vector(0x08, &old_timer_handler) > and _go32_dpmi_set_protected_mode_interrupt_vector(0x08, > &new_timer_handler) I can save the old timer handler and install a my > own handler. But how can I call the old handler (saved in > old_timer_handler)? Use something like this: (assuming old_int holds the seginfo for the old interrupt) __dpmi_regs call_regs; call_regs.x.cs = old_int.rm_segment; call_regs.x.ip = old_int.rm_offset; call_regs.x.ss = call_regs.x.sp = 0; __dpmi_simulate_real_mode_procedure_iret(&call_regs); Assuming you're calling __d_s_r_n_p_i from inside an interrupt, you will probably want to assign values to other registers of call_regs. hth