flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > using brackets and parenthesis...

Author
Thread Post new topic Reply to topic
flash



Joined: 11 Mar 2006
Posts: 55
Location: Cuba
flash
Hi...
how do I use brackets and parenthesis inside the valid macro code? For example, to do a valid coding like:
Code:
while (i < 3)
{
;do something
}
    

_________________
i don't hate goto
Post 11 Apr 2009, 13:11
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17247
Location: In your JS exploiting you and your system
revolution
while is an assembler-stage block directive. So you do this:
Code:
while x<y
 ...
end while    
BTW: Have you read TFM?
Post 11 Apr 2009, 13:19
View user's profile Send private message Visit poster's website Reply with quote
flash



Joined: 11 Mar 2006
Posts: 55
Location: Cuba
flash
Sory, i was not clear enough.
I am asking for how to write some macros(like .if, .code, struc and so) in order to let coding like C++ or Java. Just like my example, using brackets and parenthesis
Thank's

_________________
i don't hate goto
Post 11 Apr 2009, 18:43
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17247
Location: In your JS exploiting you and your system
revolution
So you want to write Java and C++ and then use an assembler to compile it? Confused Exclamation
Post 11 Apr 2009, 23:33
View user's profile Send private message Visit poster's website Reply with quote
buzzkill



Joined: 15 Mar 2009
Posts: 111
Location: the nether lands
buzzkill
I think he wants to write macros that will allow him to put "blocks" of assembly code between braces, ie make his assembly look like C++. So instead of:
Code:
.if
  <code>
    

he wants:
Code:
if {
  <code>
}
    


Unless I've misunderstood of course Smile
Post 12 Apr 2009, 00:30
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17247
Location: In your JS exploiting you and your system
revolution
From my testing it seems you can't match the following six symbols with any of the macro directives:
Code:
{}#`'"    
So my advice would be if you really really really need to have curly brackets to pass the preprocessor-stage and used in the assembler-stage, then it is time for you to make some changes to the file "X86_64.INC" and do your custom processing in there.
Post 12 Apr 2009, 00:40
View user's profile Send private message Visit poster's website Reply with quote
flash



Joined: 11 Mar 2006
Posts: 55
Location: Cuba
flash
Hi, seems to be difficult. Exactly as revolution say: i want to write a code form like java or c++ but to be compiled with fasm Idea
I never use fasm preprocesor or directives for more than a normal program, but I undesrtand than it is very flexible by means of macro definition.
Well, thanks again, very much, definitively I must do something with fasm source code Shocked jejeje.

_________________
i don't hate goto
Post 12 Apr 2009, 15: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-2020, Tomasz Grysztar.

Powered by rwasa.