Datasheet

Instruction Set Description
www.ti.com
4.6.2.9 CALL
CALL Call a subroutine in lower 64KB
CALL dst
Syntax
Operation dst PC 16-bit dst is evaluated and stored
SP – 2 SP
PC @SP updated PC with return address to TOS
tmp PC saved 16-bit dst to PC
Description A subroutine call is made from an address in the lower 64KB to a subroutine address in
the lower 64KB. All seven source addressing modes can be used. The call instruction is
a word instruction. The return is made with the RET instruction.
Status Bits Status bits are not affected.
PC.19:16 cleared (address in lower 64KB)
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 (lower 64KB) or call directly to
address.
CALL #EXEC ; Start address EXEC
CALL #0AA04h ; Start address 0AA04h
Symbolic Mode: Call a subroutine at the 16-bit address contained in address EXEC.
EXEC is located at the address (PC + X) where X is within PC + 32 K.
CALL EXEC ; Start address at @EXEC. z16(PC)
Absolute Mode: Call a subroutine at the 16-bit address contained in absolute address
EXEC in the lower 64KB.
CALL &EXEC ; Start address at @EXEC
Register mode: Call a subroutine at the 16-bit address contained in register R5.15:0.
CALL R5 ; Start address at R5
Indirect Mode: Call a subroutine at the 16-bit address contained in the word pointed to by
register R5 (20-bit address).
CALL @R5 ; Start address at @R5
172
CPUX SLAU144JDecember 2004Revised July 2013
Submit Documentation Feedback
Copyright © 2004–2013, Texas Instruments Incorporated