-
Notifications
You must be signed in to change notification settings - Fork 29
/
CLTS.htm
74 lines (55 loc) · 1.94 KB
/
CLTS.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
<HEAD>
<TITLE>80386 Programmer's Reference Manual -- Opcode CLTS</TITLE>
</HEAD>
<BODY STYLE="width:80ch">
<B>up:</B> <A HREF="c17.htm">
Chapter 17 -- 80386 Instruction Set</A><BR>
<B>prev:</B><A HREF="CLI.htm"> CLI Clear Interrupt Flag</A><BR>
<B>next:</B><A HREF="CMC.htm"> CMC Complement Carry Flag</A>
<P>
<HR>
<P>
<H1>CLTS -- Clear Task-Switched Flag in CR0</H1>
<PRE>
Opcode Instruction Clocks Description
OF 06 CLTS 5 Clear task-switched flag
</PRE>
<H2>Operation</H2>
<PRE>
TS Flag in CR0 := 0;
</PRE>
<H2>Description</H2>
CLTS clears the task-switched (TS) flag in register CR0. This flag is set by
the 80386 every time a task switch occurs. The TS flag is used to manage
processor extensions as follows:
<UL>
<LI> Every execution of an ESC instruction is trapped if the TS flag is set.
<LI> Execution of a WAIT instruction is trapped if the MP flag and the TS
flag are both set.
</UL>
Thus, if a task switch was made after an ESC instruction was begun, the
processor extension's context may need to be saved before a new ESC
instruction can be issued. The fault handler saves the context and resets
the TS flag.
<P>
CLTS appears in operating system software, not in application programs. It
is a privileged instruction that can only be executed at privilege level 0.
<H2>Flags Affected</H2>
TS := 0 (TS is in CR0, not the flag register)
<H2>Protected Mode Exceptions</H2>
#GP(0) if CLTS is executed with a current privilege level other than 0
<H2>Real Address Mode Exceptions</H2>
None (valid in Real Address Mode to allow initialization for Protected
Mode)
<H2>Virtual 8086 Mode Exceptions</H2>
Same exceptions as in Real Address Mode
<P>
<HR>
<P>
<B>up:</B> <A HREF="c17.htm">
Chapter 17 -- 80386 Instruction Set</A><BR>
<B>prev:</B><A HREF="CLI.htm"> CLI Clear Interrupt Flag</A><BR>
<B>next:</B><A HREF="CMC.htm"> CMC Complement Carry Flag</A>
</BODY>