delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/11/21/12:47:02

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: Fri, 21 Nov 2003 19:45:24 +0200
From: "Eli Zaretskii" <eliz AT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp AT delorie DOT com
Message-Id: <2504-Fri21Nov2003194524+0200-eliz@elta.co.il>
X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9
In-reply-to: <3FBD798B.630F1701@worldnet.att.net> (message from Les Cargill on
Fri, 21 Nov 2003 02:32:08 GMT)
Subject: Re: Stack stuff...
References: <3FBC6527 DOT A66A8218 AT worldnet DOT att DOT net> <u4qwzvvrv DOT fsf AT elta DOT co DOT il> <3FBD798B DOT 630F1701 AT worldnet DOT att DOT net>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: Les Cargill <lcargill AT worldnet DOT att DOT net>
> Newsgroups: comp.os.msdos.djgpp
> Date: Fri, 21 Nov 2003 02:32:08 GMT
> > 
> > In C, the easiest way is to use the longjmp library function.
> >
> > Why do you need to use "asm"?
> 
> To give the stack pointer an initial value, so that each "thread"
> can have its own stack. 

As someone else already pointed out, longjmp can do that just fine.

> I note that the arguments to asm are reversed from the output
> assembly for the "mov" instruction.

Actually, it's the other way around: the Intel asm format (which you
seem to be used to) has the arguments reversed, while the AT&T format
used by GCC and other GNU tools has the arguments in their One And
Only Correct Order (tm).

- Raw text -


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