CLTS            Clear Task Switched Flag             Flags: Not altered

CLTS CPU: 286+ Priv

Logic Task Switched Flag in CR0 ← 0 (80386+)
Task Switched Flag in MSW ← 0 (80286)

CLTS clears the TS (Task Switched) flag in the CR0 register (the
Machine Status Word of the 80286). This flag is set to 1 by the
processor every time a task switch occurs. When the TS flag is
used to manage processor extensions,
- every execution of an ESC instruction is trapped if the TS
flag is set
- execution of a WAIT instruction is trapped if the MP (Math
Present) and TS flags are both set

Thus, if a task switch was made after an ESC instruction began,
the Floating-Point Unit's context may need to be saved before a
new ESC instruction can be issued. The fault handler saves the
context and clears the TS flag.

Note: CLTS is used in systems programming and is a
privileged instruction, running at privilege level
zero only.


Opcode Format
0F 06 CLTS


Length and timing
Operands Bytes 8088 186 286 386 486 Pentium
- 2 2 5 7 10 NP