flat assembler
Message board for the users of flat assembler.

Index > Windows > FASM syntax problem: times + macro

Author
Thread Post new topic Reply to topic
SPTH



Joined: 24 Jul 2004
Posts: 91
SPTH 04 Dec 2010, 09:28
Hey,
I want to call a macro N times:

Code:
include 'E:\Programme\FASM\INCLUDE\win32ax.inc'

.data

macro SingleFilledTable
{
                dd 26841597
                dd 846459
                dd 1342127453
                dd 18238399
                dd 0x0
                dd 265633831
                dd 294331891
                dd 4036313
}

times 232: SingleFilledTable

start:

        invoke MessageBox, 0x0, 0x0, 0x0, 0x0
        ret

.end start                                  
    



But this gives me a syntax error. What is the problem and how can it be solved?

Thanks for Help!
Post 04 Dec 2010, 09:28
View user's profile Send private message Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 789
Location: Adelaide
sinsi 04 Dec 2010, 09:34
Don't know why (I don't use macros), but this seems OK
Code:
repeat 232
SingleFilledTable
end repeat
    
Post 04 Dec 2010, 09:34
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 04 Dec 2010, 10:30
See manual, section 2.3.5 - Repeating macroinstructions.
Note that fasm's preprocessor is a separate language that does its work on the complete source before it is send to assembler module. Therefore TIMES, which is an assembler directive, cannot affect something that is done by preprocessor, like expansion of macro.
Post 04 Dec 2010, 10:30
View user's profile Send private message Visit poster's website Reply with quote
SPTH



Joined: 24 Jul 2004
Posts: 91
SPTH 04 Dec 2010, 11:56
OK, i understand now. Thanks for the Infos and the Solution!
Post 04 Dec 2010, 11:56
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.