📄 push.htm
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><HTML><HEAD><TITLE>80386 Programmer's Reference Manual -- Opcode PUSH</TITLE></HEAD><BODY><B>up:</B> <A HREF="c17.htm">Chapter 17 -- 80386 Instruction Set</A><BR><B>prev:</B><A HREF="POPF.htm"> POPF/POPFD Pop Stack into FLAGS or EFLAGS Register</A><BR><B>next:</B><A HREF="PUSHA.htm"> PUSHA/PUSHAD Push all General Registers</A><P><HR><P><H1>PUSH -- Push Operand onto the Stack</H1><PRE>Opcode Instruction Clocks DescriptionFF /6 PUSH m16 5 Push memory wordFF /6 PUSH m32 5 Push memory dword50 + /r PUSH r16 2 Push register word50 + /r PUSH r32 2 Push register dword6A PUSH imm8 2 Push immediate byte68 PUSH imm16 2 Push immediate word68 PUSH imm32 2 Push immediate dword0E PUSH CS 2 Push CS16 PUSH SS 2 Push SS1E PUSH DS 2 Push DS06 PUSH ES 2 Push ES0F A0 PUSH FS 2 Push FSOF A8 PUSH GS 2 Push GS</PRE><H2>Operation</H2><PRE>IF StackAddrSize = 16THEN IF OperandSize = 16 THEN SP := SP - 2; (SS:SP) := (SOURCE); (* word assignment *) ELSE SP := SP - 4; (SS:SP) := (SOURCE); (* dword assignment *) FI;ELSE (* StackAddrSize = 32 *) IF OperandSize = 16 THEN ESP := ESP - 2; (SS:ESP) := (SOURCE); (* word assignment *) ELSE ESP := ESP - 4; (SS:ESP) := (SOURCE); (* dword assignment *) FI;FI;</PRE><H2>Description</H2>PUSH decrements the stack pointer by 2 if the operand-size attribute ofthe instruction is 16 bits; otherwise, it decrements the stack pointer by4. PUSH then places the operand on the new top of stack, which ispointed to by the stack pointer.<P>The 80386 PUSH eSP instruction pushes the value of eSP as it existedbefore the instruction. This differs from the 8086, where PUSH SPpushes the new value (decremented by 2).<H2>Flags Affected</H2>None<H2>Protected Mode Exceptions</H2>#SS(0) if the new value of SP or ESP is outside the stack segment limit;#GP(0) for an illegal memory operand effective address in the CS, DS,ES, FS, or GS segments; #SS(0) for an illegal address in the SS segment;#PF(fault-code) for a page fault<H2>Real Address Mode Exceptions</H2>None; if SP or ESP is 1, the 80386 shuts down due to a lack of stackspace<H2>Virtual 8086 Mode Exceptions</H2>Same exceptions as in real-address mode; #PF(fault-code) for a pagefault<P><HR><P><B>up:</B> <A HREF="c17.htm">Chapter 17 -- 80386 Instruction Set</A><BR><B>prev:</B><A HREF="POPF.htm"> POPF/POPFD Pop Stack into FLAGS or EFLAGS Register</A><BR><B>next:</B><A HREF="PUSHA.htm"> PUSHA/PUSHAD Push all General Registers</A></BODY>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -