I know of the assembly instructions LAHF, SAHF that can load AH from and store AH into the FLAGS register. But how do I do the same for the EFLAGS register? Are there any specific instructions too or is there some other way to do it?
Asked
Active
Viewed 844 times
0
Mayank Kumar
- 1,133
- 3
- 13
- 20
-
Take a look [here](http://docs.oracle.com/cd/E19120-01/open.solaris/817-5477/eoizw/index.html) – Oct 02 '13 at 04:10
-
2Answers go in the answer box. – Jens Björnhager Oct 02 '13 at 04:51
-
... but you should be aware that many bits of EFLAGS cannot be modified directly but only by an "IRET" instruction and only if the task register is set up propperly. – Martin Rosenau Oct 02 '13 at 06:25
-
https://en.wikibooks.org/wiki/X86_Assembly/X86_Architecture#EFLAGS_Register – debug May 17 '18 at 09:15