(D8080) Call and Return Instructions

Mnemonic

Symbolic
Operation

Flags
S    Z    H    P    C

Opcode
76 543 210

Hex

Bytes

M
Cycles

Clock
Cycles

Comments

CALL  nn

SP ¬ SP - 1
(SP) ¬ PCH
SP ¬ SP - 1
(SP) ¬ PCL
PC ¬ nn

•     •     •     •     •

11 001 101
¬    n     ®
¬    n     ®

CD

3

5

17

 

CNZ   nn

if NZ is true,
SP ¬ SP - 1
(SP) ¬ PCH
SP ¬ SP - 1
(SP) ¬ PCL
PC ¬ nn

•     •     •     •     •

11 000  100
¬    n     ®
¬    n     ®

C4

3
3

3
5

10
17

if NZ is false
if NZ is true

CZ  nn

if Z is true,
see above

•     •     •     •     •

11 001  100
¬    n     ®
¬    n     ®

CC

3
3

3
5

10
17

if Z is false
if Z is true

CNC  nn

if NC is true,
see above

•     •     •     •     •

11 010  100
¬    n     ®
¬    n     ®

D4

3
3

3
5

10
17

if NC is false
if NC is true

CC  nn

if Z is true,
see above

•     •     •     •     •

11 011  100
¬    n     ®
¬    n     ®

D8

3
3

3
5

10
17

if C is false
if C is true

CPO  nn

if PO is true,
see above

•     •     •     •     •

11 100  100
¬    n     ®
¬    n     ®

E4

3
3

3
5

10
17

if PO is false
if PO is true

CPE  nn

if PE is true,
see above

•     •     •     •     •

11 101  100
¬    n     ®
¬    n     ®

EC

3
3

3
5

10
17

if PE is false
if PE is true

CP  nn

if P is true,
see above

•     •     •     •     •

11 110  100
¬    n     ®
¬    n     ®

F4

3
3

3
5

10
17

if P is false
if P is true

CM  nn

if M is true,
see above

•     •     •     •     •

11 111  100
¬    n     ®
¬    n     ®

FC

3
3

3
5

10
17

if M is false
if M is true

RET

PCL ¬ (SP)
SP ¬ SP + 1
PCH ¬ (SP)
SP ¬ SP + 1

•     •     •     •     •

11 001 001

C9

1

3

10

 

RNZ

if NZ is true,
PCL ¬ (SP)
SP ¬ SP + 1
PCH ¬ (SP)
SP ¬ SP + 1

•     •     •     •     •

11 000  000

C0

1
1

1
3

5
11

if NZ is false
if NZ is true

RZ

if Z is true,
PCL ¬ (SP)
SP ¬ SP + 1
PCH ¬ (SP)
SP ¬ SP + 1

•     •     •     •     •

11 001  000

C8

1
1

1
3

5
11

if Z is false
if Z is true

RNC

if NC is true,
PCL ¬ (SP)
SP ¬ SP + 1
PCH ¬ (SP)
SP ¬ SP + 1

•     •     •     •     •

11 010  000

D0

1
1

1
3

5
11

if NC is false
if NC is true

RC

if C is true,
PCL ¬ (SP)
SP ¬ SP + 1
PCH ¬ (SP)
SP ¬ SP + 1

•     •     •     •     •

11 011  000

D8

1
1

1
3

5
11

if C is false
if C is true

RPO

if PO is true,
PCL ¬ (SP)
SP ¬ SP + 1
PCH ¬ (SP)
SP ¬ SP + 1

•     •     •     •     •

11 100  000

E0

1
1

1
3

5
11

if PO is false
if PO is true

RPE

if PE is true,
PCL ¬ (SP)
SP ¬ SP + 1
PCH ¬ (SP)
SP ¬ SP + 1

•     •     •     •     •

11 101  000

E8

1
1

1
3

5
11

if PE is false
if PE is true

RP

if P is true,
PCL ¬ (SP)
SP ¬ SP + 1
PCH ¬ (SP)
SP ¬ SP + 1

•     •     •     •     •

11 110  000

F0

1
1

1
3

5
11

if P is false
if P is true

RM

if M is true,
PCL ¬ (SP)
SP ¬ SP + 1
PCH ¬ (SP)
SP ¬ SP + 1

•     •     •     •     •

11 111  000

F8

1
1

1
3

5
11

if M is false
if M is true

RST i

SP ¬ SP - 1
(SP) ¬ PCH
SP ¬ SP - 1
(SP) ¬ PCL
PC ¬ p

•     •     •     •     •

11   t   111

 

1

3

11

_i_   _t_   __p__
 0    000   0000h
 1    001   0008h
 2    010   0010h
 3    011   0018h
 4    100   0020h
 5    101   0028h
 6    110   0030h
 7    111   0038h

Flag Notation:

• = flag is not affected.