Article View: comp.os.msdos.programmer
Article #5747Re: Info on Changing Stacks in protected mode
From: Ralf Brown
Date: Sat, 13 Apr 1991 15:35
Date: Sat, 13 Apr 1991 15:35
21 lines
1848 bytes
1848 bytes
In article <71689@microsoft.UUCP> donh@microsoft.UUCP (Don HACHERL) writes:
}In article <1991Mar29.155840.2626@netcom.COM> resnicks@netcom.COM (Steve Resnick) writes:
}>Everything works great until I run this under OS/2 rather than MS DOS.
}>OS/2 will not let me clear interrupts while changing SS:SP. My question:
}>Is it necessary to disable interrupts while switching stacks in protected
}
}Not only do you not need an IOPL segment, you don't even need to
}disable interrupts, under DOS or OS/2, because the chip will do it for
}you. To quote from my handy Intel refernce manual "A MOV into SS
}instruction inhibits all interrupts until after the execution of the
}next instruction (which is presumably a MOV into SP instruction)."
The reason why everybody disables interrupts during a stack switch is that
the early 8088s had a microcode bug which caused interrupts to remain
enabled after a MOV into SS. If your code can't run on an 8088/8086, you
won't need the CLI.
--
{backbone}!cs.cmu.edu!ralf ARPA: RALF@CS.CMU.EDU FIDO: Ralf Brown 1:129/3.1
BITnet: RALF%CS.CMU.EDU@CMUCCVMA AT&Tnet: (412)268-3053 (school) FAX: ask
DISCLAIMER? Did | It isn't what we don't know that gives us trouble, it's
I claim something?| what we know that ain't so. --Will Rogers
Technical Details
Message-ID:
<1991Apr13.153517.10767@cs.cmu.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!cornell!rochester!pt.cs.cmu.edu!o.gp.cs.cmu.edu!ralfReferences:
<1991Mar29.155840.2626@netcom.COM> <71689@microsoft.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!cornell!rochester!pt.cs.cmu.edu!o.gp.cs.cmu.edu!ralf From: ralf+@cs.cmu.edu (Ralf Brown) Newsgroups: comp.os.msdos.programmer,comp.os.os2.programmer Subject: Re: Info on Changing Stacks in protected mode Message-ID: <1991Apr13.153517.10767@cs.cmu.edu> Date: 13 Apr 91 15:35:17 GMT References: <1991Mar29.155840.2626@netcom.COM> <71689@microsoft.UUCP> Sender: netnews@cs.cmu.edu (USENET News Group Software) Organization: School of Computer Science, Carnegie Mellon Lines: 21