Load Task Register
Encyclopedia
The LTR x86 instruction stands for load task register and is used in operating systems that support multitasking
Computer multitasking
In computing, multitasking is a method where multiple tasks, also known as processes, share common processing resources such as a CPU. In the case of a computer with a single CPU, only one task is said to be running at any point in time, meaning that the CPU is actively executing instructions for...

. LTR is supported only in protected mode
Protected mode
In computing, protected mode, also called protected virtual address mode, is an operational mode of x86-compatible central processing units...

 and long mode
Long mode
In the x86-64 computer architecture, long mode is the mode where a 64-bit application can access 64-bit instructions and registers...

, not in real mode
Real mode
Real mode, also called real address mode, is an operating mode of 80286 and later x86-compatible CPUs. Real mode is characterized by a 20 bit segmented memory address space and unlimited direct software access to all memory, I/O addresses and peripheral hardware...

 or virtual 8086 mode
Virtual 8086 mode
In the 80386 microprocessor and later, virtual 8086 mode allows the execution of real mode applications that are incapable of running directly in protected mode while the processor is running a protected mode operating system.VM86 mode uses a segmentation scheme identical to that of real mode In...

. It must be executed when the CPL is 0, and therefore cannot be used by application programs. LTR loads the special x86 task register with a segment selector that points to a task state segment
Task State Segment
The task state segment is a special structure on x86-based computers which holds information about a task. It is used by the operating system kernel for task management...

. After executing the LTR instruction, the TSS pointed to by the argument is marked busy, but no hardware task switch occurs.

The opposite of the LTR instruction is the STR instruction, which copies the value of the task register to the specified location. Note that the x86 task register is only accessible directly through the LTR and STR instructions.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK