Re: Understanding the x18 instruction jump table
"Helen Austin" <[email protected]>
| Newsgroups | gmane.comp.lang.forth.colorforth |
|---|---|
| Message-ID | <[email protected]> |
On 6/14/06, John Drake <[email protected]> wrote: > I'm aware of the "32 words - one for every 5-bit > opcode" part. I guess that's why I found the > repeated instructions a bit odd. It's also > different from what was reported in Chuck's > paper on the subject. > : inst ( n ) 1 slot +! 1f and jump ret nul call > jmp nul nul jz jns n @+ @b @a !r !+ !b !a > +* 2* 2/ - + and or drop dup over pop a nul > b! push a! Well... I'm going to hazard a guess here. jmp and ret are the same operation; they just get their operand from different places. jmp gets it inline and ret gets it from the return stack. Perhaps this has been generalised across all control-flow words now, to provide "conditional return" instructions as well as a coroutine instruction? That would also explain where ; went; and if an LSB of 0 means "find the destination on the return stack", that would explain why ; becomes "4 [ ip ] +". Just some completely random, unfounded speculation :) Regards Helen