NEG

NEG

Operation:
0 - (Destination) -->; Destination

Assembler Syntax:
NEG <ea>

Attributes: Size = (Byte, Word, Long)

Description: Subtracts the destination operand from zero
and stores the result in the destination location. The
size of the operation is specified as byte, word, or long.

Condition Codes:
X Set the same as the carry bit.
N Set if the result is negative. Cleared otherwise.
Z Set if the result is zero. Cleared otherwise.
V Set if an overflow occurs. Cleared otherwise.
C Cleared if the result is zero. Set otherwise.

NEG is used to change a positive number into a negative.
If the number to change is longer than 32bit then use NEGX.