Bit Field Instructions; Bit Manipulation Operations; Bit Field Operations - Motorola MC68030 User Manual

Enhanced 32-811 microprocessor
Hide thumbs Also See for MC68030:
Table of Contents

Advertisement

Table 3-5. Bit Manipulation Operations
Instruction
Operand
Syntax
Operand Size
Operation
BCHG
On,(ea}
8,32
- (bit number) of destination) • Z • bit of destination
#(data},(ea)
8,32
BClR
On,(ea}
8,32
- (bit number) of destination) • Z;
#(data),(ea)
8,32
o •
bit of destination
BSH
On,(ea}
8,32
- (bit number) of destination) • Z;
#(data},(ea)
8,32
1 • bit of destination
BTST
On,(ea}
8,32
- (bit number) of destination) • Z
#( data) ,( ea)
8,32
3.2.6 Bit Field Instructions
The MC68030 supports variable-length bit field operations on fields of up to
32 bits. The bit field insert (BFINS) instruction inserts a value into a bit field.
Bit field extract unsigned (BFEXTU) and bit field extract signed (BFEXTS)
extract a value from the field. Bit field find first one (BFFFO) finds the first
bit that is set in a bit field. Also included are instructions that are analogous
to the bit manipulation operations; bit field test (BFTST), bit field test and
set (BFSET), bit field test and clear (BFCLR), and bit field test and change
(BFCHG). Table 3-6 is a summary of the bit field operations.
Table 3-6. Bit Field Operations
Instruction
Operand
Syntax
Operand Size
Operation
BFCHG
(ea) {offset:width}
1-32
- Field, Field
BFClR
(ea) {offset:width}
1-32
O's, Field
BFEXTS
(ea) {offset:width},On
1-32
Field, On; Sign Extended
BFEXTU
(ea) {offset:widthl,On
1-32
Field' On; Zero Extended
BFFFO
(ea) {offset:width},On
1-32
Scan for first bit set .in field; offset. On
BFINS
On,(ea} {offset:width}
1-32
On. Field
BFSET
(ea) {offset:width}
1-32
l's, Field
BFTST
(ea) {offset:width}
1-32
Field MSB • N; - (OR of all bits in field) • Z
NOTE: All bit field instructions set the Nand Z bits as shown for BFTST before performing the specified operation.
MOTOROLA
MC68030 USER'S MANUAL
3-9
-

Advertisement

Table of Contents
loading

Table of Contents