Z-80 Instructions: Part J.


CALL AND RETURN GROUP

Mnemonic
Symbolic
Operation
Flags OP-Code No. of
Bytes
No. of
M Cycles
No. of
T Cycles

Comments
C Z P/V S N H 76 543 210
CALL nn (SP-1) ← PCH
(SP-2) ← PCL
SP ← SP - 2
PC ← nn
11 001 101
← n →
← n →
3 5 17  
CALL cc,nn If condition
cc is false
continue,
otherwise
same as
CALL nn
11  cc  100
← n →
← n →
3
3
3
5
10
17
If cc is false
If cc is true
 
  cc    Condition
 000   NZ non zero
 001   Z   zero
 010   NC non carry
 011   C   carry
 100   PO parity odd
 101   PE parity even
 110   P   sign positive
 111   M   sign negative
RET PCL ← (SP)
PCH ← (SP+1)
SP ← SP + 2
11 001 001 1 3 10  
RET cc,nn If condition
cc is false
continue,
otherwise
same as
RET
11  cc  000 1
1
1
3
5
11
If cc is false
If cc is true
 
cc same as for
  CALL cc,nn
RETI Return from
interrupt.
PCL ← (SP)
PCH ← (SP+1)
SP ← SP + 2
11 101 101
01 001 101
2 4 14 Same as RET
except detected by
interrupting device
to re-enable interrupts.
RETI Return from
non maskable
interrupt.
PCL ← (SP)
PCH ← (SP+1)
SP ← SP + 2
11 101 101
01 000 101
2 4 14 Same as RET
except detected by
interrupting device
to re-enable interrupts.
RST p (SP-1) ← PCH
(SP-2) ← PCL
PCH ← 0
PCL ← P
SP ← SP - 2
11   t   111 1 3 11    t        P
 000   00H
 001   08H
 010   10H
 011   18H
 100   20H
 101   28H
 110   30H
 111   38H

 Flag Notation:   • = flag not affected, 0 = flag reset, 1 = flag set, X = flag is unknown, 
   ↕ = flag is affected according to the result of the operation.