delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/11/21/15:30:46

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Message-ID: <3FBE7546.C49C87EF@worldnet.att.net>
From: Les Cargill <lcargill AT worldnet DOT att DOT net>
X-Mailer: Mozilla 4.72 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
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> <2504-Fri21Nov2003194524+0200-eliz AT elta DOT co DOT il>
Lines: 36
Date: Fri, 21 Nov 2003 20:26:08 GMT
NNTP-Posting-Host: 12.74.254.72
X-Complaints-To: abuse AT worldnet DOT att DOT net
X-Trace: bgtnsc05-news.ops.worldnet.att.net 1069446368 12.74.254.72 (Fri, 21 Nov 2003 20:26:08 GMT)
NNTP-Posting-Date: Fri, 21 Nov 2003 20:26:08 GMT
Organization: AT&T Worldnet
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii wrote:
> 
> > 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.
> 

At an (extremely) small cost in overhead. 

> > 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)

Only when Intel-ing. 

> 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).

Quoth the Book of Moto: source -> destination . 

I thank you, gentlemen. 

--
Les Cargill

- Raw text -


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