[OpenBIOS] Implementing a second return stack

Programmingkid programmingkidx at gmail.com
Sun Apr 17 05:44:11 CEST 2016

On Apr 16, 2016, at 11:02 PM, Segher Boessenkool wrote:

> On Sat, Apr 16, 2016 at 10:44:47PM -0400, Programmingkid wrote:
>>> No; just implement a version of >R etc. that work in interpret mode.  Like
>>> : >r  state @ IF postpone >r EXIT THEN
>>>     ( and here, do the push to the simulated R stack ) ; IMMEDIATE
>>> (And easier/cleaner/nicer if your system has separate compile and interpret
>>> behaviours for all words, or a separate compiler wordlist).
>>> r is implemented in forth.c in c.
> The "new" (here defined, in that colon def above) >R calls the "old"
> version of >R (via "postpone >r").  Don't try to cram everything into
> the "old" definition, unles you like complexity (and that complexity
> can be quite enormous, look up what "state smart" words are).

That code above looks a bit complex. I think implementing another word would be a lot simpler. 

More information about the OpenBIOS mailing list