The following are the decimal definition values of each instruction:
- ADD: 68
- AND: 67
- CJR0: 192
- LDIR0: 0
- MOV: 128
- NAND: 65
- NOR: 66
- OR: 64
- SUB: 69
In my format, to make it easier, I encoded the operands for the mov instruction as constants.
You have <o|i>r<0-5> along with IN and OUT. Registers prefixed with i
are interpreted as the input register,
or in the move instruction, the source. o
is interpeted as the destination. Because of the format, it doesn't
matter what order the operands are in, they just must have a plus to combine them (bitwise or):
# these are the same
MOV+ir0+or1
MOV+or1+ir0