Assembly Language Help (alang.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 Instruction
 Detail Key                               Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Title:    Two's-Complement Negation             Flags: O D I T S Z A P C
                                                         ═════════════════
  Syntax:   NEG dest                                     ±       ± ± ± ± ±
 
  See also: SUB, NOT
 
  Description:
 
     Replaces the operand with its two's complement 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 -32,768 for 16-bit operands), the value does
     not change, but the overflow and carry flags are set.
                                    -♦-