Changes

Z80

75 bytes added, 26 February
/* Oddities */
* While the syntax of the 8-bit ADD, ADC and SBC instructions all explicitly mention the A register, the SUB instruction does not mention it. On the Zilog eZ80, the SUB instruction explicitly mention the A register.
* The Z80 has a lot of 8-bit registers but it can only really do arithmetic on one of them, A.
* RLA, RRA, RLCA, RRCA are optimized versions of RL A, RR A, RLC A, RRC A.
* Many programs use XOR A to set A to zero, since it's one byte smaller and one M-cycle faster than LD A,0.
* Likewise, many programs use AND A or OR A to check if A is zero, since it's also one byte smaller and one M-cycle faster than CP 0.
13,173
edits