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>pop pop operand from stack flags: not altered</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
POP             Pop Operand from Stack               Flags: Not altered

POP destination

        Logic   destination . [SS:eSP]
                eSP . eSP + n
                ; n = 2 if operand-size attribute is 16 bits, else 4

    POP replaces the contents of the destination operand with the word
    or doubleword at the current top of stack, addressed by SS:SP
    (stack address-size attribute 16) or SS:ESP (stack address-size
    attribute 32). The stack pointer is then incremented by 2 for an
    operand-size of 16 bits, or by 4 for an operand-size of 32 bits,
    to point to the new top of stack.

    The CS register cannot be used as the destination of a POP
    instruction.

    A POP SS instruction inhibits all interrupts, including NMI, until
    after execution of the next instruction. This allows sequential
    execution of POP SS, POP SP without danger of having an invalid
    stack during an interrupt. However, using the LSS instruction is
    preferred.


    Protected mode
    If the destination operand is a segment register (DS,ES,FS,GS, or
    SS), the value popped must be a selector. Loading the selector
    initiates automatic loading of the descriptor information
    associated with that selector into the programmer-invisible part
    of the segment register; loading also initates validation of both
    the selector and the descriptor information.


    Opcode      Format
    07          POP  ES
    0F A1       POP  FS
    0F A9       POP  GS
    17          POP  SS
    1F          POP  DS
    58 + rw     POP  r16
    58 + rd     POP  r32
    8F /0       POP  m16
    8F /0       POP  m32


    Length and timing
    Operands    Bytes   8088    186     286     386     486     Pentium
    reg          1      12      10       5       4       1       1   UV
    mem       2+d(0-2)  25+EA   20       5       5       6       3   NP
    seg          1      12       8       5       7       3       3   NP
    FS/GS        2       -       -       -       7       3       3   NP

                             Protected Mode

    Operand     Bytes                   286     386     486     Pentium
    CS/DS/ES     1                      20      21       9     3-12  NP
    SS           1                      20      21       9     8-17  NP
    FS/GS        2                       -      21       9     3-12  NP

See Also: POPA POPF PUSH PUSHA PUSHF LEAVE MOV

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