X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: NoEmailAds AT execpc DOT com (Chris Giese) Newsgroups: comp.os.msdos.djgpp Subject: Re: Stack stuff... Date: Fri, 21 Nov 2003 04:34:31 GMT Organization: PROPULSION GROUP Message-ID: <3fbd9561.2602583@news.voyager.net> References: <3FBC6527 DOT A66A8218 AT worldnet DOT att DOT net> <3FBD798B DOT 630F1701 AT worldnet DOT att DOT net> X-Newsreader: Forte Free Agent 1.21/32.243 X-Complaints-To: abuse AT supernews DOT com Lines: 20 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Les Cargill wrote: >Eli Zaretskii wrote: >> >> > From: Les Cargill >> > >> > 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. longjmp() can do that: http://my.execpc.com/~geezer/osd/tasks/setjmp.c