flat assembler
Message board for the users of flat assembler.

Index > Main > Allow compare operators like C

Author
Thread Post new topic Reply to topic
alorent



Joined: 05 Dec 2005
Posts: 221
alorent 18 Oct 2009, 06:10
Hello,

With FASM, we can use:

Code:
.if eax & ebx | ~edx 

.endif    


But I'd like to use instead "&&", "||", "!" (not), "!=" like in C/MASM.

I have tried for example the following:

Code:
&&  EQU  &    


But FASM says error Sad

Is it possible to do do it in FASM?

Thanks!!!
Post 18 Oct 2009, 06:10
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 19869
Location: In your JS exploiting you and your system
revolution 18 Oct 2009, 06:56
You can alter the macro code that does the decoding but the "!" character will not be possible unless you separate it from other characters.
Code:
.if eax || ! ebx ;<--- must have a space before and after "!"    
Post 18 Oct 2009, 06:56
View user's profile Send private message Visit poster's website Reply with quote
alorent



Joined: 05 Dec 2005
Posts: 221
alorent 18 Oct 2009, 07:03
Thanks for the info revolution!

Well, at least it's something good Wink

Any ideas how to define those operators then? I'm quite stuck on it Sad
Post 18 Oct 2009, 07:03
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 19869
Location: In your JS exploiting you and your system
revolution 18 Oct 2009, 07:05
Have a look at the file if.inc. That is where all the "magic" is done.
Post 18 Oct 2009, 07:05
View user's profile Send private message Visit poster's website 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-2023, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.