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