Texas Instruments TMS320C28x Reference Manual page 277

Dsp cpu and instruction set
Table of Contents

Advertisement

LB 22bit
LB 22bit
SYNTAX OPTIONS
LB 22bit
Operands
22bit
Description
Flags and
Modes
Repeat
Example
; Branch to subroutines in SwitchTable selected by Switch
; value:
SwitchTable:
.long
.long
MOVL
Table
MOVZ
MOVL
LB
SwitchReturn:
Switch0:
LB
Switch1:
LB
6-120
22-bit program-address (0x000000 to 0x3FFFFF range)
Long branch. Load the PC with the selected 22-bit program address:
PC = 22bit;
None
This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.
Switch0
Switch1
.
.
XAR2,#Switch-
AR0,@Switch
XAR7,*+XAR2[AR0] ; XAR7 = SwitchTable[Switch]
*XAR7
.
.
.
.
SwitchReturn
.
.
SwitchReturn
OPCODE
0000 0000 01CC CCCC
CCCC CCCC CCCC CCCC
; Switch address table:
; Switch0 address
; Switch1 address
; XAR2 = pointer to SwitchTable
; AR0
= Switch index
; Indirect branch using XAR7
; Function A:
; Return: long branch
; Function B:
; Return: long branch
Long Branch
OBJMODE
RPT
CYC
X
4

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