<<< The LAHF and SAHF Instructions | Index | The SHL Instruction, Shift Logical Bit Left >>> |
The NEG instruction negates a value by finding 2's complement of its single operand.
This simply means multiply operand by -1.
When a positive value is negated the result is negative.
A negative value will become positive.
Zero remains zero.
For example,
mov al, -1 ; Load register neg al ; AL now has 1
<<< The LAHF and SAHF Instructions | Index | The SHL Instruction, Shift Logical Bit Left >>> |