You are here : assembly8051CPL

CPL - 8051

The CPL instruction logically complements the value of the specified destination operand and stores the result back in the destination operand. Bits that previously contained a 1 will be changed to a 0 and bits that previously contained a 0 will be changed to a 1.


Syntax

CPL A
CPL bit


Example

;Compliments Accumulator
CPL A		;1 byte 1 cycle
;Compliments bit
CPL 55h		;2 bytes 1 cycle
;Compliments Carry
CPL C		;1 byte 1 cycle


Output / Return Value


Limitations


Alternatives / See Also


Reference

http://www.keil.com/support/man/docs/is51/is51_cpl.htm