NEG
◄Summary► ◄Detail► ◄Key to Flags►
──────────────────────────────────────────────────────────────────────────────
Two's Complement Negation Flags: O D I T S Z A P C
═════════════════
± ± ± ± ± ±
Syntax: NEG dest
Replaces the operand with its two's complement. NEG does this by
subtracting the operand from 0. If the operand is 0, the carry flag
is cleared. Otherwise the carry flag is set. If the operand contains
the maximum possible negative value (-128 for 8-bit operands or -32768
for 16-bit operands), the value does not change, but the overflow and
carry flags are set.
-♦-