Re: A89: Stupid Stack Operation Question


[Prev][Next][Index][Thread]

Re: A89: Stupid Stack Operation Question




>Why is that data added back to the stack?
>
>I know it is to correct the stack back to it's original
>position and I know how the stack operates but, doesn't 
>the called routine do that when it obtains (pops) these 
>passed parameters?  
>
>Why is correcting the stack necessary.

The system stack in asm is different then one in a HLL language.  In asm
you have acess to all values in the stack at all times.  Most programers
just read the values off the stack during a function, they do not play with
the stack pointer.  Temporary data is often stored in the stack as well.
In fact, it is a better programing method to de-allocate all of the stack
data needed for the function at once -- it makes programs much easier to
de-bug.

	--Nate


Follow-Ups: References: