UM012811-0904
eZ8 CPU Instruction Set Description
eZ8 CPU
User Manual
84
CALL
CALL Procedure
CALL dst
Operation
SP
←
SP - 2
@SP
←
PC
PC
←
dst
Description
The Stack Pointer decrements by two, the current contents of the Program Counter, which
is the 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 Program
Counter. The Program Counter now points to the first instruction of the procedure.
At the end of the procedure, a RET instruction returns to the original program flow. RET
pops the top of the stack and replaces the original value into the Program Counter.
Flags
Attributes
Escaped Mode Addressing
Using Escaped Mode Addressing, address mode IR specifies a Working Register. If the
destination address is prefixed by
EH
(1110B), a Working Register is inferred. For exam-
ple, if Working Register R12 (
CH
) is the desired destination operand, use
ECH
as the desti-
nation operand in the opcode. To access Registers with addresses
E0H
to
EFH
, either set
the Working Group Pointer, RP[7:4], to
EH
or use indirect addressing.
C
Unaffected.
Z
Unaffected.
S
Unaffected.
V
Unaffected.
D
Unaffected.
H
Unaffected.
Mnemonic
Destination
Opcode (Hex)
Operand 1
Operand 2
Operand 3
CALL
@RR1
D4
RR1
—
—
CALL
DA
D6
DA[15:8]
DA[7:0]
—