Understanding Arg = Pop()

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Understanding Arg = Pop()

pawdwanlearner
Ok, im in home stretch but i am having a hard time understanding what is meant by *arg = pop. Pop it from where. And where does it go after you pop it. Ive looked over the diagrams 100 times but im not seeing it. Any help is appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: Understanding Arg = Pop()

cadet1620
Administrator
pop() means pop from RAM using SP, so *ARG = pop() is effectively the VM command "pop argument 0".

This is moving the return value from the top of the current function's stack to what will be the top of the calling function's stack after the return.

--Mark