CPL complements operand, leaving the result in operand. If operand is a single bit then the state of the bit will be reversed. If operand is the Accumulator then all the bits in the Accumulator will be reversed.
Syntax : CPL operand
Example : CPL A
It will complement the data in Accumulator. If the data is 0 then the result will be 255.
Syntax : CPL operand
Example : CPL A
It will complement the data in Accumulator. If the data is 0 then the result will be 255.
- Instruction
- Opcode
- Bytes
- Flags
- CPL A
- 0xF4
- 1
- None
- CPL C
- 0xB3
- 1
- C
- CPL bit_addr
- 0xB2
- 2
- None