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
807B

  1. The following words allow you to assemble z80 binaries. Being
  2. Forth words, opcode assembly is a bit different than with a
  3. typical assembler. For example, what would traditionally be
  4. "ld a, b" would become "A B LDrr,".
  5. The "argtype" suffix after each mnemonic is needed because the
  6. assembler doesn't auto-detect the op's form based on arguments.
  7. It has to be explicitly specified. "r" is for 8-bit registers,
  8. "d" for 16-bit ones, "i" for immediate, "c" is for conditions.
  9. Be aware that "SP" and "AF" refer to the same value: some 16-
  10. bit ops can affect SP, others, AF. If you use the wrong argu-
  11. ment on the wrong op, you will affect the wrong register.
  12. Mnemonics having only a single form, such as PUSH and POP,
  13. don't have argtype suffixes.
  14. (cont.)