Re: [Flashforth-devel] jumping without a return
Brought to you by:
oh2aun
From: Mikael N. <mik...@fl...> - 2021-04-22 11:36:39
|
I am not sure what you are after, but the Forth way is to use EXECUTE. If you give an address to EXECUTE on the parameter stack, the code execution will continue at that address. 12 ok<$,ram> 12 2+ ok<$,ram> 14 ' 2+ ok<$,ram> 14 15b8 execute ok<$,ram> 16 Any other solution must revert to ATmega assembler to compile a jmp or ijmp. In order to not break the Forth there must by a return address on the stack. That gets you back to after the address where EXECUTE was executed. What do you want to achieve ? On 2021-04-22 04:06, Christopher Howard wrote: > Hi, I was wondering if in FlashForth there was some trick to execute a word without throwing anything on the return stack? Kind of like you would with a tail call recursion, but in any arbitrary place? It looks like there are some jumping instructions in ff5 reference but I don't understand how to use them. I'm thinking in avr context if that makes a difference. > > Christopher Howard |