Modelling the Z80 instructions on the 6502

The Z80, 6502 register correspondence

Z806502
A, AFA, SR
B, C, BCzc+1, zc, zc
D, E, DEze+1, ze, ze
H, L, HLzl+1, zl, zl
SP
IXzx
IYzy

zc, ze, zl, zx, zy are words in the zero page memory.
zs is a word for temporary values in the ZP.
XR is always 0 - this allows to have faster (HL)-based addressing


The 6502 and Z80 have several architectural differences which makes the emulation of several the Z80's features almost impossible:


The 6502 instructions for the Z80 instructions

Links to similar tables

References

  1. Mohamed Rafiquzzaman Microprocessors and Microcomputer Development Systems: Designing Microprocessor-Based Systems, Harper and Row, 1984
  2. Commodore+4 info sheet