-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathPUSHF.htm
67 lines (50 loc) · 1.59 KB
/
PUSHF.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
<HEAD>
<TITLE>80386 Programmer's Reference Manual -- Opcode PUSHF</TITLE>
</HEAD>
<BODY STYLE="width:80ch">
<B>up:</B> <A HREF="c17.htm">
Chapter 17 -- 80386 Instruction Set</A><BR>
<B>prev:</B><A HREF="PUSHA.htm"> PUSHA/PUSHAD Push all General Registers</A><BR>
<B>next:</B><A HREF="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">Chapter 2</A> and
<A HREF="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">
Chapter 17 -- 80386 Instruction Set</A><BR>
<B>prev:</B><A HREF="PUSHA.htm"> PUSHA/PUSHAD Push all General Registers</A><BR>
<B>next:</B><A HREF="RCL.htm"> RCL/RCR/ROL/ROR Rotate</A>
</BODY>