1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML 2.0//EN">
4 <TITLE>80386 Programmer's Reference Manual -- Opcode POPA
</TITLE>
7 <B>up:
</B> <A HREF=
"c17.htm">
8 Chapter
17 --
80386 Instruction Set
</A><BR>
9 <B>prev:
</B><A HREF=
"POP.htm"> POP Pop a Word from the Stack
</A><BR>
10 <B>next:
</B><A HREF=
"POPF.htm">
11 POPF/POPFD Pop Stack into FLAGS or EFLAGS Register
</A>
15 <H1>POPA/POPAD -- Pop all General Registers
</H1>
18 Opcode Instruction Clocks Description
20 61 POPA
24 Pop DI, SI, BP, SP, BX, DX, CX, and AX
21 61 POPAD
24 Pop EDI, ESI, EBP, ESP, EDX, ECX, and EAX
28 IF OperandSize =
16 (* instruction = POPA *)
33 throwaway := Pop (); (* Skip SP *)
38 ELSE (* OperandSize =
32, instruction = POPAD *)
42 throwaway := Pop (); (* Skip ESP *)
52 POPA pops the eight
16-bit general registers. However, the SP value is
53 discarded instead of loaded into SP. POPA reverses a previous
54 <A HREF=
"PUSHA.htm">PUSHA
</A>,
55 restoring the general registers to their values before
56 <A HREF=
"PUSHA.htm">PUSHA
</A> was
57 executed. The first register popped is DI.
59 POPAD pops the eight
32-bit general registers. The ESP value is
60 discarded instead of loaded into ESP. POPAD reverses the previous
61 <A HREF=
"PUSHA.htm">PUSHAD
</A>,
62 restoring the general registers to their values before
63 <A HREF=
"PUSHA.htm">PUSHAD
</A>
64 was executed. The first register popped is EDI.
66 <H2>Flags Affected
</H2>
70 <H2>Protected Mode Exceptions
</H2>
72 #SS(
0) if the starting or ending stack address is not within the stack
73 segment; #PF(fault-code) for a page fault
75 <H2>Real Address Mode Exceptions
</H2>
77 Interrupt
13 if any part of the operand would lie outside of the effective
78 address space from
0 to
0FFFFH
80 <H2>Virtual
8086 Mode Exceptions
</H2>
82 Same exceptions as in real-address mode; #PF(fault-code) for a page
89 <B>up:
</B> <A HREF=
"c17.htm">
90 Chapter
17 --
80386 Instruction Set
</A><BR>
91 <B>prev:
</B><A HREF=
"POP.htm"> POP Pop a Word from the Stack
</A><BR>
92 <B>next:
</B><A HREF=
"POPF.htm">
93 POPF/POPFD Pop Stack into FLAGS or EFLAGS Register
</A>