| Opcode | Encoding | 16-bit | 32-bit | 64-bit | Description |
|---|---|---|---|---|---|
F5CMC | zo | Valid | Valid | Valid | Complement (invert) EFLAGS.CF (carry flag). |
Encoding
| Encoding | Operand |
|---|---|
zo | None |
Description
The CLC instruction complements (inverts) EFLAGS.CF (the carry flag).
Operation
public void CMC()
{
EFLAGS.CF = !EFLAGS.CF;
}Flags Affected
CF(carry flag)- Inverted.
PF(parity flag)- Unmodified.
AF(auxiliary flag)- Unmodified.
ZF(zero flag)- Unmodified.
SF(sign flag)- Unmodified.
OF(overflow flag)- Unmodified.
Exceptions
Real-Address Mode
#UD- If the
LOCK- prefix is used.
Virtual-8086 Mode
#UD- If the
LOCK- prefix is used.
Protected Mode
#UD- If the
LOCK- prefix is used.
Compatibility Mode
#UD- If the
LOCK- prefix is used.
Long Mode
#UD- If the
LOCK- prefix is used.