From: | Allan Odgaard |
Date: | 22 Sep 2000 at 09:30:48 |
Subject: | Re: Stack |
On 21-Sep-00, Alastair M. Robinson wrote:
>> The compilers I know use link & unlink [...]
> Good point. So for which compilers is this true?
At least StormC -- the statement was made based on all the code I've
resourced in the past, here I frequently saw the two commands, and
actually this was often a good indication of wether the code was
written in C or assembler... apparently things have changed...
> The other potential disaster is the compiler generating code like:
> move.l #newstack,-(a7)
> jsr (_LVOStackSwap,a6)
> adda.l #4,a7
All library calls use register args. One disaster is that there's a
stub for StackSwap in amiga.lib, and using this will definitely make
your program crash -- but this will only be used if you ommit the
proper exec-includes.
Regards Allan