Re: How function works internally



Very basic article, for First Time Reader, (even i feel the best is to
learn x86 prog )

http://en.wikipedia.org/wiki/Call_stack

Cheers
Raxit Sheth

marydeepthy@xxxxxxxxx wrote:
Hi,

I would like to know what happens internally when a c programme is
executed. LIke,
when we call a function, all the previous values will be pushed on to
stack and the local variables of that particular function will be
pushed in to the stack. when the function returns, all the local
variables will be poped out..

like this, what happens when we call a strcpy function. what happens in
stack??

i would like to know from where we can get this information. any
sites..

i searched alot, but couldnt find.

Thanks in advance

Deepthy

.



Relevant Pages

  • Re: Local variables controversial?
    ... >>>Calforth uses local variables, but doesn't set a policy of what's good ... they are implemented using a stack frame. ... is still on the Forth data stack? ...
    (comp.lang.forth)
  • Re: Local variables controversial?
    ... Calforth uses local variables, but doesn't set a policy of what's good ... of simply popping the old stack pointer off the stack frame and ... Do I understand you right to mean that the actual data in the stack frame is still on the Forth data stack? ...
    (comp.lang.forth)
  • Re: Buffer overflow prevention
    ... > I have an idea on buffer overflow prevention. ... > the fact that we're using the stack, referenced by SS:ESP pair, both ... > procedure return address and for local variables. ... if we use first segment for passing variables ...
    (Bugtraq)
  • Re: Local variables controversial?
    ... >> you keep them on the stack the stack is minimally 4 deep, ... >Graphics always comes up when locals are discussed. ... I can summarize my ... >that don't ever require substandial stack thrashing OR local variables. ...
    (comp.lang.forth)
  • Re: Patching
    ... >That's what we call an execution vector. ... >is relatively common practice. ... >Common terminology in Forth is to call stack items "stack ... "Local variables" are items delivered to a word on the ...
    (comp.lang.forth)