flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > Macro repeat problem! |
Author |
|
vid 27 Apr 2007, 09:39
Code: macro ProMul M1,M2 { local ..Lmul ;<--- mov dx,0 mov cx,M1 ..Lmul: ;<---- add dx,M2 Loop Lmul } prefixing macro-local name with two dots is good idea, so that it doesn't change current "namespace" label |
|||
27 Apr 2007, 09:39 |
|
u111no 27 Apr 2007, 09:53
Thank you Vid.
All works!! P.S. [Loop Lmul] -> [Loop ..Lmul] too |
|||
27 Apr 2007, 09:53 |
|
vid 27 Apr 2007, 09:57
Quote: Thank you Vid you're welcome. by the way, it's "vid", not "Vid" |
|||
27 Apr 2007, 09:57 |
|
asmfan 27 Apr 2007, 14:57
Let me ask this question, what the reason to write
Code: local ..Lmul Code: local .Lmul _________________ Any offers? |
|||
27 Apr 2007, 14:57 |
|
vid 28 Apr 2007, 15:17
there is no resulting difference whether you use two dots or just one, because "local" directive changes the resulting name.
Using two is better for clarity, local labels should be used only for local things |
|||
28 Apr 2007, 15:17 |
|
LocoDelAssembly 28 Apr 2007, 15:36
In this scenario (among others), double dotted labels are needed:
Code: macro block{ local ..end macro exit\{jmp ..end\} macro end\{..end:\} } block ; some code exit ; Works since aLabel doesn't hide double dotted labels aLabel: ; some code end |
|||
28 Apr 2007, 15:36 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.