🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #5532

Re: Info on Changing Stacks in protected mode

#5532
From: DJ Delorie
Date: Fri, 29 Mar 1991 19:45
22 lines
1266 bytes
In article <1991Mar29.155840.2626@netcom.COM> resnicks@netcom.COM (Steve Resnick) writes:
>Is it necessary to disable interrupts while switching stacks in protected 
>mode? If so, what is the appropriate meathod under OS/2? Is there a call
>to prevent task switching/interrupt processing? Or, should it be implemented
>as part of an IOPL segment? 

The Intel programming manuals state that after any instruction that
loads the stack segment register (SS), interrupts will be temporarily
disabled until the completion of the next instruction.  Thus, you can
do this:

	mov	ss,ax
	mov	sp,bx

and interrupts will not be enabled between the two.

Note for 386's:  Intel recommends using the LSS opcode to prevent
page faults and other exceptions between the two above instructions.


DJ
dj@ctron.com
Technical Details
Message-ID: <1365@bragi.ctron.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!bragi!dj
References: <1991Mar29.155840.2626@netcom.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!bragi!dj
From: dj@bragi.ctron.com (DJ Delorie)
Newsgroups: comp.os.msdos.programmer,comp.os.os2.programmer
Subject: Re: Info on Changing Stacks in protected mode
Message-ID: <1365@bragi.ctron.com>
Date: 29 Mar 91 19:45:57 GMT
References: <1991Mar29.155840.2626@netcom.COM>
Followup-To: comp.os.msdos.programmer
Organization: None whatsoever
Lines: 21