![Siemens C500 User Manual Download Page 51](http://html.mh-extra.com/html/siemens/c500/c500_user-manual_382114051.webp)
Semiconductor Group
4-25
1998-04-01
Instruction Set
C500 Family
CPL
bit
Function:
Complement bit
Description:
The bit variable specified is complemented. A bit which had been a one is changed
to zero and vice versa. No other flags are affected. CPL can operate on the carry or
any directly addressable bit.
Note:
When this instruction is used to modify an output pin, the value used as the original
data will be read from the output data latch, not the input pin.
Example:
Port 1 has previously been written with 5DH (01011101B). The instruction
sequence
CPL
P1.1
CPL
P1.2
will leave the port set to 5BH (01011011B).
CPL
C
Operation:
CPL
(bit)
¬ /
(C)
Bytes:
1
Cycles:
1
CPL
bit
Operation:
CPL
(C)
¬
(bit)
Bytes:
2
Cycles:
1
Encoding:
1 0 1 1
0 0 1 1
Encoding:
1 0 1 1
0 0 1 0
bit address