SUBRL loc32, ACC
SYNTAX OPTIONS
SUBRL loc32, ACC
Operands
loc32
ACC
Description
Flags and
Z
Modes
N
C
V
OVC
OVM
Repeat
Example
; Calculate the 32-bit value: VarA = VarB − VarA
MOVL
SUBRL @VarA,ACC
Addressing mode (see Chapter 5)
Accumulator register
Subtract from the ACC register the 32-bit location pointed to by the "loc32"
addressing mode and store the result in the location pointed to by "loc32":
[loc32] = 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,@VarB
Reverse-Subtract Specified Location From ACC
OPCODE
0101 0110 0100 1001
0000 0000 LLLL LLLL
; Load ACC with contents of VarB
; VarA = ACC − VarA
SUBRL loc32, ACC
OBJMODE
RPT
CYC
1
−
1
6-355
Need help?
Do you have a question about the TMS320C28x and is the answer not in the manual?