Mail Archives: djgpp/1998/12/01/12:28:41
Message-ID: | <003701be1d4d$df0533e0$c5223182@marst96.m.resnet.pitt.edu>
|
From: | "mark reed" <marst96+@pitt.edu>
|
To: | <djgpp AT delorie DOT com>
|
Subject: | Re: Protected mode ints & the FAQ (for Eli Z)
|
Date: | Tue, 1 Dec 1998 12:13:09 -0500
|
MIME-Version: | 1.0
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Mailer: | Microsoft Outlook Express 4.72.3110.1
|
X-MimeOLE: | Produced By Microsoft MimeOLE V4.72.3110.3
|
Reply-To: | djgpp AT delorie DOT com
|
Doesnt it say that number 3 is to restore the orignal handler and that you
must use what you got from number 1 (not 2)? You may have misread it, or its
a typo or error. You are right the first 2 steps are what you need. The
third step would be restoring the original handler when you are done, but
use the info you got from step 1.
>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 -