add directory study
This commit is contained in:
53
study/Ref-docs/manual Intel386/I386Manual/CLTS.HTM
Normal file
53
study/Ref-docs/manual Intel386/I386Manual/CLTS.HTM
Normal file
@@ -0,0 +1,53 @@
|
||||
<html><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>80386 Programmer's Reference Manual -- Opcode CLTS</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<b>up:</b> <a href="C17.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/C17.HTM">Chapter 17 -- 80386 Instruction Set</a><br>
|
||||
<b>prev:</b><a href="CLI.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/CLI.HTM"> CLI Clear Interrupt Flag</a><br>
|
||||
<b>next:</b><a href="CMC.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/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" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/C17.HTM">Chapter 17 -- 80386 Instruction Set</a><br>
|
||||
<b>prev:</b><a href="CLI.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/CLI.HTM"> CLI Clear Interrupt Flag</a><br>
|
||||
<b>next:</b><a href="CMC.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/CMC.HTM"> CMC Complement Carry Flag</a>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user