Mirror of CollapseOS
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

17 lignes
690B

  1. Stack management
  2. The Parameter stack (PS) is maintained by SP and the Return
  3. stack (RS) is maintained by IX. This allows us to generally use
  4. push and pop freely because PS is the most frequently used.
  5. However, this causes a problem with routine calls: because in
  6. Forth, the stack isn't balanced within each call, our return
  7. offset, when placed by a CALL, messes everything up. This is
  8. one of the reasons why we need stack management routines below.
  9. IX always points to RS' Top Of Stack (TOS)
  10. This return stack contain "Interpreter pointers", that is a
  11. pointer to the address of a word, as seen in a compiled list of
  12. words.
  13. (cont.)