Reputation: 11
I need to set the zero flag in assembly but it shouldn't change any other flags. so I was thinking to do pushf, pop it to eax but I have no idea how to give the flag reg it's new value. all I can think of :
pushf
pop eax,
or eax , 000..1..00 // set the location of zf to 1
and from here I have no idea what to do.
Upvotes: 0
Views: 629
Reputation: 39306
Simplest solution not involving any other register:
pushf
or dword [esp],64 ;bit[6] has ZF
popf
Upvotes: 1