Z8 Microcontrollers
ZiLOG Instruction Descriptions and Formats
UM001601-0803 12-17
CALL
CALL PROCEDURE
CALL
Call Procedure
CALL dst
Instruction Format:
Operation:
SP <— SP - 2
@SP <— PC
PC <— dst
The Stack pointer is decremented by two, the current contents of the Program Counter (PC) (address of the first
instruction following the CALL instruction) are pushed onto the top of the Stack, and the specified destination
address is then loaded into the PC. The PC now points to the first instruction of the procedure.
At the end of the procedure a RET (return) instruction can be used to return to the original program flow. RET will
pop the top of the Stack and replace the original value into the PC.
Note:
Address mode IRR can be used to specify a 4-bit Working Register Pair. In this format, the destination Working
Register Pair operand is specified by adding 1110B (EH) to the high nibble of the operand. For example, if Working
Register Pair RR12 (CH) is the destination operand, then ECH will be used as the destination operand in the Op
Code.
Flags: C: Unaffected
Z: Unaffected
S: Unaffected
V: Unaffected
D: Unaffected
H: Unaffected