THE 80286 INSTRUCTION SET

NEG-Two'sComplement Negation

Opcode

Instruction

Clocks

Description

F6

/3

NEG eb

2',mem=7

Two'scomplement negate EA byte

F7

/3

NEG ew

2,mem=7

Two'scomplement negate EA word

FLAGS MODIFIED

Overflow, sign, zero, auxiliary carry, parity, carry

FLAGS UNDEFINED

None

OPERATION

The two's complement of the register or memory operand replaces the old operand value. Likewise, the operand is subtracted from zero, and the result is placed in the operand.

The carry flag is set to 1 except when the input operand is zero, iii which case the carry flag is Cleared to O.

PROTECTED MODE EXCEPTIONS

#GP(O) if the result is in a non-writable segment. #GP(O) for an illegal memory operand effective address in the CS, DS, or ES segments; #SS(O) for an illegal address in the SS segment.

REAL ADDRESS MODE EXCEPTIONS

Interrupt 1J for a word operand at offset OFFFFH.

8-77

Page 287
Image 287
Intel 80286, 80287 manual NEG-TwosComplement Negation, NEG eb, NEG ew