IA-32 Assembly Language Reference Manual

Push Flag Register Onto Stack (pushf)

pushf{wl}

Operation

flags register -> stack

Description

For a word, SP - 2 and copies FLAGS to the new top of stack pointed to by SP. For a long, SP - 4 and copies EFLAGS to the new top of stack pointed to by SS:eSP.

Example

Pushes the flags register onto the top of the stack:

pushfw

Pushes the eflags register onto the top of the stack:

pushfl