Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 985 Bytes

File metadata and controls

31 lines (24 loc) · 985 Bytes

CLR - Clear an operand

Operation

[destination] ← 0

Syntax

CLR <ea>

Sample syntax

CLR (A4)+

Attributes

Size byte, word, longword

Description

The destination is cleared - loaded with all zeros. The CLR instruction can't be used to clear an address register. You can use SUBA.L A0,A0 to clear A0. Note that a side effect of CLR's implementation is a read from the specified effective address before the clear (i.e., write) operation is executed. Under certain circumstances this might cause a problem (e.g., with write-only memory).

Condition codes

X N Z V C
- 0 1 0 0

Source operand addressing modes

Dn An (An) (An)+ ‑(An) (d,An) (d,An,Xi) ABS.W ABS.L (d,PC) (d,PC,Xn) imm

From MOTOROLA M68000 FAMILY Programmer's reference manual. Copyright 1992 by Motorola Inc./NXP. Adapted with permission.