Motorola CPU32 Reference Manual page 188

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

Advertisement

ROL, ROR
Rotate (Without Extend)
ROL, ROR
Operation:
Assembler
Syntax:
Attributes:
Destination Rotated by <count) => Destination
ROd Ox, Dy
ROd
# <data), Dy
ROd <ea)
where d is direction, Lor R
Size
=
(Byte, Word, Long)
Description:
Rotates the bits of the operand in the direction specified (L or R). The extend bit is not
included in the rotation. For register rotation, the rotation count can be specified in either of two
ways:
1. Immediate - The count (1-8) is specified by the instruction.
2. Register -
The count is the value in the data register specified by the instruction,
modulo 64.
contents of memory, <ea); can be rotated one bit only, and operand size is restricted to a word.
The size of the operation for register destinations is specified as byte, word, or long. The
III
The ROL instruction rotates the bits of the operand to the left; the rotate count determines the
number of bit positions rotated. Bits rotated out of the high-order bit go to the carry bit and also
back into the low-order bit.
ROL:
~~<~~l~~---o-PE-R-AN-D----~
The ROR instruction rotates the bits of the operand to the right; the rotate count determines the
number of bit positions rotated. Bits rotated out of the low-order bit go to the carry bit and also
back into the high-order bit.
ROR:
CPU32 REFERENCE MANUAL
~r----OP-E-RA-N-D--~~~~.~~
INSTRUCTION SET
MOTOROLA
4-135

Advertisement

Table of Contents
loading

Table of Contents