6-43
INSTRUCTION SET SUMMARY
The POPF instruction pops a word from the stack into the EFLAGS register. Only bits 11, 10,
8, 7, 6, 4, 2, and 0 of the EFLAGS register are affected with all uses of this instruction. If the
current privilege level (CPL) of the current code segment is 0 (most privileged), the IOPL bits
(bits 13 and 12) also are affected. If the I/O privilege level (IOPL) is greater than or equal to the
CPL, numerically, the IF flag (bit 9) also is affected.
The POPFD instruction pops a doubleword into the EFLAGS register. This instruction can
change the state of the AC bit (bit 18) and the ID bit (bit 21), as well as the bits affected by a
POPF instruction. The restrictions for changing the IOPL bits and the IF flag that were given for
the POPF instruction also apply to the POPFD instruction.
6.13.4.Interrupt Flag Instructions
The CLI (clear interrupt flag) and STI (set interrupt flag) instructions clear and set the interrupt
flag (IF) in the EFLAGS register, respectively. Clearing the IF flag causes external interrupts to
be ignored. The ability to execute these instructions depends on the operating mode of the
processor and the current privilege level (CPL) of the program or task attempting to execute
these instructions.
6.14.SEGMENT REGISTER INSTRUCTIONS
The processor provides a variety of instructions that address the segment registers of the
processor directly. These instructions are only used when an operating system or executive is
using the segmented or the real-address mode memory model.
6.14.1.Segment-Register Load and Store Instructions
The MOV instruction (introduced in Section 6.3.1., General-Purpose Data Movement Instruc-
tions) and the PUSH and POP instructions (introduced in Section 6.3.2., Stack Manipulation
Instructions) can transfer 16-bit segment selectors to and from segment registers (DS, ES, FS,
GS, and SS). The transfers are always made to or from a segment register and a general-purpose
register or memory. Transfers between segment registers are not supported.
Figure 6-11. Flags Affected by the PUSHF, POPF, PUSHFD, and POPFD instructions
PUSHFD/POPFD
PUSHF/POPF
3129
3028272625242322212019181716
0
R
F
I
D
A
C
V
M
1513
141211109876543210
0
C
F
A
F
P
F1
D
F
I
F
T
F
S
F
Z
F
N
T
0
0
000000000
V
I
P
V
I
F
O
F
I
O
P
L