eZ80
®
CPU
User Manual
UM007714-0908 CPU Instruction Set
248
NEG
Negate Accumulator
Operation
A ← 0 – A
Description
The contents of the accumulator, A, are negated (two’s-complemented) and are identical to
a subtraction of the accumulator from 0.
Condition Bits Affected
Attributes
S Set if result is negative; reset otherwise.
Z Set if result is 0; result otherwise.
H Set if borrow from bit 4; reset otherwise.
P/V Set if accumulator contained 80h before operation; reset
otherwise.
N Set.
C Set if accumulator was not 00h before operation; reset
otherwise.
Mnemonic Operand ADL Mode Cycle Opcode (hex)
NEG X2EE, 44