clr

Clear

Sets all bits of the destination operand to 0 at the given size (byte, word or long).

Sizes .b .w .l, .w by default

XNZVC –0100
  • 0 always 0
  • 1 always 1
  • – not changed

Forms

Operands

<ea>
An operand using one of the instruction’s supported addressing modes, such as d0, (a0)+ or 4(a1). It may name a register, memory or an immediate value. More
* --- Only clears the portion specified by size ---
move.l #$FFFFFFFF, d0
clr.b d0 ; d0 = $FFFFFF00

move.l #$FFFFFFFF, d1
clr.w d1 ; d1 = $FFFF0000

move.l #$FFFFFFFF, d2
clr.l d2 ; d2 = $00000000