* remove "\r" nonsense
[mascara-docs.git] / i386 / i386.reference / PUSHF.htm
blobb9ffdcfa11895c4409595dcc510a10521b57d27c
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
2 <HTML>
3 <HEAD>
4 <TITLE>80386 Programmer's Reference Manual -- Opcode PUSHF</TITLE>
5 </HEAD>
6 <BODY>
7 <B>up:</B> <A HREF="c17.htm">
8 Chapter 17 -- 80386 Instruction Set</A><BR>
9 <B>prev:</B><A HREF="PUSHA.htm"> PUSHA/PUSHAD Push all General Registers</A><BR>
10 <B>next:</B><A HREF="RCL.htm"> RCL/RCR/ROL/ROR Rotate</A>
11 <P>
12 <HR>
13 <P>
14 <H1>PUSHF/PUSHFD -- Push Flags Register onto the Stack</H1>
16 <PRE>
17 Opcode Instruction Clocks Description
19 9C PUSHF 4 Push FLAGS
20 9C PUSHFD 4 Push EFLAGS
21 </PRE>
24 <H2>Operation</H2>
26 <PRE>
27 IF OperandSize = 32
28 THEN push(EFLAGS);
29 ELSE push(FLAGS);
30 FI;
31 </PRE>
33 <H2>Description</H2>
35 PUSHF decrements the stack pointer by 2 and copies the FLAGS
36 register to the new top of stack; PUSHFD decrements the stack pointer by
37 4, and the 80386 EFLAGS register is copied to the new top of stack
38 which is pointed to by SS:eSP. Refer to
39 <A HREF="c02.htm">Chapter 2</A> and
40 <A HREF="c04.htm">Chapter 4</A> for
41 information on the EFLAGS register.
43 <H2>Flags Affected</H2>
45 None
47 <H2>Protected Mode Exceptions</H2>
49 #SS(0) if the new value of eSP is outside the stack segment boundaries
51 <H2>Real Address Mode Exceptions</H2>
53 None; the 80386 shuts down due to a lack of stack space
55 <H2>Virtual 8086 Mode Exceptions</H2>
57 #GP(0) fault if IOPL is less than 3, to permit emulation
60 <P>
61 <HR>
62 <P>
63 <B>up:</B> <A HREF="c17.htm">
64 Chapter 17 -- 80386 Instruction Set</A><BR>
65 <B>prev:</B><A HREF="PUSHA.htm"> PUSHA/PUSHAD Push all General Registers</A><BR>
66 <B>next:</B><A HREF="RCL.htm"> RCL/RCR/ROL/ROR Rotate</A>
67 </BODY>