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

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

Forms

Operands

<ea>
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. 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