IA-32 Assembly Language Reference Manual

Pop Stack into Word (pop)

pop{wl}			r/m[16|32]
pop{l}			[%ds|%ss|%es|%fs|%gs]
Operation

stack -> r/m[16|32]

stack -> segment register

Description

Replaces the previous contents of the register or memory operand with a word or long from the top of the stack.

Replaces the previous contents of the segment register operand with a long.

For a word, SP + 2; for a long, SP + 4.

Example

Replace the contents of the memory location pointed to by the EDI register, plus an offset of 4, with the word from the top of the stack:

popw 4(edi)

Replace the contents of the memory location pointed to by the EAX register with the long from the top of the stack:

popl %eax