www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/22/07:44:19

From: "Colin W. Glenn" <cwg01 AT gnofn DOT org>
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: <Pine.GSO.3.95.970321213302.23040I-100000@sparkie.gnofn.org>
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
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			<a href="http://www.thelight.org/">.</a><br>
HotSpot			<a href="http://www.hspro.com/hotspot/">.</a><br>
Caldera, Inc. / OpenDOS		<a href="http://www.caldera.com/">.</a><br>

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019