Texas Instruments TMS320C28x Reference Manual page 217

Dsp cpu and instruction set
Table of Contents

Advertisement

BAR 16bitOffset,ARn,ARm,EQ/NEQ
BAR 16bitOffset,ARn,ARm,EQ/NEQ
SYNTAX OPTIONS
BAR 16bitOffset,ARn,ARm,EQ
BAR 16bitOffset,ARn,ARm,NEQ
Operands
16bit-
Offset
ARn
ARm
Syntax
Description
NEQ
Not Equal To
EQ
Equal To
Description
Flags and
Modes
Repeat
Example
;
String compare:
MOVL
MOVL
MOV
Loop:
MOVZ
MOVZ
BAR
BAR
NotEqual:
.
Exit:
6-60
16-bit signed immediate constant offset value (−32768 to +32767 range)
Lower 16 bits of auxiliary registers XAR0 to XAR7
Lower 16 bits of auxiliary registers XAR0 to XAR7
Compare the 16-bit contents of the two auxiliary registers ARn and ARm
registers and branch if the specified condition is true; otherwise continue
execution without branching:
If (tested condition = true) PC = PC + signed 16-bit offset;
If (tested condition = false) PC = PC + 2;
Note:
If (tested condition = true) then the instruction takes 4 cycles.
If (tested condition = false) then the instruction takes 2 cycles.
None
This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.
XAR2,#StringA
XAR3,#StringB
@AR4,#0
AR0,*XAR2++
AR1,*XAR3++
Exit,AR0,AR4,EQ
Loop,AR0,AR1,EQ
Branch on Auxiliary Register Comparison
OPCODE
1000 1111 10nn nmmm
CCCC CCCC CCCC CCCC
1000 1111 11nn nmmm
CCCC CCCC CCCC CCCC
Condition Tested
ARn != ARm
ARn = ARm
; XAR2 points to StringA
; XAR3 points to StringB
; AR4 = 0
; AR0 = StringA[i]
; AR1 = StringB[i], i++
; Exit if StringA[i] = 0
; Loop if StringA[i] = StringB[i]
; StringA and B not the same
; StringA and B the same
OBJMODE
RPT
CYC
1
4/2
1
4/2

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