
Instruction Set Description
4.6.4.3
CALLA
CALLA
Call a subroutine
CALLA dst
Syntax
Operation
dst
→
tmp 20-bit dst is evaluated and stored
SP – 2
→
SP
PC.19:16
→
@SP updated PC with return address to TOS (MSBs)
SP – 2
→
SP
PC.15:0
→
@SP updated PC to TOS (LSBs)
tmp
→
PC saved 20-bit dst to PC
Description
A subroutine call is made to a 20-bit address anywhere in the full address space. All
seven source addressing modes can be used. The call instruction is an address-word
instruction. If the destination address is contained in a memory location X, it is
contained in two ascending words, X (LSBs) and (X + 2) (MSBs). Two words on the
stack are needed for the return address. The return is made with the instruction RETA.
Status Bits
N:
Not affected
Z:
Not affected
C:
Not affected
V:
Not affected
Mode Bits
OSCOFF, CPUOFF, and GIE are not affected.
Examples
Examples for all addressing modes are given.
Immediate mode: Call a subroutine at label EXEC or call directly an address.
CALLA
#EXEC
; Start address EXEC
CALLA
#01AA04h
; Start address 01AA04h
Symbolic mode: Call a subroutine at the 20-bit address contained in addresses EXEC
(LSBs) and EXEC+2 (MSBs). EXEC is located at the address (PC + X) where X is
32 K. Indirect addressing.
CALLA
EXEC
; Start address at @EXEC. z16(PC)
Absolute mode: Call a subroutine at the 20-bit address contained in absolute addresses
EXEC (LSBs) and EXEC+2 (MSBs). Indirect addressing.
CALLA
&EXEC
; Start address at @EXEC
Register mode: Call a subroutine at the 20-bit address contained in register R5. Indirect
R5.
CALLA
R5
; Start address at @R5
Indirect mode: Call a subroutine at the 20-bit address contained in the word pointed to
by register R5 (LSBs). The MSBs have the address (R5 + 2). Indirect, indirect R5.
CALLA
@R5
; Start address at @R5
232
CPUX
SLAU272C – May 2011 – Revised November 2013
Copyright © 2011–2013, Texas Instruments Incorporated