وو

وحید آنلاین . آرشیو وبلاگ وحیدمی دات آی آر . شرکت بیان. vahidmy.blog.ir

وو

وحید آنلاین . آرشیو وبلاگ وحیدمی دات آی آر . شرکت بیان. vahidmy.blog.ir

POP

POP 

Usage:  POP     dest                                 Modifies flags: None

Transfers word at the current stack top ESP to the 'dest'  then increments ESP by two to point to the new stack top.  CS is not a valid destination. 

Pop Data from Stack


POP reg16                     ; o16 58+r             [8086]

POP reg32                     ; o32 58+r             [386]


POP r/m16                     ; o16 8F /0            [8086]

POP r/m32                     ; o32 8F /0            [386]


POP CS                        ; 0F                   [8086,UNDOC]

POP DS                        ; 1F                   [8086]

POP ES                        ; 07                   [8086]

POP SS                        ; 17                   [8086]

POP FS                        ; 0F A1                [386]

POP GS                        ; 0F A9                [386]


POP loads a value from the stack (from ESP) and then increments the stack pointer.


The address-size attribute of the instruction determines whether ESP is used as the stack pointer.


The above opcode listings give two forms for general-purpose register pop instructions: for example, POP BX has the two forms B and F C3. RosAsm will always generate the shorter form when given POP BX.


POP CS is not a documented instruction, and is not supported on any processor above the 8086 (since they use Fh as an opcode prefix for instruction set extensions). However, at least some 8086 processors do support it, and so RosAsm generates it for completeness.


Example:

xor ebx ebx

mov eax 15

push eax

pop ebx ; ebx = 15


POP