Chapter 2
CPU Basics
Instructions II - 15
■ Logic Operation Instructions
These instructions are used for the logic operation between source operands, the results of which are stored in a
register. All instructions involve flag changes.
Table:2.5.6 Logic Operation Instructions
■ Bit Control Instructions
These instructions are used to operate the bit control instructions between immediate value and register data,
immediate value and memory data, and register data and memory data. All instructions involve flag changes.
Table:2.5.7 Bit Control Instructions
■ Shift Instructions
These instructions are used to shift bits as specified. Each instruction is executed at one cycle regardless of the
shift amount. All instructions involve flag changes.
Table:2.5.8 Shift Instructions
Instruction Description
AND Logical product
OR Logical sum
XOR Exclusive logical sum
NOT Inversion (1’s complement)
Instruction Description
BTST Testing multiple of bits
BSET Testing and setting multiple of bits (processing unit: bytes)
BCLR Testing and clearing multiple of bits (processing unit: bytes)
Instruction Description
ASR Arithmetic right shift of any number of bits
LSR Logical right shift of any number of bits
ASL Arithmetic left shift of any number of bits
ASL2 Arithmetic left shift of two bits
ROR 1-bit right rotate
ROL 1-bit left rotate