s07_03.htm

来自「Programmer s Reference Manual is an impr」· HTM 代码 · 共 64 行

HTM
64
字号
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><HTML><HEAD><TITLE>80386 Programmer's Reference Manual -- Section 7.3</TITLE></HEAD><BODY><B>up:</B> <A HREF="c07.htm">Chapter 7 -- Multitasking</A><BR><B>prev:</B> <A HREF="s07_02.htm">7.2  TSS Descriptor</A><BR><B>next:</B> <A HREF="s07_04.htm">7.4  Task Gate Descriptor</A><P><HR><P><H1>7.3  Task Register</H1>The task register (TR) identifies the currently executing task by pointingto the TSS. <A HREF="#fig7-3">Figure 7-3</A>  shows the path by which the processor accesses thecurrent TSS.<P>The task register has both a "visible" portion (i.e., can be read andchanged by instructions) and an "invisible" portion (maintained by theprocessor to correspond to the visible portion; cannot be read by anyinstruction). The selector in the visible portion selects a TSS descriptorin the GDT. The processor uses the invisible portion to cache the base andlimit values from the TSS descriptor. Holding the base and limit in aregister makes execution of the task more efficient, because the processordoes not need to repeatedly fetch these values from memory when itreferences the TSS of the current task.<P>The instructions <A HREF="LTR.htm">LTR</A> and <A HREF="STR.htm">STR</A> are used to modify and read the visibleportion of the task register. Both instructions take one operand, a 16-bitselector located in memory or in a general register.<P><A HREF="LTR.htm">LTR</A> (Load task register) loads the visible portion of the task registerwith the selector operand, which must select a TSS descriptor in the GDT.<A HREF="LTR.htm">LTR</A> also loads the invisible portion with information from the TSSdescriptor selected by the operand. <A HREF="LTR.htm">LTR</A> is a privileged instruction; it maybe executed only when CPL is zero. <A HREF="LTR.htm">LTR</A> is generally used during systeminitialization to give an initial value to the task register; thereafter,the contents of TR are changed by task switch operations.<P><A HREF="STR.htm">STR</A> (Store task register) stores the visible portion of the task registerin a general register or memory word. <A HREF="STR.htm">STR</A> is not privileged.<P><A NAME="fig7-3"><IMG align=center SRC="fig7-3.gif" border=0><P><HR><P><B>up:</B> <A HREF="c07.htm">Chapter 7 -- Multitasking</A><BR><B>prev:</B> <A HREF="s07_02.htm">7.2  TSS Descriptor</A><BR><B>next:</B> <A HREF="s07_04.htm">7.4  Task Gate Descriptor</A></BODY>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?