Zilog Z16F2810 User Manual
Page 143
UM018809-0611
NEG Instruction
ZNEO
®
CPU Core
User Manual
127
NEG
Definition
Negate
Syntax
NEG dst
Operation
dst
0
–
dst
Description
The contents of the destination operand are subtracted from zero, and the result is written to the
destination. This effectively performs a two’s complement negation.
Flags
Flags are set based on the 32-bit destination register value.
Syntax and Opcodes
7
6
5
4
3
2
1
0
C
Z
S
V
B
CIRQE IRQE
*
*
*
*
*
–
–
–
Legend
C
= Set to 1 if the result generated a borrow; otherwise set to 0.
Z
= Set to 1 if the result is zero; otherwise, set to 0.
S
= Set to 1 if the result msb is 1; otherwise set to 0.
V
= Set to 1 if an arithmetic overflow occurs; otherwise set to 0.
B
= Set to 1 if the initial destination value was 0; otherwise set to 0.
CIRQE
= No change.
IRQE
= No change.
Instruction, Operands
Word 0
Word 1
Word 2
NEG Rd
{455H, Rd}
Note: