How to read and write x86 flags registers directly?

前端 未结 6 896
执笔经年
执笔经年 2020-11-29 05:07

From what I\'ve read, seems like there are 9 different flags. Is it possible to read/change them directly? I know I can know for example if the zero flag is set after doing

6条回答
  •  天命终不由人
    2020-11-29 06:03

    You can use the pushf and popf instructions which will push the flags onto the stack, you can modify them, and then pop them back off.

提交回复
热议问题