Calla – Zilog Z16F2810 User Manual
Page 97

UM018809-0611
CALLA Instruction
ZNEO
®
CPU Core
User Manual
81
CALLA
Definition
CALL Absolute
Syntax
CALLA dst
Operation
SP
SP
–
4
(SP)
PC
PC
dst
Description
The CALLA instruction decrements the Stack Pointer (R15) by four and stores the current Pro-
gram Counter value onto the top of the stack. The pushed PC value points to the first instruction
following the CALLA instruction. Then the 32-bit immediate operand is loaded into the Program
Counter and execution of the procedure begins. After the procedure completes, it uses a RET
instruction to pop the previous PC value and return from the procedure.
If the immediate operand is odd, the least significant bit is discarded so that the call destination
address is always an even number.
The CALLA instruction is used to explicitly invoke the 32-bit immediate call opcode in situa-
tions when a fixed opcode size is desired, such as a jump table.
Flags
Flags are not affected by this instruction.
Syntax and Opcodes
Example
Before:
PC=0000_044EH, SP=FFFF_DB22H
CALLA 00352920H
;Object Code: F231 0035 2920
After:
PC=0035_2920, SP=FFFF_DB1EH, FFFF_DB1EH=0000_0454H
Instruction, Operands
Word 0
Word 1
Word 2
CALLA imm32
F231H
imm[31:16]
imm[15:0]