On 17/07/16 20:37, Segher Boessenkool wrote:
Regarding the documentation, I wasn't too worried about this since it's fairly obvious that calling another word is going to involve another r-stack push from the caller (and indeed it was the first thing that stood out when I tried your code in the debugger).
It surprises me every. single. time.
Really?!?
If you would like to suggest something suitable in a maximum of a couple of lines you think would help then I don't mind adding it in a v2, however compared to other undocumented gotchas in the Forth code I've come across whilst working on OpenBIOS this was very easy to figure out so I can't get too excited about it.
\ WARNING: Deep magic ahead!
Ha! If this were the general guideline then that comment would be replicated a lot throughout the entire OpenBIOS codebase so I'll give this a miss for now ;)
ATB,
Mark.