Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- iAPx86 - <b>pushf push flags on stack flags: not altered</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
PUSHF           Push Flags on Stack                  Flags: Not altered

PUSHF                                                IOv86
PUSHFD  (CPU: 386+)                                  IOv86

        Logic   PUSH eFLAGS

    PUSHF decrements the stack pointer by 2 and copies the flags
    register to the new top of stack.

    PUSHFD decrements the stack pointer by 4 and copies the 80386+
    EFLAGS register to the new top of stack (addressed by SS:eSP).

    This instruction is IOPL-sensitive in V86 mode so the flags
    copied to top of stack may not reflect the actual state of the
    (e)flags register.

    Note
    Some assemblers support a PUSHF extension (PUSHFW) that forces a
    16-bit word-style push regardless of the code segment's size
    attribute (80386+).


    Opcode      Format
    9C          PUSHF
    9C          PUSHFD


    Length and timing
    Variations  Bytes   8088    186     286     386     486     Pentium
    pushf        1      14       9       3       4       4       9   NP
    pushfd       1       -       -       -       4       4       9   NP

                             Protected Mode

                Bytes                   286     386     486     Pentium
    pushf        1                       3       4       3       3   NP
    pushfd       1                       -       4       3       3   NP

See Also: POPF PUSH LAHF SAHF SETcc IOPL Flags

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson