# `bclr`

[M68K Documentation](https://asm-editor.specy.app/documentation/m68k.md) › [Instructions](https://asm-editor.specy.app/documentation/m68k/instruction.md)

Web page: https://asm-editor.specy.app/documentation/m68k/instruction/bclr

**Test a bit and clear**

Category: Logic

Clears the bit in the second operand numbered by the first operand, setting Z to the inverse of its old value.

Sizes .b .l

Used in: [Arithmetic, logic and bits](https://asm-editor.specy.app/learn/courses/m68k/think-in-assembly/arithmetic-logic-and-bits.md) (M68K assembly)

## Flags

| Flag | Effect |
| --- | --- |
| X | not changed |
| N | not changed |
| Z | set from the result |
| V | not changed |
| C | not changed |

## Forms

- `bclr <ea>, <ea>`
  - Source: Dn, #imm
  - Destination: Dn, (An), (An)+, -(An), d(An), d(An,Xn), abs (data alterable)

## Operands

- [`<ea>`](https://asm-editor.specy.app/documentation/m68k/addressing-mode.md): An operand using one of the addressing modes listed for this form. The list determines whether it can be a register, memory or an immediate value. With `opt p=68020`, an allowed `d(An,Xn)` or `d(PC,Xn)` mode also permits the corresponding 68020 indexed and memory indirect forms. See [68020 addressing](https://asm-editor.specy.app/documentation/m68k/addressing-mode/68020.md).
- [`#imm`](https://asm-editor.specy.app/documentation/m68k/addressing-mode/immediate.md): An immediate value. As the first operand, it selects a bit: `0` to `31` for a data register, or `0` to `7` for memory.

## Example

```m68k
* --- Clears the specified bit ---
move.l #%1111, d0
bclr #1, d0 ; bit 1 was 1 (Z clear), now 0. d0 = %1101

move.l #%1101, d1
bclr #1, d1 ; bit 1 was already 0 (Z set), no change
```
