How do I get the return address (ROM)?

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

How do I get the return address (ROM)?

Jimmy Giessler
I know this must be obvious and simple, but I can't figure out how to retrieve the return address to push on the stack before making a function call?

Thanks,
Jimmy
Reply | Threaded
Open this post in threaded view
|

Re: How do I get the return address (ROM)?

WBahn
Administrator
This may be giving out too much of a hint, but I think it parallels what is in the text. Create a unique label and add it to the assembly output at the point you want to return to and then push that same label onto the stack.
Reply | Threaded
Open this post in threaded view
|

Re: How do I get the return address (ROM)?

Jimmy Giessler
Thank you sir! And – no, you didn't give away too much. You saved me from staring blankly at my computer screen for the next week. I have this incredible talent of missing the obvious. Lord knows how I ever made it through the "Hello World" program.

Best regards,
Jimmy