Instruction Set
4-175
POP
Pop Component from Stack
POP
What It Does
POP copies a component from the top of the stack and then removes the storage space
for the component from the stack.
Syntax
Description
POP loads the word at the top of the processor stack into the destination specified by the
operand. The top of the stack is specified by the contents of SS and the Stack Pointer
register, SP. The stack pointer increments by 2 to point to the new top of stack.
A POP SS instruction inhibits all interrupts, including nonmaskable interrupts, until after
execution of the next instruction. This allows sequential execution of POP SS and POP SP
instructions without danger of having an invalid stack during an interrupt.
A pop-to-memory instruction that uses the stack pointer as a base register references
memory after the POP. The base is the value of the stack pointer after the instruction has
been executed.
Note that POP CS is not a valid instruction; use RET to pop from the stack into CS.
Operation It Performs
Flag Settings After Instruction
Form
Opcode
Description
Clocks
Am186 Am188
POP
m16
8F
/0
Pop top word of stack into memory word
20
24
POP
r16
58+
rw
Pop top word of stack into word register
10
14
POP DS
1F
Pop top word of stack into DS
8
12
POP ES
07
Pop top word of stack into ES
8
12
POP SS
17
Pop top word of stack into SS
8
12
POP
component
/* copy component from stack */
destination = SS:[SP];
/* remove storage from stack */
SP = SP + 2;
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Processor Status
Flags Register
reserved
OF DF
IF TF SF ZF
AF
PF
CF
? = undefined; – = unchanged
–
–
–
–
–
– res – res – res –
4
Содержание Am186 Series
Страница 1: ...Am186 and Am188 Family Instruction Set Manual February 1997...
Страница 10: ...Table of Contents x...
Страница 18: ...Programming 1 8...
Страница 40: ...Instruction Set Listing 3 14...