Date: Tue, 6 May 1997 10:07:24 +0300 (IDT) From: Eli Zaretskii To: Gregary J Boyles cc: djgpp AT delorie DOT com Subject: Re: Help needed with ISR wrapper design. In-Reply-To: <5kculb$quo@lion.cs.latrobe.edu.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.