Mirror of CollapseOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
640B

  1. EXECUTING A WORD
  2. At it's core, executing a word is pushing the wordref on PS and
  3. calling EXECUTE. Then, we let the word do its things. Some
  4. words are special, but most of them are of the compiledWord
  5. type, and that's their execution that we describe here.
  6. First of all, at all time during execution, the Interpreter
  7. Pointer (IP) points to the wordref we're executing next.
  8. When we execute a compiledWord, the first thing we do is push
  9. IP to the Return Stack (RS). Therefore, RS' top of stack will
  10. contain a wordref to execute next, after we EXIT.
  11. At the end of every compiledWord is an EXIT. This pops RS, sets
  12. IP to it, and continues.