NEG Negate Accumulator (two's compliment)
\(A \longleftarrow 0 - A\)
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
---|---|---|---|---|---|---|---|---|
1 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | ED |
0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 44 |
Flags Affected
Flags |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
s | set if result is negative | ||||||||
z | set if result is 0 | ||||||||
h | set if borrow from bit 4 | ||||||||
p/v | set if Accumulator was 0x80 before operation | ||||||||
n | set | ||||||||
c | set if Accumulator was not 0x00 before operation |
Opcode Matrix
NEG | |
---|---|
OP |
NEG
ED4424 |
Instruction
Opcode hexSize bytesCycle count
| Register |
Last modified November 16, 2021: Misc instructions, merged accumulator & split into separate pages but compact in pdf (49e2ace)