qa.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
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.
                                    -♦-