Restoring LCL and ARG after return from calee function
When Implement the return command in assembly from what we should do is restoring
-endframe = LCL
-retaddress = *(endfram-5)
-*ARG = pop()
I ask the LCL pointer may be changed during the computation on the callee function so it isn't still far from the retaddress by 5 locations and also the ARG pointer may be changed on the callee function so it doesn't refer to the argument0. ARG pointer may point to argument3 before return to the caller function.
These two points I can't understand them. can anyone explain them to me?