These are the instructions that don't fit into any of the other categories. I'll mention them for completeness, but I think we're going to have to revisit their implementation when we start to emulate the Space Invaders hardware.
EI and DI enable and disable the processors ability to process interrupts. I added a interrupt_enabled flag to the processor state structure, and set and clear it through these instructions.
RIM and SIM seem to be used mostly for serial I/O. You can read the data book if you're curious, but Space Invaders does not use these commands. I will not be emulating them.
HLT is halt. I don't think we need to emulate this, although you might want to call your quit code (or exit(0)) if you see this instruction.
IN and OUT are instructions that the 8080 hardware used to talk to external hardware. For now, implement these but make them do nothing besides skip over its data byte. (We'll have to revisit this later).
NOP is "no operation". One use for NOP is to pad timing (it takes 4 CPU cycles to execute).
Another use for NOP is to modify code. Let's say you need to modify the game's ROM code. You can't just delete opcodes you don't want because to modify all the CALL and JMP instructions (they would be wrong if any of the code moves). Using NOPs could allow you to get rid of code. Adding code is much more difficult! It can be done by finding space in the ROM somewhere and changing an instruction to JMP.← Prev: logical-group Next: stack-group →
Disqus comments removed since ads were too intrusive. Instead, you can post questions or comments on Twitter @realemulator101, or if you find issues in the code, file them on the github repository.