Logic Instructions; Shift And Rotate Instructions - Motorola MC68340 User Manual

Integrated processor with dma
Hide thumbs Also See for MC68340:
Table of Contents

Advertisement

5.3.3.4 LOGIC INSTRUCTIONS. The logical operation instructions (AND, OR, EOR, and
NOT) perform logical operations with all sizes of integer data operands. A similar set of
immediate instructions (ANDI, ORI, and EORI) provide these logical operations with all
sizes of immediate data. The test (TST) instruction arithmetically compares the operand
with zero, placing the result in the CCR. Table 5-6 summarizes the logical operations.
Instruction
AND
ANDI
# data
EOR
EORI
# data
NOT
OR
ORI
# data
TST
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.
5-24
Freescale Semiconductor, Inc.
Table 5-6. Logic Operations
Operand
Syntax
Operand Size
ea , Dn
8, 16, 32
Dn, ea
8, 16, 32
ea
8, 16, 32
Dn, ea
8, 16, 32
ea
8, 16, 32
ea
8, 16, 32
ea , Dn
8, 16, 32
Dn, ea
8, 16, 32
ea
8, 16, 32
ea
8, 16, 32
MC68340 USER'S MANUAL
For More Information On This Product,
Go to: www.freescale.com
Operation
Source
Destination
Destination
Immediate Data
Destination
Source
Destination
Destination
Immediate Data
Destination
Destination
Destination
Source V Destination
Destination
Immediate Data V Destination
Source – 0, to set condition codes
Destination
Destination
Destination
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents