From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <599f06db0603060731w45549c3bw64296d1f17379498@mail.gmail.com> Date: Mon, 6 Mar 2006 16:31:51 +0100 From: "Gorka guardiola" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> Subject: Re: [9fans] bug in asm.ps In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <599f06db0603060712l2fc621f1jbeaa3ad41d709d96@mail.gmail.com> Topicbox-Message-UUID: 0bad02d4-ead1-11e9-9d60-3106f5b1d025 Ok, but what I meant is that the automatics are upside down growing from n to 0 as the memory grows. Of course if you call any functions, the SP point= s to the last space left for their arguments. As far as I understand if you d= ont call any functions, 0(SP) is the last automatic. If you dont have any automatics, SP points to the return PC. If you call any functions there is = space for their args (probably for the args of the functions with the biggest number of args) and SP is pointing to the last space which will be the first arg, because they gro from 0 to n as the memory grows. On 3/6/06, Brantley Coile wrote: > SP doesn't point to the last automatic on the stack. > Not only is the automatics on the local stack, but also > temporaries, like the ones to hold parameters to a function. > If you call any functions 4(SP) is the second parameter to functions. > > -- - curiosity sKilled the cat