(l0) lda &l1
This line is labeled "l0", and performs an LDA operation with the contents
of the line labeled "l1".
(l1) $5555
This line is labeled "l1" and contains the constant 0x5555.
inca
Not all instructions require operands, and labels are optional.
lda * &l3
This line uses indirect addressing, denoted by the asterisk.
jpa $a
Constants need not be of fixed length.
(mylabel1) &mylabel2
(mylabel2) &mylabel1
Here we have two lines, each of which contains the address of the other.
That's about all there is! Even though all the possible instructions /
addressing modes combinations are not shown, you should be able to figure
out how to write any command you need from those examples.
This assembler is designed for Dr. Hernandez's toy processor as of February 2007. If the instruction
set or format changes, this won't work anymore.