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.

15 lines
586B

  1. For backward labels, set happens before write. For forward
  2. labels, write happen before set. The write operation writes a
  3. dummy placeholder, and then the set operation writes the offset
  4. at that placeholder's address.
  5. Variable actions are expected to be called with labels in
  6. front of them. Example, "L2 FSET"
  7. About that "1 -": z80 relative jumps record "e-2", that is,
  8. the offset that *counts the 2 bytes of the jump itself*.
  9. Because we set the label *after* the jump OP1 itself, that's 1
  10. byte that is taken care of. We still need to adjust by another
  11. byte before writing the offset.