Texas Instruments TMS320C28x Reference Manual page 528

Dsp cpu and instruction set
Table of Contents

Advertisement

Example
; Branch to subroutines in SwitchTable selected by Switch value.
; This example only works for code located
; program space:
SwitchTable:
.word
.word
MOVL
MOVZ
MOV
XB
SwitchReturn:
Switch0:
XB
Switch1:
XB
Switch0
Switch1
.
.
XAR2,#SwitchTable
AR0,@Switch
AL,*+XAR2[AR0]
*AL
.
.
.
SwitchReturn,UNC
.
.
SwitchReturn,UNC
in upper 64K of
; Switch address table:
; Switch0 address
; Switch1 address
; XAR2 = pointer to SwitchTable
; AR0
= Switch index
; AL = SwitchTable[Switch]
; Indirect branch using AL
; Subroutine 0:
; Return: branch
; Subroutine 1:
; Return: branch
XB pma,COND
6-371

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?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF