Mail Archives: djgpp/1998/12/01/09:39:52
Hello.
I have found the info in the FAQ very helpful and well written,
especially with hardware issues, but I think there may be a mistake in it.
I've been to trying to chain a function to the timer interrupt,
INT 0x1C, in protected mode. The FAQ says the following steps are needed:
1. Call _go32_dpmi_get_protected_mode_interrupt() to store the original
interrupt vector.
2. Call _go32_dpmi_chain_protected_mode_interrupt() with a go32_seginfo
structure pointing to your function. This function then gets wrapped
with some code to chain to the old handler.
3. Call _go32_dpmi_set_protected_mode_interrupt() with the go32_seginfo
structure you used in 2.
I think 2 implies that the go32_seginfo structure gets modified to point
to the wrapper function.
However, using these three steps results in a protection fault.
The solution is not to use step 3, since the code then works fine - the
function gets called, etc. This appears to work, because
_go32_dpmi_chain_<blah>() calls the _go32_dpmi_set_<blah>() function for
you (as can be seen by looking at the library source, lsr201.zip).
If this is incorrect, please correct me, as this is the first time
I've tried hooking interrupts.
--
==============================================================================
Rich Dawe - 4th-year MSci Physicist @ Bristol University, UK
richdawe AT bigfoot DOT com, http://www.bigfoot.com/~richdawe/
==============================================================================
- Raw text -