flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Macro in Macro |
Author |
|
Sarge 14 Feb 2006, 03:42
Hi,
I was wondering, whats the downside to using a macro in another macro eg: Code: Macro a { } Macro b { a } _________________ Thanks, Sarge |
|||
14 Feb 2006, 03:42 |
|
Madis731 14 Feb 2006, 12:32
additional thoughts:
The problem is that with some tricky code that includes nested macros, matches etc. the assembler does more and more passes to resolve the code. When you have no nestings and everything is in correct order, there are fewer passes and the job gets done quicker. |
|||
14 Feb 2006, 12:32 |
|
Tomasz Grysztar 14 Feb 2006, 12:37
This is not really so straightforward related. Especially when you use matches and not if's, it's unlikely to get more passes because of it.
|
|||
14 Feb 2006, 12:37 |
|
vid 14 Feb 2006, 14:44
these passes have nothing to do with macros.... multiple passes happen duing assembling (if, repeat), after all preprocessing (macro, match) is done.
|
|||
14 Feb 2006, 14:44 |
|
Sarge 14 Feb 2006, 15:52
Yea i understand, thanks for the info guys.
Thanks, Sarge |
|||
14 Feb 2006, 15:52 |
|
Madis731 14 Feb 2006, 22:16
@vid:
Don't say it has *nothing to do* with macros etc. Like Tomasz said, it is not that straigh-forward: Code: dd x,y x=y+y y=x-2 This one takes 64 passes and as I understand there is little related to assembly... :/ ...only the dword |
|||
14 Feb 2006, 22:16 |
|
Tomasz Grysztar 14 Feb 2006, 22:25
But it is not related to preprocessor either. And in fact, in fasm's meaning of this term, this is exactly the "assembly" what happens here.
Well, I still need to finish that "Understanding fasm" text to cover the preprocessor layer and then all the possible interactions between various layers... |
|||
14 Feb 2006, 22:25 |
|
Madis731 15 Feb 2006, 08:05
You do that! And then we'll come back on this topic to clear out what "macro in macro" means
Sorry for confusion I've made :$ |
|||
15 Feb 2006, 08:05 |
|
vid 15 Feb 2006, 09:13
i think reading my preprossesor tutorial may clear it for you _what_ is preprocessor (eg. just some textual substitutions)/
|
|||
15 Feb 2006, 09:13 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.