Texas Instruments TMS320C28x Reference Manual page 507

Dsp cpu and instruction set
Table of Contents

Advertisement

SUBL ACC, loc32
SUBL ACC, loc32
SYNTAX OPTIONS
SUBL ACC, loc32
Operands
ACC
loc32
Description
Flags and
Z
Modes
N
C
V
OVC
OVM
Repeat
Example
; Calculate the 32-bit value: VarC = VarA−VarB
MOVL
SUBL
MOVL
6-350
Accumulator register
Addressing mode (see Chapter 5)
Subtract the 32-bit location pointed to by the "loc32" addressing mode from
the ACC register :
ACC = ACC − [loc32];
After the subtraction, the Z flag is set if the ACC value is zero, else Z is
cleared.
After the subtraction, the N flag is set if bit 31 of the ACC is 1, else N is
cleared.
If the subtraction generates a borrow, C is cleared; otherwise C is set.
If an overflow occurs, V is set; otherwise V is not affected.
If OVM = 0 (disabled), then if the operation generates a positive overflow,
then the counter is incremented and if the operation generates a negative
overflow, then the counter is decremented.
If OVM = 1 (enabled), then the counter is not affected by the operation.
If overflow mode bit is set; then the ACC value will saturate maximum
positive (0x7FFFFFFF) or maximum negative (0x80000000) if the operation
overflowed.
This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.
ACC,@VarA
ACC,@VarB
@VarC,ACC
OPCODE
0000 0011 LLLL LLLL
; Load ACC with contents of VarA
; Subtract from ACC the contents of VarB
; Store result into VarC
Subtract 32-bit Value
OBJMODE
RPT
CYC
1
1

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