FANDOM



Z80chip
The Crib sheet below can be downloaded in Word format from the Crib Sheets page.



CPU Model

A

F(flags)

 

B

C

 

D

E

 

H

L

Stack Pointer

I

R

Interrupt and Refresh

IX

Index  

IY

Index

SP

Stack Pointer

PC

Program Counter

Flags

Logic Operators

C

carry

Opcode

Description

Store

Flags

N

add/subtract

AND

Acc AND memory/register 

Acc

S,Z,H,P/V

P/V

parity/overflow

*

Unused 

OR

Acc OR memory/register 

Acc

S,Z,H,P/V

H

half carry

*

Unused

XOR

Acc EOR memory/register 

Acc

S,Z,H,P/V

Z

zero

S

sign 

Addressing Mode

Form

Description

Implied

Opcode reg,(HL)

HL is address of memory location of data

Immediate

OpCode reg, #1BN

1BN is Data

OpCode regpair, #2BN

2BN is Data

Direct

OpCode  A, (1BN)

1BN is memory location of Data

OpCode   regpair, (2BN)

2BN is memory location of Data

Program Relative

OpCode   flag, 1BN

1BN plus PC is memory location of Data 

Register Indirect

OpCode  (regpair)

regpair is address of memory location of Data

Indexed

OpCode  reg, (Ireg+1BN)

Ireg+1BN is address of memory location of Data

Exchange and Alternative Register Set

Instruction

Description

EX AF,A`F`

Exchange contents of AF and A`F`

EXX

Exchange contents of BC,DE and HL with BC`,DE` and HL`

EX DE,HL

Exchange contents

EX (SP),HL

Exchange top two bytes of stack with contents of HL

EX (SP),IX/IY

Exchange top two bytes of stack with contents of IX or IY

Jump on Status Flag

Flag

Description

Branch if Set

Branch if Not Set

C

Carry -greater/equal

JR C, disp

JR NC, disp

Z

Zero - equal

JR Z, disp

JR NZ, disp

disp = displacement added to PC