From: "Colin W. Glenn" Newsgroups: comp.os.msdos.djgpp Subject: Re: DJGPP gurus: interrupts wrappers are reentrant ? Date: Fri, 21 Mar 1997 21:34:53 -0600 Organization: Greater New Orleans Free-Net Lines: 22 Message-ID: References: <332BADAD DOT 63C7A87E AT lmn DOT pub DOT ro> <01bc34b3$b02471a0$LocalHost AT anthonyb> NNTP-Posting-Host: sparkie.gnofn.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII In-Reply-To: <01bc34b3$b02471a0$LocalHost@anthonyb> To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Pardon me for sticking my two cents in here, but wasn't the prior state of the interrupt flag pushed on the stack with the rest? And doesn't a IRET pop the flags and restore that state? On 20 Mar 1997, Anthony Q. Bachler wrote: > Try clearing the interupt enable bit of the MSW as one of the first steps > in the ISR. This will cause the hardware to store any interupts that occur > and execute them when you reenable them. To disable them use the CLI > assembly instruction. To reenable them use the STI instruction. A word of > caution, STI should be immediately followed by an IRET to prevent the > problem you are experienceing. The problem you are having is that the > stack is being corrupted. When you perform an STI, the processor should > hold off executing any pending interupts until after the next command. I > know for a fact that it works this way on the 8086-80686. On a different > processor, it may work differently. The above details are for the intel > CPU's, but the method is the same for most others. -- The Light .
HotSpot .
Caldera, Inc. / OpenDOS .