flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > Macro question (extended invoke macro)

Author
Thread Post new topic Reply to topic
OzzY



Joined: 19 Sep 2003
Posts: 1029
Location: Everywhere
OzzY 09 Feb 2006, 18:59
Is it possible to create a macro to use the invoke macro, but returning values like in C language?
The macro would return the value of EAX, but checking would as simples as in C.
Like this:
Quote:

include '%fasminc%\win32ax.inc'
include '%fasminc%\macro\if.inc'

main:
.if ( (invoke MessageBox,0,'Yes or no?','',0)=IDYES )
invoke MessageBox,0,'Clicked yes!','',0
.endif
ret
.end main


Is it possible?[/quote]
Post 09 Feb 2006, 18:59
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8354
Location: Kraków, Poland
Tomasz Grysztar 09 Feb 2006, 19:07
Macros is fasm are always like instruction mnemonics, there are not inline macros. However to make checking like above possible you could perhaps extend the syntax of conditional expressions for ".if" macros to allow the value of "invoke" to be compared with some other value.
Post 09 Feb 2006, 19:07
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.