flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Nested Functions |
Author |
|
Tomasz Grysztar 05 Jul 2005, 15:35
I tried to design some clever macros doing such things:
Code: macro undefine [name] { local undefined name equ undefined } macro func name { match any, subs@func \{ tmp@func equ subs@func restore subs@func subs@func equ tmp@func,name \} match , subs@func \{ restore subs@func subs@func equ name \} match parent, fullname@func \{ fullname@func equ parent\#.\#name fullname@func: \} match , fullname@func \{ fullname@func equ name \} subs@func equ name: } macro endf { match subs, subs@func \{ undefine subs \} restore subs@func restore fullname@func } fullname@func equ Use them like: Code: func start func func1 func func2 endf endf func func3 endf endf func start2 call func1 ; calls start2.func1 call start.func1 call start.func1.func2 func func1 endf endf |
|||
05 Jul 2005, 15:35 |
|
vid 05 Jul 2005, 15:39
well - there are no "functions" in FASM's preprocessor. Did you mean macros, procedures or just nested labels (namespaces) - there was thread about these, try searching.
|
|||
05 Jul 2005, 15:39 |
|
jvff 05 Jul 2005, 15:47
Thank you very much I'm slowly migrating from NASM to FASM and I'm quite perplexed by it's macro abilities. That's exactly what I needed. I will try to learn more about macros so I can do some changes to it so I can use it with proc, invoke, and as labels. Again Thank you,
JVFF |
|||
05 Jul 2005, 15:47 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.