neg

Arithmetic // NEG (NEGate)

0xED7C - u60796

Description

The contents of a are negated (two's complement). Operation is the same as subtracting a from zero.

T States Bytes
8 2

Condition Bits Affected

S affected as defined
Z affected as defined
H affected as defined
P/V detects overflow
N affected as defined
C affected as defined

source
{
  "flags": {
    "S": "affected as defined",
    "Z": "affected as defined",
    "H": "affected as defined",
    "P/V": "detects overflow",
    "N": "affected as defined",
    "C": "affected as defined"
  },
  "operation": "neg",
  "opcode": "neg",
  "operand": [],
  "code": "ED7C",
  "bytes": 2,
  "time": 8,
  "description": "The contents of a are negated (two's complement). Operation is the same as subtracting a from zero.",
  "category": "Arithmetic",
  "subCategory": "NEG (NEGate)"
}