0

我需要在程序集中设置零标志,但它不应该更改任何其他标志。所以我想做 pushf,把它弹出到 eax 但我不知道如何给标志 reg 它的新值。我能想到的:

pushf
pop eax,
or eax , 000..1..00 // set the location of zf to 1

从这里我不知道该怎么做。

4

1 回答 1

1

Simplest solution not involving any other register:

pushf
or dword [esp],64  ;bit[6] has ZF
popf
于 2015-03-10T21:46:49.550 回答