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?
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...
pushfd
or D,1
popfd
to set the carry flag.
pushfd
or D,1
popfd
to set the carry flag.
wouldnt stc be easier to set the carry flag? ;)
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.
cld/std: clear/set the direction flag
but they're in the low word of the flags register anyway.
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.
but,
such as cli/sti can not run in some OS, any idea to replace these?
such as cli/sti can not run in some OS, any idea to replace these?