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

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Message-ID: <3FBD798B.630F1701@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>
Lines: 27
Date: Fri, 21 Nov 2003 02:32:08 GMT
NNTP-Posting-Host: 12.75.2.69
X-Complaints-To: abuse AT worldnet DOT att DOT net
X-Trace: bgtnsc04-news.ops.worldnet.att.net 1069381928 12.75.2.69 (Fri, 21 Nov 2003 02:32:08 GMT)
NNTP-Posting-Date: Fri, 21 Nov 2003 02:32: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: Thu, 20 Nov 2003 06:52:52 GMT
> >
> > How can I reassign SS and SP with "asm"
> > directives with the DJGPP toolset ( gcc,
> > essentially).
> 
> 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. 

My question, better stated, should have been "what are the macros
in the assembler, as used by GCC, that identify the esp register".

The answer is "%esp", judging from a "gcc -S" output file . 
The thing works fine. I note that the arguments to asm are
reversed from the output assembly for the "mov" instruction. 


--
Les Cargill

- Raw text -


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