1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML 2.0//EN">
4 <TITLE>80386 Programmer's Reference Manual -- Opcode PUSH
</TITLE>
7 <B>up:
</B> <A HREF=
"c17.htm">
8 Chapter
17 --
80386 Instruction Set
</A><BR>
9 <B>prev:
</B><A HREF=
"POPF.htm"> POPF/POPFD Pop Stack into FLAGS or EFLAGS Register
</A><BR>
10 <B>next:
</B><A HREF=
"PUSHA.htm"> PUSHA/PUSHAD Push all General Registers
</A>
14 <H1>PUSH -- Push Operand onto the Stack
</H1>
17 Opcode Instruction Clocks Description
19 FF /
6 PUSH m16
5 Push memory word
20 FF /
6 PUSH m32
5 Push memory dword
21 50 + /r PUSH r16
2 Push register word
22 50 + /r PUSH r32
2 Push register dword
23 6A PUSH imm8
2 Push immediate byte
24 68 PUSH imm16
2 Push immediate word
25 68 PUSH imm32
2 Push immediate dword
30 0F A0 PUSH FS
2 Push FS
31 OF A8 PUSH GS
2 Push GS
40 IF OperandSize =
16 THEN
42 (SS:SP) := (SOURCE); (* word assignment *)
45 (SS:SP) := (SOURCE); (* dword assignment *)
47 ELSE (* StackAddrSize =
32 *)
51 (SS:ESP) := (SOURCE); (* word assignment *)
54 (SS:ESP) := (SOURCE); (* dword assignment *)
61 PUSH decrements the stack pointer by
2 if the operand-size attribute of
62 the instruction is
16 bits; otherwise, it decrements the stack pointer by
63 4. PUSH then places the operand on the new top of stack, which is
64 pointed to by the stack pointer.
66 The
80386 PUSH eSP instruction pushes the value of eSP as it existed
67 before the instruction. This differs from the
8086, where PUSH SP
68 pushes the new value (decremented by
2).
70 <H2>Flags Affected
</H2>
74 <H2>Protected Mode Exceptions
</H2>
76 #SS(
0) if the new value of SP or ESP is outside the stack segment limit;
77 #GP(
0) for an illegal memory operand effective address in the CS, DS,
78 ES, FS, or GS segments; #SS(
0) for an illegal address in the SS segment;
79 #PF(fault-code) for a page fault
81 <H2>Real Address Mode Exceptions
</H2>
83 None; if SP or ESP is
1, the
80386 shuts down due to a lack of stack
86 <H2>Virtual
8086 Mode Exceptions
</H2>
88 Same exceptions as in real-address mode; #PF(fault-code) for a page
95 <B>up:
</B> <A HREF=
"c17.htm">
96 Chapter
17 --
80386 Instruction Set
</A><BR>
97 <B>prev:
</B><A HREF=
"POPF.htm"> POPF/POPFD Pop Stack into FLAGS or EFLAGS Register
</A><BR>
98 <B>next:
</B><A HREF=
"PUSHA.htm"> PUSHA/PUSHAD Push all General Registers
</A>