I want to find a way to manually set any bit of flags (esp to set the high byte of flags, lahf and sahf cannot do that). I don't want to use pushf and popf, coz it's so slow. Any good alternatives?
Posted on 2004-08-08 22:09:19 by optimus
Depends on what flags, if you want to set them generally then pushfd/popfd are the only viable means. Anyway I don't see it as taking too long...

or D,1

to set the carry flag.
Posted on 2004-08-08 22:30:53 by donkey
wouldnt stc be easier to set the carry flag? ;)
Posted on 2004-08-09 08:03:33 by evlncrn8
clc/stc: clear/set the carry flag
cld/std: clear/set the direction flag

but they're in the low word of the flags register anyway.
Posted on 2004-08-09 10:12:39 by QvasiModo

wouldnt stc be easier to set the carry flag? ;)

The carry flag was just an example, he wanted to set the high order byte of the flags register, it will do that as well.
Posted on 2004-08-09 10:29:17 by donkey

such as cli/sti can not run in some OS, any idea to replace these?
Posted on 2004-08-10 00:39:00 by bailao