Files
2024-02-19 00:21:47 -05:00

52 lines
2.1 KiB
HTML

<html><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>80386 Programmer's Reference Manual -- Opcode PUSHF</title>
</head>
<body>
<b>up:</b> <a href="C17.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/C17.HTM">Chapter 17 -- 80386 Instruction Set</a><br>
<b>prev:</b><a href="PUSHA.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/PUSHA.HTM"> PUSHA/PUSHAD Push all General Registers</a><br>
<b>next:</b><a href="RCL.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/RCL.HTM"> RCL/RCR/ROL/ROR Rotate</a>
<p>
<hr>
<p>
<h1>PUSHF/PUSHFD -- Push Flags Register onto the Stack</h1>
<pre>
Opcode Instruction Clocks Description
9C PUSHF 4 Push FLAGS
9C PUSHFD 4 Push EFLAGS
</pre>
<h2>Operation</h2>
<pre>
IF OperandSize = 32
THEN push(EFLAGS);
ELSE push(FLAGS);
FI;
</pre>
<h2>Description</h2>
PUSHF decrements the stack pointer by 2 and copies the FLAGS register to the new top of stack; PUSHFD decrements the stack pointer by 4, and the 80386 EFLAGS register is copied to the new top of stack which is pointed to by SS:eSP. Refer to <a href="C02.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/C02.HTM">Chapter 2</a> and <a href="C04.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/C04.HTM">Chapter 4</a> for information on the EFLAGS register.
<h2>Flags Affected</h2>
None
<h2>Protected Mode Exceptions</h2>
#SS(0) if the new value of eSP is outside the stack segment boundaries
<h2>Real Address Mode Exceptions</h2>
None; the 80386 shuts down due to a lack of stack space
<h2>Virtual 8086 Mode Exceptions</h2>
#GP(0) fault if IOPL is less than 3, to permit emulation
<p>
<hr>
<p><b>up:</b> <a href="C17.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/C17.HTM">Chapter 17 -- 80386 Instruction Set</a><br>
<b>prev:</b><a href="PUSHA.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/PUSHA.HTM"> PUSHA/PUSHAD Push all General Registers</a><br>
<b>next:</b><a href="RCL.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/RCL.HTM"> RCL/RCR/ROL/ROR Rotate</a>
</body>