mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-29 14:48:05 +11:00
16 lines
665 B
Plaintext
16 lines
665 B
Plaintext
|
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,".
|
||
|
|
||
|
H@ offset at which we consider our PC 0. Used to compute PC. To
|
||
|
have a proper PC, call "H@ ORG !" at the beginning of your
|
||
|
assembly process.
|
||
|
|
||
|
Labels are a convenient way of managing relative jump
|
||
|
calculations. Backward labels are easy. It is only a matter or
|
||
|
recording "HERE" and do subtractions. Forward labels record the
|
||
|
place where we should write the offset, and then when we get to
|
||
|
that point later on, the label records the offset there.
|
||
|
|