SUBL loc32, ACC
SYNTAX OPTIONS
SUBL loc32, ACC
Operands
loc32
ACC
Description
Flags and
Z
Modes
N
C
V
OVC
OVM
Repeat
Example
; Decrement the 32-bit value VarA:
MOVB
SUBL
Addressing mode (see Chapter 5)
Accumulator register
Subtract the content of the ACC register from the location pointed to by the
"loc32" addressing mode:
[loc32] = [loc32] − ACC;
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 [loc32] 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) and the operation generates a positive overflow, the
counter is incremented and if the operation generates a negative overflow,
the counter is decremented.
If OVM = 1 (enabled) 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,#1
@VarA,ACC
OPCODE
0101 0110 0100 0001
0000 0000 LLLL LLLL
; Load ACC with 0x00000001
; VarA = VarA − ACC
SUBL loc32, ACC
Subtract 32-bit Value
OBJMODE
RPT
CYC
1
−
1
6-353
Need help?
Do you have a question about the TMS320C28x and is the answer not in the manual?