flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Macroinstructions > How use if.inc macros?

Author
Thread Post new topic Reply to topic
beatsspam



Joined: 30 Dec 2016
Posts: 2
How use if.inc macros?
I included if.inc file, but

Code:

.if EAX == 5
    invoke MessageBox,NULL,HelloMessage,"MesHeader",MB_OK
.endif  



and

Code:

if EAX == 5
    invoke MessageBox,NULL,HelloMessage,"MesHeader",MB_OK
end if  



errors(
Post 30 Dec 2016, 11:45
View user's profile Send private message Reply with quote
system error



Joined: 01 Sep 2013
Posts: 503
.if... .endif is a runtime object. It evaluates EAX at runtime

if ... end if is an assembly time object. It evaluates before runtime.

Not good at macro but I think that should answer it at some point. Just guessing Very Happy
Post 31 Dec 2016, 08:41
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6386
Location: Kraków, Poland
fasm's logical comparisons use Pascal-like syntax, so it should be ".if EAX = 5" not ".if EAX == 5".
Post 31 Dec 2016, 09:46
View user's profile Send private message Visit poster's website Reply with quote
beatsspam



Joined: 30 Dec 2016
Posts: 2
Tomasz, Thanks so really works
system error, Thank you, this information was also useful for me
issue has been resolved. Cool
Post 31 Dec 2016, 13:29
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


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.