x86 EFLAGS
Jump to navigation
Jump to search
EFLAGS table
Bit | Type /val.[1] |
Name | Abbreviation |
---|---|---|---|
0 | S | Carry Flag | CF
|
1 | 0 | Always clear | rsvd_2 [2]
|
2 | S | Parity Flag | PF
|
3 | 1 | Always set | rsvd_4
|
4 | S | Auxiliary Carry Flag | AF
|
5 | 1 | Always set | rsvd_6
|
6 | S | Zero Flag | ZF
|
7 | S | Sign Flag | SF
|
8 | X | Trap Flag | TF
|
9 | X | Interrupt Enable Flag | IF
|
10 | C | Direction Flag | DF
|
11 | S | Overflow Flag | OF
|
12 | X | I/O Privilege Level | IOPL
|
13 | |||
14 | X | Nested Task | NT
|
15 | 0 | Always clear | rsvd_15
|
16 | X | Resume Flag | RF
|
17 | X | Virtual-8086 Mode | VM
|
18 | X | Alignment Check / Access Control | AC
|
19 | X | Virtual Interrupt Flag | VIF
|
20 | X | Virtual Interrupt Pending | VIP
|
21 | X | ID Flag | ID
|
C macro constants
#define X86_EFLAGS_CF 0 /* Carry Flag [S] */
#define X86_EFLAGS_rsvd_2 1 /* Always clear [0] */
#define X86_EFLAGS_PF 2 /* Parity Flag [S] */
#define X86_EFLAGS_rsvd_4 3 /* Always set [1] */
#define X86_EFLAGS_AF 4 /* Auxiliary Carry Flag [S] */
#define X86_EFLAGS_rsvd_6 5 /* Always set [1] */
#define X86_EFLAGS_ZF 6 /* Zero Flag [S] */
#define X86_EFLAGS_SF 7 /* Sign Flag [S] */
#define X86_EFLAGS_TF 8 /* Trap Flag [X] */
#define X86_EFLAGS_IF 9 /* Interrupt Enable Flag [X] */
#define X86_EFLAGS_DF 10 /* Direction Flag [C] */
#define X86_EFLAGS_OF 11 /* Overflow Flag [S] */
#define X86_EFLAGS_IOPL 12 /* I/O Privilege Level [X] */
#define X86_EFLAGS_IOPL_LO 12 /* I/O Privilege Level low bit [X] */
#define X86_EFLAGS_IOPL_HI 13 /* I/O Privilege Level high bit [X] */
#define X86_EFLAGS_NT 14 /* Nested Task [X] */
#define X86_EFLAGS_rsvd_15 15 /* Always clear [0] */
#define X86_EFLAGS_RF 16 /* Resume Flag [X] */
#define X86_EFLAGS_VM 17 /* Virtual-8086 Mode [X] */
#define X86_EFLAGS_AC 18 /* Alignment Check / Access Control [X] */
#define X86_EFLAGS_VIF 19 /* Virtual Interrupt Flag [X] */
#define X86_EFLAGS_VIP 20 /* Virtual Interrupt Pending [X] */
#define X86_EFLAGS_ID 21 /* ID Flag [X] */