SUBBL ACC, loc32
SYNTAX OPTIONS
SUBBL ACC, loc32
Operands
loc32
ACC
Description
Flags and
Z
Modes
N
C
V
OVC
OVM
Repeat
Example
; Subtract two 64-bit values (VarA and VarB) and store result
; in VarC:
MOVL
SUBUL
MOVL
MOVL
0101 0110 0101 0100
0000 0000 LLLL LLLL
Addressing mode (see Chapter 5)
Accumulator register
Subtract from the ACC the 32-bit location pointed to by the "loc32"
addressing mode and the logical inversion of the value in the carry flag bit:
ACC = ACC − [loc32] − ~C;
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.
The state of the carry bit before execution is included in the subtraction. 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+0
ACC,@VarB+0
@VarC+0,ACC
ACC,@VarA+2
Subtract 32-bit Value Plus Inverse Borrow
OPCODE
; Load ACC with contents of the low
; 32-bits of VarA
; Subtract from ACC the contents of
; the low 32-bits of VarB
; Store low 32-bit result into VarC
; Load ACC with contents of the high
; 32-bits of VarA
SUBBL ACC, loc32
OBJMODE
RPT
CYC
1
−
1
6-343
Need help?
Do you have a question about the TMS320C28x and is the answer not in the manual?