ROR ACC
SYNTAX OPTIONS
ROR ACC
Operands
ACC
Description
Flags and
N
Modes
Z
C
Repeat
Example
; Rotate contents of VarA right by 5:
MOVL
RPT
||ROR
MOVL
1111 1111 0101 0010
Accumulator register
Rotate the content of the ACC register right by one bit, filling bit 31 with the
content of the carry flag and loading the carry flag with the bit shifted out:
After the operation, the N flag is set if bit 31 of the ACC is 1, else N is cleared.
After the operation, the Z flag is set if the ACC is zero, else Z is cleared.
The value in bit 0 of the ACC register is transferred to C. The value in C
before the rotation is transferred to bit 31 of the ACC.
This instruction is repeatable. If the operation follows a RPT instruction, then
the ROR instruction will be executed N+1 times. The state of the Z, N, and C
flags will reflect the final result.
ACC,@VarA
#4
ACC
@VarA,ACC
Rotate Accumulator Right
OPCODE
OBJMODE
ACC
Rotate Right
ACC
; ACC = VarA
; Repeat next instruction 5 times
; Rotate ACC right
; Store result into VarA
ROR ACC
RPT
CYC
X
Y
N+1
C
6-311
Need help?
Do you have a question about the TMS320C28x and is the answer not in the manual?