flat assembler
Message board for the users of flat assembler.

Index > Windows > compare auxiliary flag

Author
Thread Post new topic Reply to topic
Ali.Z



Joined: 08 Jan 2018
Posts: 732
Ali.Z 28 Jun 2018, 12:45
is this the best way to compare af?
jnz - jumps if af was set?
Code:
pushf
pop ax
test al,0x10
jnz    

_________________
Asm For Wise Humans
Post 28 Jun 2018, 12:45
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20451
Location: In your JS exploiting you and your system
revolution 28 Jun 2018, 12:49
There is also lahf. But I don't know what you mean by "best", because lahf is not available in all CPU modes, so maybe it isn't good for you.
Code:
lahf
test ah,0x10
jnz ...    
Post 28 Jun 2018, 12:49
View user's profile Send private message Visit poster's website Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 732
Ali.Z 28 Jun 2018, 13:18
my cpu:
LAHF/SAHF support in 64-bit mode

thanks again rev, you are cool.

_________________
Asm For Wise Humans
Post 28 Jun 2018, 13:18
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.