delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/12/05:07:06

Date: Sun, 12 Apr 1998 12:06:03 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Michele Manzato <aragorn AT dei DOT unipd DOT it>
cc: djgpp AT delorie DOT com
Subject: Re: Creating and using a protected stack area: how?
In-Reply-To: <Pine.GSO.3.93.980410130622.5959A-100000@ogni9>
Message-ID: <Pine.SUN.3.91.980412120542.3322Q-100000@is>
MIME-Version: 1.0

On Fri, 10 Apr 1998, Michele Manzato wrote:

> then when I have to switch the stack I simply copy SS to %ss and ESP to
> %esp (with an assembly procedure).

I don't think this approach will work.  GCC assumes SS = DS, so code
generated by GCC will not work correctly if you switch SS under its
feet.

But you can have separate stacks in the same segment (i.e., change ESP
but leave SS alone).

- Raw text -


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