| |
Negate
86/88 |
Y |
186 |
Y |
286 |
Y |
386 |
Y |
486 |
Y |
NEG destination |
Ovfl |
Y |
Dir |
N |
Int |
N |
Trap |
N |
Sign |
Y |
Zero |
Y |
Aux |
Y |
Prty |
Y |
Carry |
Y |
NEG subtracts the destination operand from 0 and returns the result in
the destination. This effectively produces the two's complement of the
operand. The operand may be a byte or a word.
Notes: If the operand is zero, the carry flag is cleared;
in all other cases, the carry flag is set.
Attempting to negate a byte containing -128 or a
word containing -32,768 causes no change to the
operand and sets the Overflow Flag.
------------------------------------ Timing ----------------------------------
OpCode Instruction 386 286 86
F6/3 NEG r/m8 2/6 2/7 3/16+EA
F7/3 NEG r/m16 2/6 2/7 3/16+EA
F7/3 NEG r/m32 2/6
------------------------------------ Logic -----------------------------------
destination = -destination
See Also NOT SUB SBB AAS DAS Flags |