Xref: utzoo comp.os.msdos.programmer:4337 comp.os.os2.programmer:563 Path: 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 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