[OpenBIOS] [PATCH] interpreter.fs: allow evaluate to split words on CR as well as LF

Segher Boessenkool segher at kernel.crashing.org
Sun Jun 21 01:07:40 CEST 2015


On Sat, Jun 20, 2015 at 08:41:28PM +0100, Mark Cave-Ayland wrote:
> So the real problem here appears to be that the OS 9 bootscript is using
> the rstack in order to store temporary variables.  Since the Forth
> version of interpret is based in a loop which looks up each word in turn
> and then runs execute, the manipulation of the rstack with r> confuses
> the loop causing it to drop out early.

You should use a separate (software) stack for rstack things in interpret
mode (this is what other OF implementations do).

> I think the real solution here is to evaluate the Forth string in
> compile mode to an anonymous word in the dictionary and then execute it
> directly, but I'd welcome any other ideas.

That isn't going to work, not without a lot more hackery (the script
creates many definitions by itself).


Segher



More information about the OpenBIOS mailing list