12
The 68000's Instruction Set
read from that location, the bit operation performed using the bit
number modulo 8, and the byte written back to the location.
Note that bit zero refers to the least-significant bit. The bit number
for this operation may be specified either
statically
by an
immediate value or
dynamically
by the contents of a data register.
Application:
If the operation
BCHG
#4,$1234
is carried out and the contents of
memory location $1234 are 10101010
2
, bit 4 is tested. It is a 0 and
therefore the Z-bit of the CCR is set to 1. Bit 4 of the destination
operand is changed and the new contents of location 1234
16
are
10111010
2
.
Condition codes:
X N Z V C
- - * - -
Z: set if the bit tested is zero, cleared otherwise.
Destination operand addressing modes
Note that data register direct (i.e., Dn) addressing uses a longword
operand, while all other modes use a byte operand.
BCLR
Test a bit and clear
Operation:
[Z]
←
<bit number> OF [destination]
<bit number> OF [destination]
←
0
Syntax:
BCLR Dn,<ea>
BCLR #<data>,<ea>
Attributes:
Size = byte, longword
Description:
A bit in the destination operand is tested and the state of the
specified bit is reflected in the condition of the Z-bit in the
condition code. After the test, the state of the specified bit is
cleared in the destination. If a data register is the destination, the
bit numbering is modulo 32, allowing bit manipulation of all bits
in a data register. If a memory location is the destination, a byte
is read from that location, the bit operation performed using the
bit number modulo 8, and the byte written back to the location.
Summary of Contents for 68000
Page 1: ...Motorola 68000 s Instruction Set ...
Page 2: ......