NEGX

NEGX

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

Assembler Syntax:
NEGX <ea>

Attributes: Size = (Byte, Word, Long)

Description: Subtracts the destination operand and the extend
bit 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.

Note: Normally the Z condition code bit is set via programming
before the start of the operation. This allows successful
tests for zero results upon completion of multiple
precision operations.

NEGX can be used to negate numbers longer than 32bit