Mail Archives: djgpp/1997/08/14/12:09:06
Pancheri Paolo <darkangel AT tin DOT it> 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
- Raw text -