[A83] Re: "forget" ret with calls ?
[Prev][Next][Index][Thread]
[A83] Re: "forget" ret with calls ?
Simple,
pop a variable, directly after the label you called to, and you're in business.
though this only works if you haven't popped any vars on the stack before
calling
another approach (safer!!) is:
store the stack pointer to a safer location.
restore the stack pointer before calling...
at the start:
ld (stackvar),sp ; stackvar is a locationyou choose to be somewhere in saferam
at the place you want to exit:
ld sp,(stackvar)
ret
--Peter-Martijn
>
>
> Is it possible to make the calc "forget" it was busy doing a call, so that
> when a ret command is given in a call the program returns to the TI-OS
> rather than returning to the place where the call was made?
>
> Thank you,
>
> Hasan Güdük
>
>
>
> _________________________________________________________________
> Join the worlds largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>
>
>
References: