English
Language : 

MC68030 Datasheet, PDF (87/602 Pages) Motorola, Inc – ENHANCED 32-BIT MICROPROCESSOR
Instruction Set Summary
Instruction
BCHG
BCLR
BSET
BTST
Table 3-5. Bit Manipulation Operations
Operand Syntax
Dn,〈ea〉
#〈data〉,ea
Dn,〈ea〉
#〈data〉,ea
Dn,〈ea〉
#〈data〉,〈ea〉
Dn,〈ea〉
#〈data〉,ea
Operand Size
Operation
8, 32
∼ (〈bit number〉 of destination) → Z → bit of destination
8, 32
8, 32
∼ (〈bit number〉 of destination) → Z;
8, 32
— 0 → bit of destination
8, 32
∼ (〈bit number〉 of destination) → Z;
8, 32
— 1 → bit of destination
8, 32
∼ (〈bit number〉 of destination) → Z
8, 32
3.2.6 Bit Field Operations
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
BFCHG
BFCLR
BFEXTS
BFEXTU
BFFFO
BFINS
BFSET
BFTST
Operand Syntax
〈ea〉 {offset:width}
〈ea〉 {offset:width}
〈ea〉 {offset:width},Dn
〈ea〉 {offset:width},Dn
〈ea〉 {offset:width},Dn
Dn,〈ea〉 {offset:width}
〈ea〉 {offset:width}
〈ea〉 {offset:width}
Operand Size
1 — 32
1 — 32
1—32
1 — 32
1 — 32
1 — 32
1 — 32
1 — 32
Operation
∼ Field → Field
0's → Field
Field → Dn; Sign Extended
Field → Dn; Zero Extended
Scan for first bit set in field; offset → Dn
Dn → Field
1's → Field
Field MSB → N; ∼ (OR of all bits in field) → Z
NOTE: All bit field instructions set the N and Z bits as shown for BFTST before performing the specified operation.
MOTOROLA
MC68030 USER’S MANUAL
3-9