Texas Instruments TMS320C28x Reference Manual page 531

Dsp cpu and instruction set
Table of Contents

Advertisement

XCALL *AL
XCALL *AL
SYNTAX OPTIONS
XCALL *AL
Operands
*AL
Description
Flags and
Modes
Repeat
Example
; Call function in FuncTable selected by FuncIndex value.
; This example only works for code located
; program space:
FuncTable:
.word
.word
MOVL
MOVZ
MOV
XCALL
FuncA:
XRETC
FuncB:
XRETC
6-374
Indirect program-memory addressing using register AL, can only access
high 64K of program space range (0x3F0000 to 0x3FFFFF)
Indirect call with destination address in AL. The lower 16 bits of the current
PC address are saved onto the software stack. Then, the low 16 bits of PC is
loaded with the contents of register AL and the upper 6 bits of the PC are
loaded with 0x3F:
temp(21:0) = PC + 1;
[SP] = temp(15:0);
SP = SP + 1;
C
= 0x3F:AL;
T
Note:
his instruction can only transfer program control to a location located in the upper 64K
range of program space (0x3F0000 to 0x3FFFFF). To return from a call made by
XCALL, the XRETC instruction must be used.
None
This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.
FuncA
FuncB
.
.
XAR2,#FuncTable
AR0,@FuncIndex
AL,*+XAR2[AR0]
*AL
.
.
.
.
UNC
.
.
UNC
C2 x LP Source-Compatible Function Call
OPCODE
0101 0110 0011 0100
; Function address table:
; FuncA address
; FuncB address
; XAR2 = pointer to FuncTable
; AR0 = FuncTable index
; AL = Table[FuncIndex]
; Indirect call using AL
; Function A:
; Return unconditionally
; Function B:
; Return unconditionally
OBJMODE
RPT
1
in upper 64K of
CYC
7

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C28x and is the answer not in the manual?

Table of Contents

Save PDF