Z80 and R800 Assembly/Machine Language Op-code Tables



These tables are compilations of different sources, including Z80 instruction set tables and an article of the Japanese "MSX Magazine" (issue of 1990-Nov.) with R800 Assembly.


Tables entries:

* The time spent by each instruction depends on the hardware architecture. MSX uses RAS/CAS memory banks, so some "wait states" may be generated when accessing memory, even when just reading the program op-codes. MSX turbo R is somehow optimized so it avoids some wait-states when running in R800 mode.


Definitions used in the tables:


Z80 8 bit registers
000001010011100101110111
rbcdehla
ubcdea
vbcdea

R800 8 bit registers
000001010011100101110111
r.b.c.d.e.hl.a
u.b.c.d.e.ixh.ixl.a
v.b.c.d.e.iyh.iyl.a
p.ixh.ixl
q.iyh.iyl

Z80 16 bit registers
00011011
rrbcdehlaf
ssbcdehlsp
ppbcdeixsp
qqbcdeiysp

R800 16 bit registers
00011011
rr.bc.de.hl.af
ss.bc.de.hl.sp
pp.bc.de.ix.sp
qq.bc.de.iy.sp

Other Registers
Z80R800Name
i.iinterrupt vector
r.rrefresh register
pc.pcprogram counter

Bits
{b}bit b (3 bits number)
{x..y}bit range x..y
IFFinterrupt flip-flop
C1st bit of .f
N2nd bit of .f
P4th bit of .f
H5th bit of .f
Z7th bit of .f
S8th bit of .f

Index Register Modifiers (Z80/R800)
Bin
Hex
DDH
11011101
FDH
11111101
iiix/.ixiy/.iy

Reset/Break Addresses
000001010011100101110111
k00H08H10H18H20H28H30H38H

Symbolic operands
+add
-subtract
×multiply
÷divide
<<assign
<=>exchange
<less than
>greater than
=equal
[n]I/O port n
[.c]I/O port defined by .c
[nn]address pointer

Numbers
n8 bits
d-128..+127
nn16 bits
nnlnn "LSB"
nnhnn "MSB"

Logical Operations
¬not
&and
#or
^xor

Symbolic registers
sslss LSB
sshss MSB
rrlrr LSB
rrhrr MSB
iilii LSB
iihii MSB
pclpc/.pc LSB
pchpc/.pc MSB
tmptemporary

Register F/.F
bit76543210
flagSZHPNC


Notes: