News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

pushfd /popfd

Started by GUAN DE DIO, August 25, 2008, 06:21:02 PM

Previous topic - Next topic

GUAN DE DIO

Hi everybody,

       In 32 bits I used pushfd/popfd to save/restore the flag register but in 64 bit platform I had the next issue when I compile the code

       error A2008: syntax error : pushad

       Which is the alternative?

Thanks,
GUAN

evlncrn8

pushaq / popaq maybe, though i dont think that worked for me last time i tried it...
so you may have to go the long route of push rax->all registers you want preserved etc...

using pushad/popad is a bit excessive though, are you really using all the registers?

jj2007

Quote from: GUAN DE DIO on August 25, 2008, 06:21:02 PM
       In 32 bits I used pushfd/popfd to save/restore the flag register but in 64 bit platform I had the next issue when I compile the code
       error A2008: syntax error : pushad
Unclear what you mean: You want to use pushfd but get an error for pushad?

GUAN DE DIO

Sorry, It was a mistake.

    I wanted to mean pushfd/popfd to save/restore the flag register.

    I found the solution, the new instructions are pushfq and popfq

Thanks for all.

GUAN