Closed rzumer closed 5 years ago
Closed by https://github.com/rzumer/dez80/commit/4d6e917956aafc33690a4e859ac37bd44643c628.
This does require the opcode
member to be set correctly. Two cases are not covered:
opcode
based on the other members of an Instruction
An appropriate solution for the latter case would be to provide a constructor that does not require an opcode
, and infers it automatically. This can be tracked in a new issue if there is a need for it.
Instructions are now all defined and the model is specific enough that it is possible to losslessly re-assemble decoded (or manually generated) instructions. This could be useful for debugging or other use cases, so it is a feature worth adding.
Since the
instruction
module is getting very large, it might be a good idea to extract the decoder to its own module, and do the same with the encoder.