X86-assembly/Instructions/pushf

From aldeid
Jump to navigation Jump to search
You are here:
pushf

Description

Push bits 0-15 of RFLAGS (EFL field in OllyDbg) to stack:

bit    abbr    description
------ ------- ------------------------------------------------------------
0 	CF 	Carry flag
1 		Reserved 
2 	PF 	Parity flag
3 		Reserved
4 	AF 	Adjust flag
5 		Reserved
6 	ZF 	Zero flag
7 	SF 	Sign flag
8 	TF 	Trap flag
9 	IF 	Interrupt enable flag
10 	DF 	Direction flag
11 	OF 	Overflow flag
12-13 	IOPL 	I/O privilege level (286+ only), always 1 on 8086 and 186
14 	NT 	Nested task flag (286+ only), always 1 on 8086 and 186
15 		Reserved, always 1 on 8086 and 186, always 0 on later models

Syntax

pushf

Examples

The pushf instruction at offset 0x401426 has pushed the value 0x206 to the stack, which corresponds to 0000001000000110 in binary:

+------+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
| bit  | 15 | 14 | 13 | 12 | 11 | 10 | 09 | 08 | 07 | 06 | 05 | 04 | 03 | 02 | 01 | 00 |
| val  |  0 |  0 |  0 |  0 |  0 |  0 |  1 |  0 |  0 |  0 |  0 |  0 |  0 |  1 |  1 |  0 |
| flag |  0 | NT |  IOPL   | OF | DF | IF | TF | SF | ZF |  0 | AF |  0 | PF |  1 | CF |
+------+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+

Comments