Return command implementation doubt

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

Return command implementation doubt

asev98
This post was updated on .


Does ARG = *(frame-3) mean if the address of frame-3 is, for example, 1 then ARG will have the value 1? Or it means that if frame-3 is 5 then ARG will have the value in the address 5?
Reply | Threaded
Open this post in threaded view
|

Re: Call command implementation doubt

cadet1620
Administrator
asev98 wrote


Does ARG = *(frame-3) mean if the address of frame-3 is, for example, 1 then ARG will have the value 1? Or it means that if frame-3 is 5 then ARG will have the value in the address 5?
The "*" is C/C++ syntax that means use the value to the right as a pointer.

If the address of the current stack frame is 261 then ARG = *(frame-3) means ARG = RAM[258].
This is restoring ARG to the value that was pushed onto the stack during the call command.

--Mark

Note: when you put a big screenshot into a post, it can be really hard for people with smaller screens to read. You can make it nicer for other people by adding width="100%" to the <nabble_img> tag so that the screenshot will always be the width of the viewer's browser.
<nabble_img width="100%" src="Immagine2.png" border="0"/>
Reply | Threaded
Open this post in threaded view
|

Re: Call command implementation doubt

asev98
Thank you very much, I was also wondering exactly how to reduce this huge screenshot