
CPU16
REFERENCE MANUAL
INSTRUCTION GLOSSARY
MOTOROLA
6-187
ROR
Operation:
Rotate Right Byte
ROR
Description:
Rotates all eight bits of a memory byte one place to the right. Bit 7 is
loaded from the CCR C bit. Bit 0 is transferred to the C bit.
Rotation through the C bit aids shifting and rotating multiple words.
For example, use the sequence LSR Byte2, ROR Byte1, ROR Byte0
to shift a 24-bit value contained in bytes 0 to 2 right one bit. Replace
LSR with ASR to maintain the value of a sign bit.
Syntax:
Standard
Condition Code Register:
S:
Not affected.
Not affected.
Not affected.
Not affected.
Set if M7 set as a result of operation; else cleared.
Set if (M) = $00 as a result of operation; else cleared.
Set if (N is set and C is clear) or (N is clear and C is set) as a result of operation; else cleared.
Set if M0 = 1 before operation; else cleared.
Not affected.
Not affected.
Not affected.
Instruction Format:
Addressing Mode
Opcode
IND8, X
0E
IND8, Y
1E
IND8, Z
2E
IND16, X
170E
IND16, Y
171E
IND16, Z
172E
EXT
173E
MV:
H:
EV:
N:
Z:
V:
C:
IP:
SM:
PK:
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
S
MV
H
EV
N
Z
V
C
IP
SM
PK
—
—
—
—
—
—
—
Operand
ff
ff
ff
gggg
gggg
gggg
hhll
Cycles
8
8
8
8
8
8
8
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.