flat assembler
Message board for the users of flat assembler.
Index
> Main > label in a macro question |
Author |
|
Tomasz Grysztar 08 May 2009, 22:36
When you replace "repeat" with "rept", the "A" and "C" variants will work correctly
Code: macro A { local L_A jmp L_A L_A: ret } macro C { jmp @f @@: ret } macro D { rept 5 \{ A C \} } D The feature you tried to use in "B" comes from NASM syntax and should be used differently. Since you come from MASM, I suggest you ignore it for now. |
|||
08 May 2009, 22:36 |
|
sgdt 09 May 2009, 02:37
Thank you for your assistance.
As I mentioned, I had tried rept, but still had an issue: Code: macro Root { rept 21 \{ local label label: loop label \} } proc Fred Root ret endp The above is identical to documentation, except it's in a macro. Anyway, FASM seems to be a great asm. I've gotten around the issue by using the "irp" directive, which doesn't seem to have the problem. This particular piece of code makes very heavy use of embedded macros within macros with pre-processed loops, generates about 1MB object (which will double when the non-SSSE3 codepath is put in place). Gota love video... Thank you. |
|||
09 May 2009, 02:37 |
|
revolution 09 May 2009, 02:46
You have to "escape" the local directive also:
Code: macro Root { rept 21 \{ \local label ;<--- escape with a backslash label: loop label \} } |
|||
09 May 2009, 02:46 |
|
sgdt 09 May 2009, 03:15
I would never have thought to try that...
Thank you very much! |
|||
09 May 2009, 03:15 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.