1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML 2.0//EN">
4 <TITLE>80386 Programmer's Reference Manual -- Opcode PUSHA
</TITLE>
7 <B>up:
</B> <A HREF=
"c17.htm">
8 Chapter
17 --
80386 Instruction Set
</A><BR>
9 <B>prev:
</B><A HREF=
"PUSH.htm"> PUSH Push Operand onto the Stack
</A><BR>
10 <B>next:
</B><A HREF=
"PUSHF.htm"> PUSHF/PUSHFD Push Flags Register onto the Stack
</A>
14 <H1>PUSHA/PUSHAD -- Push all General Registers
</H1>
17 Opcode Instruction Clocks Description
19 60 PUSHA
18 Push AX, CX, DX, BX, original SP, BP, SI, and
21 60 PUSHAD
18 Push EAX, ECX, EDX, EBX, original ESP, EBP,
29 IF OperandSize =
16 (* PUSHA instruction *)
40 ELSE (* OperandSize =
32, PUSHAD instruction *)
55 PUSHA and PUSHAD save the
16-bit or
32-bit general registers,
56 respectively, on the
80386 stack. PUSHA decrements the stack pointer
57 (SP) by
16 to hold the eight word values. PUSHAD decrements the
58 stack pointer (ESP) by
32 to hold the eight doubleword values. Because
59 the registers are pushed onto the stack in the order in which they were
60 given, they appear in the
16 or
32 new stack bytes in reverse order. The
61 last register pushed is DI or EDI.
63 <H2>Flags Affected
</H2>
67 <H2>Protected Mode Exceptions
</H2>
69 #SS(
0) if the starting or ending stack address is outside the stack segment
70 limit; #PF(fault-code) for a page fault
72 <H2>Real Address Mode Exceptions
</H2>
74 Before executing PUSHA or PUSHAD, the
80386 shuts down if SP or
75 ESP equals
1,
3, or
5; if SP or ESP equals
7,
9,
11,
13, or
15, exception
78 <H2>Virtual
8086 Mode Exceptions
</H2>
80 Same exceptions as in real-address mode; #PF(fault-code) for a page
87 <B>up:
</B> <A HREF=
"c17.htm">
88 Chapter
17 --
80386 Instruction Set
</A><BR>
89 <B>prev:
</B><A HREF=
"PUSH.htm"> PUSH Push Operand onto the Stack
</A><BR>
90 <B>next:
</B><A HREF=
"PUSHF.htm"> PUSHF/PUSHFD Push Flags Register onto the Stack
</A>