Q: I understand the Open Firmware has two stacks for passing parameters. I'm familiar with the data stack, but what is the return stack and can I use it?
A: The return stack is used by the Forth interpreter to store the return address from a calling word to a called word. You can use the return stack in a colon definition for temporary storage. You must return the return stack to the depth at which is was when the colon definition was started before the colon definition is completed or the return linkage to the calling word will be destroyed.
|