Mail Archives: djgpp/1997/10/06/18:34:26
Olivier PERRON writes:
> _go32_dpmi_allocate_iret_wrapper(&info);
> _go32_dpmi_set_protected_mode_interrupt_vector(0xF1, &info);
[snip]
> __dpmi_int(0xF1, &r);
I've never tried hooking a software interrupt with djgpp, so I could be
totally wrong about this, but I think you are issuing that call in the
wrong way. The __dpmi_int() function calls the real mode interrupt
handler, but you have only installed a protected mode handler (according
to the DPMI spec, hardware interrupts are automatically reflected into
protected mode but software interrupts are not). I think you will need
to generate the interrupt directly by issuing an asm "int"
instruction...
If the goal of this program is to eventually make it hook a hardware
interrupt instead, you should be aware that calling printf() from an irq
routine is not a good idea!
--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
Beauty is a French phonetic corruption of a short cloth neck ornament.
- Raw text -