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.

Available tables:


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 most wait-states when running in R800 mode.


Flag Results

The kind of modification each instruction makes on the flags depends on the results of the operation. Some of the most important results are:

Note that INC and DEC instructions for 16 bit registers don't affect any flag.


Definitions used in the tables:


Z80 8 bit registers
000001010011100101110111
rbcdehla

R800 8 bit registers
000001010011100101110111
r.b.c.d.e.h.l.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
ppbcdeix/iysp

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

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

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

Index Register Modifiers (Z80/R800)
Bin
Hex
DDH
11011101B
FDH
11111101B
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
s-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
pcl/.pclpc/.pc LSB
pch/.pchpc/.pc MSB
tmptemporary

Register F/.F
bit76543210
flagSZ?H?PNC


Notes: