ROL ACC
ROL ACC
SYNTAX OPTIONS
ROL ACC
Operands
ACC
Description
Flags and
N
Modes
Z
C
Repeat
Example
; Rotate contents of VarA left by 5:
MOVL
RPT
||ROL
MOVL
6-310
1111 1111 0101 0011
Accumulator register
Rotate the content of the ACC register left by one bit, filling bit 0 with the
content of the carry flag and loading the carry flag with the bit shifted out:
C
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 31 of the ACC register is transferred to C. The value in C
before the rotation is transferred to bit 0 of the ACC.
This instruction is repeatable. If the operation follows a RPT instruction, then
the ROL 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
OPCODE
OBJMODE
ACC
Rotate Left
ACC
; ACC = VarA
; Repeat next instruction 5 times
; Rotate ACC left
; Store result into VarA
Rotate Accumulator Left
RPT
CYC
X
Y
N+1
Need help?
Do you have a question about the TMS320C28x and is the answer not in the manual?