Chapter 12 List of Machine Language Instructions
List of Machine Language Instructions 241
12.3.4 Bit Manipulation Instructions

Bit operations

Mnemonic Description of operation
BTST imm, Dn AND the zero-extended imm8, zero-extended imm16, or imm32 with the contents
of Dn and set the flags according to the result.
BTST imm8, (d8,An) AND the zero-ex tended imm8 with the zero-extended 8-bit contents of the memory
location specified by d8 and An and set the flags according to the result.
BTST imm8, (abs32) AND the zero-extended imm8 with the zero-extended 8-bit contents of the memory
location specified by abs32 and set the flags according to the result.
BSET Dm, (An)
This instruction proceeds through the following three stages:
1.Transfer, with zero-extension, the 8-bit contents of the memory location specified
with An to a 32-bit internal temporary register.
2.AND the temporary register with the contents of Dm and set the flags according
to the result.
3.OR the temporary register with the contents of Dm and store the lowest 8 bits of
the result in the memory location specified with An.
BSET imm8, (d8,An)
This instruction proceeds through the following three stages:
1.Transfer, with zero-extension, the 8-bit contents of the memory location specified
with d8 and An to a 32-bit internal temporary register.
2.AND the temporary register with zero-extended imm8 and set the flags according
to the result
3.OR the temporary register with zero-extended imm8 and store the lowest 8 bits of
the result in the memory location specified with d8 and An.
BSET imm8, (abs32)
This instruction proceeds through the following three stages:
1.Transfer, with zero-extension, the 8-bit contents of the memory location specified
with abs32 to a 32-bit internal temporary register
2.AND the temporary register with zero-extended imm8 and set the flags according
to the result.
3.OR the temporary register with zero-extended imm8 and store the lowest 8 bits of
the result in the memory location specified with abs32.
BCLR Dm,(An)
This instruction proceeds through the following three stages:
1.Transfer, with zero-extension, the 8-bit contents of the memory location specified
with An to a 32-bit internal temporary register.
2.AND the temporary register with the contents of Dm and set the flags according
to the result.
3.AND the temporary register with the ones complement of the contents of Dm and
store the lowest 8 bits of the result in the memory location specified with An.
BCLR imm8,(d8,An)
This instruction proceeds through the following three stages:
1.Transfer, with zero-extension, the 8-bit contents of the memory location specified
with d8 and An to a 32-bit internal temporary register.
2.AND the temporary register with zero-extended imm8 and set the flags according
to the result.
3.AND the temporary register with the ones complement of zero-extended imm8
and store the lowest 8 bits of the result in the memory location specified with d8
and An.