Motorola CPU32 Reference Manual page 189

M68300 series central processor unit
Hide thumbs Also See for CPU32:
Table of Contents

Advertisement

III
ROL, ROR
Rotate (Without Extend)
ROL, ROR
Condition Codes:
x
N
Z
v
C
o
X Not affected.
N Set if the most significant bit of the result is set. Cleared otherwise.
Z Set if the result is zero. Cleared otherwise.
V Always cleared.
C Set according to the last bit rotated out of the operand. Cleared when the rotate count is zero.
Instruction Format (Register Rotate):
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
I
1
I
1
I
1
I
0
ICOUNTIREGISTERI
dr
SIZE
ilr
REGISTER
Instruction Fields (Register Rotate):
Count/Register field:
If i/r
=
0, this field contains the rotate count. The values 1-7 represent counts of 1-7, and 0
specifies a count of 8.
If i/r
=
1, this field specifies a data register that contains the rotate count (modulo 64).
dr field - Specifies the direction of the rotate:
o -
Rotate right
1 -
Rotate left
Size field - Specifies the size of the operation:
00 -
Byte operation
01 - Word operation
10 -
Long operation
i/r field - Specifies the rotate count location:
If i/r
=
0, immediate rotate count
If i/r
=
1, register rotate count
Register field - Specifies a data register to be rotated
NOTE
Byte swapping in the low order word of a data register is best done with
ROR/ROR, W #(8), On. A special hardware assist has been provided to minimize
operation execution.
MOTOROLA
4-136
INSTRUCTION SET
CPU32 REFERENCE MANUAL

Advertisement

Table of Contents
loading

Table of Contents