The eflags register is introduced. It is taken from the Intel instruction set reference for quick reference. Due to the limited level of English, translation is saved to avoid translation errors (* wrong _^ *).
The 32-bit eflags register contains a group of Status flags, a control flag, and
Group of system flags. Figure 3-8 defines the flags within this register. Following
Initialization of the processor (either by asserting the reset pin or the init pin),
The state of the eflags register is 00000002 H. bits 1, 3, 5, 15, and 22 through 31 of this
Register are reserved. Software shocould not use or depend on the states of any
These bits.
Some of the flags in the eflags register can be modified directly, using specialpurpose
Instructions (described in the following sections). There are no instructions
That allow the whole register to be examined or modified directly.
The following instructions can be used to move groups of flags to and from the procedure
Stack or the eax register: lahf, sahf, pushf, pushfd, popf, and popfd. After
The contents of the eflags Register have been transferred to the procedure stack or
Eax register, the flags can be examined and modified using the processor's bit
Manipulation instructions (BT, BTS, BTR, and BTC ).
When suspending a task (using the processor's multitasking facilities), the processor
Automatically saves the state of the eflags register in the task state segment (TSS)
For the task being susponded. When binding itself to a new task, the processor Loads
The eflags register with data from the new task's TSS.
When a call is made to an interrupt or exception handler procedure, the processor
Automatically saves the state of the eflags registers on the procedure stack. When an interrupt or exception is handled with a task switch, the state of the eflags
Register is saved in the TSS for the task being susponded.
As the IA-32 architecture has evolved, flags have been added to the eflags register,
But the function and placement of existing flags have remained the same from one
Family of the IA-32 processors to the next. As a result, code that accesses or modifies
These flags for one family of IA-32 processors works as expected when run on later
Families of processors.