flat assembler
Message board for the users of flat assembler.

flat assembler > Windows > compare auxiliary flag

Author
Thread Post new topic Reply to topic
Ali.A



Joined: 08 Jan 2018
Posts: 130
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: 16106
Location: Squiddler's Patch
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.A



Joined: 08 Jan 2018
Posts: 130
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-2018, Tomasz Grysztar.

Powered by rwasa.