ADDCL ACC,loc32
ADDCL ACC,loc32
SYNTAX OPTIONS
ADDCL ACC,loc32
Operands
ACC
loc32
Description
Flags and
Z
Modes
Modes
N
C
V
OVC
OVM
Repeat
Example
; Add two 64-bit values (VarA and VarB) and store result in VarC:
MOVL
ADDUL ACC,@VarB+0
MOVL
MOVL
ADDCL ACC,@VarB+2
MOVL
6-34
Accumulator register
Addressing mode (see Chapter 5)
Add to the ACC register the 32-bit content of the location pointed to by the
"loc32" addressing mode:
ACC = ACC + [loc32] + C;
After the addition, the Z flag is set if the ACC is zero, else Z is cleared.
After the addition, 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 addition. If the
addition generates a carry, C is set; otherwise C is cleared.
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
overflows.
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
@VarC+0,ACC
ACC,@VarA+2
@VarC+2,ACC
Add 32-bit Value Plus Carry to Accumulator
OPCODE
0101 0110 0100 0000
xxxx xxxx LLLL LLLL
; Load ACC with contents of the low
; 32 bits of VarA
; Add to 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
; Add to ACC the contents of the high
; 32 bits of VarB with carry
; Store high 32-bit result into VarC
OBJMODE
RPT
CYC
1
−
1
Need help?
Do you have a question about the TMS320C28x and is the answer not in the manual?