Texas Instruments TMS320C28x Reference Manual page 216

Dsp cpu and instruction set
Table of Contents

Advertisement

BANZ 16bitOffset,ARn− −
SYNTAX OPTIONS
BANZ 16bitOffset,ARn−−
Operands
16bit-
Offset
ARn
Description
Flags and
Modes
Repeat
Example
; Copy the contents of Array1 to Array2:
; int32 Array1[N];
; int32 Array2[N];
; for(i=0; i < N; i++)
;
Array2[i] = Array1[i];
MOVL
MOVL
MOV
Loop:
MOVL
MOVL
BANZ
16-bit signed immediate constant value
Lower 16 bits of auxiliary registers XAR0 to XAR7
If the 16-bit content of the specified auxiliary register is not equal to 0, then the
16-bit sign offset is added to the PC value. This forces program control to the
new address (PC + 16bitOffset). The 16-bit offset is sign extended to 22 bits
before the addition. Then, the content of the auxiliary register is decremented
by 1. The upper 16 bits of the auxiliary register (ARnH) is not used in the
comparison and is not affected by the post decrement:
if( ARn != 0 )
PC = PC + signed 16-bit offset;
ARn = ARn – 1;
ARnH = unchanged;
Note:
If branch is taken, then the instruction takes 4 cycles
If branch is not taken, 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,#Array1
XAR3,#Array2
@AR0,#(N−1)
ACC,*XAR2++
*XAR3++,ACC
Loop,AR0−−
Branch if Auxiliary Register Not Equal to Zero
OPCODE
0000 0000 0000 1nnn
CCCC CCCC CCCC CCCC
; XAR2 = pointer to Array1
; XAR3 = pointer to Array2
; Repeat loop N times
; ACC = Array1[i]
; Array2[i] = ACC
; Loop if AR0 != 0, AR0−−
BANZ 16bitOffset,ARn− −
OBJMODE
RPT
CYC
X
4/2
6-59

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