Date: Fri, 10 Mar 2000 12:44:28 -0500 (EST) Message-Id: <200003101744.MAA22069@indy.delorie.com> From: Eli Zaretskii To: djgpp AT delorie DOT com CC: Mark Mendes da Costa In-reply-to: <38C88D54.11BA81C0@yahoo.com> (message from Mark Mendes da Costa on Fri, 10 Mar 2000 16:51:17 +1100) Subject: Re: djgpp ds alias References: <38C88D54 DOT 11BA81C0 AT yahoo DOT com> Reply-To: djgpp AT delorie DOT com Errors-To: dj-admin AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > I've been messing around with interrupt handling and I noticed that in > Allegro's IRQ wrapper it loads ds, fs, es and gs with __djgpp_ds_alias, > why is this necessary? The selector normally loaded into the DS register can become invalid for short periods of time as a side effect of the DJGPP signal support. If the interrupt fires during that time, using the normal DS selector will cause your program to crash. __djgpp_ds_alias is a variable which holds another selector, with the same base address and limit as the normal DS (so it's appropriate for accessing data), but it is always valid. This alias selector is allocated by the startup code, specifically for interrupt and exception handlers. > And what does the line .byte 0x2e /* cs: override */ mean? That's when you access a variable using the CS selector rather than the default DS. > Also, what is a reentrant interrupt? A reentrant interrupt handler is a handler you can enter while it's still processes the previous interrupt.