There are two issues with our current opcode/addressing mode unit tests:
- The current tests use the conceit of having each opcode repeat its opcode as an operand, which isn't sufficient to test endianness of output on its own.
- The unit tests are hand-generated instead of machine generated from the opcode specs.
gensets.py should get a companion script gentests.py to generate the test cases, and the test instructions' arguments should produce predictable bytes distinct from the opcodes themselves and from each other.