Opcode | Encoding | 16-bit | 32-bit | 64-bit | Description |
---|---|---|---|---|---|
0F 06 CLTS | zo | Invalid | Valid | Valid | Clear CR0.TS (task-switched flag). |
Encoding
Encoding | Operand |
---|---|
zo | None |
Description
The CLTS
instruction clears (resets) the task-switched flag in CR0
.
CR0.TS
is a flag that is set whenever a task switch occurs, and is used to synchronize the saving of the FPU context in multitasking environments.
This instruction can only be executed when CPL
is 0
(i.e. ring 0). Attempts to execute this instruction in less privileged rings will cause a #UD
exception to be raised.
Operation
public void CLTS()
{
CR0.TS = 0;
}
Flags Affected
None.Exceptions
Real-Address Mode
#UD
- If in Real Mode.
Virtual-8086 Mode
#UD
- If in Virtual-8086 Mode.
Protected Mode
#UD
- If the
LOCK
- prefix is used.
#GP(0)
- If
CPL
- is greater than
0
- .
Compatibility Mode
#UD
- If the
LOCK
- prefix is used.
#GP(0)
- If
CPL
- is greater than
0
- .
Long Mode
#UD
- If the
LOCK
- prefix is used.
#GP(0)
- If
CPL
- is greater than
0
- .