Changes

Jump to: navigation, search

Z80

105 bytes added, 4 September
/* Oddities */
* All CB-prefixed opcodes and half of the standard opcodes (from &40 to &BF) follow a uniform layout. The exception is the HALT instruction (opcode &76), which replaces the expected LD (HL),(HL) instruction.
* RET and RETI and RETN are identical instructions[https://floooh.github.io/2021/12/17/cycle-stepped-z80.html#the-ei-di-and-retiretn-instructions Source]. The only reason for RETI is so that some other hardware can detect the specific case of returning from the interrupt, by detecting the RETI opcode on the data bus.
* EI has a 1-instruction delay. It is necessary for doing EI/RETI without any danger of nested interrupt routines.
* RST instructions are just a CALL instruction to a fixed address baked in the instruction itself
8,326
edits