
CPU32+
5-22
MC68360 USER’S MANUAL
MOTOROLA
5.3.3.5 SHIFT AND ROTATE INSTRUCTIONS.
The arithmetic shift instructions, ASR and
ASL, and logical shift instructions, LSR and LSL, provide shift operations in both directions.
The ROR, ROL, ROXR, and ROXL instructions perform rotate (circular shift) operations,
with and without the extend bit. All shift and rotate operations can be performed on either
registers or memory.
Register shift and rotate operations shift all operand sizes. The shift count may be specified
in the instruction operation word (to shift from 1 to 8 places) or in a register (modulo 64 shift
count).
Memory shift and rotate operations shift word-length operands one bit position only. The
SWAP instruction exchanges the 16-bit halves of a register. Performance of shift/rotate
instructions is enhanced so that use of the ROR and ROL instructions with a shift count of
eight allows fast byte swapping. Table 5-7 is a summary of the shift and rotate operations.
Table 5-6. Logic Operations
Instruction
Operand
Syntax
Operand
Size
Operation
AND
ea
, Dn
Dn,
ea
#
data
,
ea
Dn,
ea
#
data
,
ea
ea
ea
, Dn
Dn,
ea
#
data
,
ea
ea
8, 16, 32
8, 16, 32
Source
Λ
Destination
Destination
ANDI
8, 16, 32
Immediate Data
Λ
Destination
Destination
Source
⊕
Destination
Destination
Immediate Data
⊕
Destination
Destination
Destination
Destination
EOR
8, 16, 32
EORI
8, 16, 32
NOT
8, 16, 32
OR
8, 16, 32
8, 16, 32
Source
V
Destination
Destination
ORI
8, 16, 32
Immediate Data
V
Destination
Destination
TST
8, 16, 32
Source – 0, to set condition codes