2020-04-20 10:36:13 +10:00
|
|
|
The following words allow you to assemble z80 binaries. Being
|
|
|
|
Forth words, opcode assembly is a bit different than with a
|
|
|
|
typical assembler. For example, what would traditionally be
|
|
|
|
"ld a, b" would become "A B LDrr,".
|
|
|
|
|
2020-04-28 05:04:37 +10:00
|
|
|
BIN( is the addr at which the compiled binary will live. It is
|
|
|
|
often 0.
|
2020-04-20 10:36:13 +10:00
|
|
|
|
2020-04-28 05:04:37 +10:00
|
|
|
ORG is H@ offset at which we begin spitting binary. Used to
|
|
|
|
compute PC. To have a proper PC, call "H@ ORG !" at the
|
|
|
|
beginning of your assembly process. PC is H@ - ORG + BIN(.
|
2020-04-20 10:36:13 +10:00
|
|
|
|
2020-04-28 05:04:37 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(cont.)
|