1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML 2.0//EN">
4 <TITLE>80386 Programmer's Reference Manual -- Opcode LSL
</TITLE>
7 <B>up:
</B> <A HREF=
"c17.htm">
8 Chapter
17 --
80386 Instruction Set
</A><BR>
9 <B>prev:
</B><A HREF=
"LOOP.htm"> LOOP/LOOPcond Loop Control with CX Counter
</A><BR>
10 <B>next:
</B><A HREF=
"LTR.htm"> LTR Load Task Register
</A>
14 <H1>LSL -- Load Segment Limit
</H1>
17 Opcode Instruction Clocks Description
19 0F
03 /r LSL r16,r/m16 pm=
20/
21 Load: r16 := segment limit,
20 selector r/m16 (byte granular)
21 0F
03 /r LSL r32,r/m32 pm=
20/
21 Load: r32 := segment limit,
22 selector r/m32 (byte granular)
23 0F
03 /r LSL r16,r/m16 pm=
25/
26 Load: r16 := segment limit,
24 selector r/m16 (page granular)
25 0F
03 /r LSL r32,r/m32 pm=
25/
26 Load: r32 := segment limit,
26 selector r/m32 (page granular)
31 The LSL instruction loads a register with an unscrambled segment limit,
32 and sets ZF to
1, provided that the source selector is visible at the CPL
33 weakened by RPL, and that the descriptor is a type accepted by LSL.
34 Otherwise, ZF is cleared to
0, and the destination register is unchanged.
35 The segment limit is loaded as a byte granular value. If the descriptor
36 has a page granular segment limit, LSL will translate it to a byte limit
37 before loading it in the destination register (shift left
12 the
20-bit
38 "raw" limit from descriptor, then OR with
00000FFFH).
40 The
32-bit forms of this instruction store the
32-bit byte granular limit
41 in the
16-bit destination register.
43 Code and data segment descriptors are valid for LSL.
45 The valid special segment and gate descriptor types for LSL are given
46 in the following table:
49 Type Name Valid/Invalid
52 1 Available
80286 TSS Valid
54 3 Busy
80286 TSS Valid
55 4 80286 call gate Invalid
56 5 80286/
80386 task gate Invalid
57 6 80286 trap gate Invalid
58 7 80286 interrupt gate Invalid
60 9 Available
80386 TSS Valid
62 B Busy
80386 TSS Valid
63 C
80386 call gate Invalid
65 E
80386 trap gate Invalid
66 F
80386 interrupt gate Invalid
69 <H2>Flags Affected
</H2>
73 <H2>Protected Mode Exceptions
</H2>
75 #GP(
0) for an illegal memory operand effective address in the CS, DS,
76 ES, FS, or GS segments; #SS(
0) for an illegal address in the SS segment;
77 #PF(fault-code) for a page fault
79 <H2>Real Address Mode Exceptions
</H2>
81 Interrupt
6; LSL is not recognized in Real Address Mode
83 <H2>Virtual
8086 Mode Exceptions
</H2>
85 Same exceptions as in Real Address Mode
91 <B>up:
</B> <A HREF=
"c17.htm">
92 Chapter
17 --
80386 Instruction Set
</A><BR>
93 <B>prev:
</B><A HREF=
"LOOP.htm"> LOOP/LOOPcond Loop Control with CX Counter
</A><BR>
94 <B>next:
</B><A HREF=
"LTR.htm"> LTR Load Task Register
</A>