POPF

POP FLAGS POPF

Operation:

Flags - ((SP) + 1:(SP)) (SP) - (SP) + 2

Description:

POPF

POPF transfers specific bits from the word at the current top of stack (pointed to by register SP) into the 8086/8088 flags, replacing whatever values the flags previously contained (see figure 2-32). SP is then incremented by two to point to the new top of stack. PUSHF

Flags Affected:

All

and POPF allow a procedure to save and restore a calling program's flags. They also allow a program to change the setting of TF (there is no instruction for updating this flag directly). The change is accomplished by pushing the flags, altering bit 8 of the memory- image and then popping the flags.

Encoding:

1100111011

POPF Operands Clocks Transfers Bytes POPF Coding Example

(no operands)

12

1

1

POPF

2-128

Page 163
Image 163
Intel 210200-002 manual POP Flags Popf, All