Mirror of CollapseOS
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

17 řádky
735B

  1. BIN( is the addr at which the compiled binary will live. It is
  2. often 0.
  3. ORG is H@ offset at which we begin spitting binary. Used to
  4. compute PC. To have a proper PC, call "H@ ORG !" at the
  5. beginning of your assembly process. PC is H@ - ORG + BIN(.
  6. Labels are a convenient way of managing relative jump
  7. calculations. Backward labels are easy. It is only a matter or
  8. recording "HERE" and do subtractions. Forward labels record the
  9. place where we should write the offset, and then when we get to
  10. that point later on, the label records the offset there.
  11. To avoid using dict memory in compilation targets, we
  12. pre-declare label variables here, which means we have a limited
  13. number of it. For now, 4 ought to be enough. (cont.)