Mail Archives: djgpp/1997/05/06/03:27:24
On 2 May 1997, Gregary J Boyles wrote:
> I have attempted to emulate Alaric Williams's ISR wrappers.
I didn't see anybody reply, so I will try. But please take the info
below with a grain of salt, since I've never done myself some of these
things.
> Now I assume ___djgpp_base_address corresponds to the our_ds in your
> wrappers.
No. `___djgpp_base_address' is the *base address* of the CS and DS
selectors. So you will need to get the base address of the descriptor
that the CS selector points to. (A selector and its base address are
NOT the same!)
> and that in my initialization function I will have to do the following:
>
> extern short int our_ds;
> our_ds=_my_ds();
I think you should use `__djgpp_ds_alias' instead of `_my_ds'. That's
because the DS selector is invalidated when there is a signal (such as
SIGINT) pending, whereas the alias is always valid. Since you can
never be sure in an interrupt handler whether a signal is pending, it
is safer to use the alias.
I think one of the reasons Martynas put the variables into the code
segment is that CS is always valid when your code runs.
Sorry, I cannot help you with the rest of your questions.
- Raw text -