Texas Instruments TMS320C28x Reference Manual page 200

Dsp cpu and instruction set
Table of Contents

Advertisement

AND ACC,#16bit << #0..16
SYNTAX OPTIONS
AND ACC, #16bit << #0..15
AND ACC, #16bit << #16
Operands
ACC
#16bit
#0..16
Description
Flags and
N
Modes
Z
Repeat
Example
; Calculate the 32-bit value: VarA = VarA AND 0x0FFFF000
MOVL ACC,@VarA
AND
ACC,#0xFFFF << 12
MOVL @VarA,ACC
0011 1110 0000 SHFT
CCCC CCCC CCCC CCCC
0101 0110 0000 1000
CCCC CCCC CCCC CCCC
Accumulator register
16-bit immediate constant value
Shift value (default is "<< #0" if no value specified)
Perform a bitwise AND operation on the ACC register with the given 16-bit
unsigned constant value left shifted as specified. The value is zero extended
and lower order bits are zero filled before the AND operation. The result is
stored in the ACC register:
ACC = ACC AND (0:16bit << shift value);
The load to ACC is tested for a negative condition. If bit 31 of ACC is 1, then the
negative flag bit is set; otherwise it is cleared.
The load to ACC is tested for a zero condition. The zero flag bit is set if the
operation generates ACC = 0; otherwise it is cleared
This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.
OPCODE
; Load ACC with contents of VarA
; AND ACC with 0x0FFFF000
; Store result in VarA
AND ACC,#16bit << #0..16
Bitwise AND
OBJMODE
RPT
CYC
1
1
1
1
6-43

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