Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- iAPx86 - <b>lsl load segment limit flags: o d i t s z a p c</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
LSL             Load Segment Limit                   Flags: O D I T S Z A P C
                                                            - - - - - * - - -
LSL destination,source                               CPU: 286+ p

        Logic   if selector(source) visible at CPL
                   ZF . 1
                   destination . segment limit of selector(source)
                else
                   ZF . 0
                endif

    LSL loads a register with a segment limit. The limit comes from
    the descriptor for the segment specified by the selector in the
    second operand. If the source selector is visible at the current
    privilege level (CPL) weakened by RPL, and the descriptor is a
    type accepted by LSL, the zero flag (ZF) is set to 1. Otherwise,
    ZF is reset to 0 and the destination register is unchanged.

    The segment limit is loaded as a byte granular value. If the
    descriptor uses a page granular (G bit = 1) segment limit, LSL
    translates that value to a byte limit (shifts it left 12 bits and
    fills the low 12 bits with 1s) before loading it into the
    destination register.

    If used with a 16-bit destination register (and an operand-size
    attribute of 32), LSL stores the low-order 16 bits of the 32-bit
    byte granular limit in the destination register.

    Code and data segment descriptors are valid for LSL.


    The value placed in the destination register is the offset of the
    last addressable byte in the segment.


    Opcode      Format
    0F 03 /r    LSL  r16,r/m16
    0F 03 /r    LSL  r32,r/m32


    Length and timing
    Operands    Bytes   8088    186     286     386     486     Pentium
    r16, r16     3                      14      20/25   10       8   NP
    r32, r32     3                       -      20/25   10       8
    r16, m16   3+d(0,2)                 16      21/26   10       8
    r32, m32   3+d(0,2)                  -      21/26   10       8

See Also: LAR VERR ARPL Selectors Descriptors

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson