flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > delayed code choice question |
Author |
|
Tomasz Grysztar 31 Jan 2009, 21:07
Just use forward-reference to access the symbolic constant defined at the end of code. Something like:
Code: macro func { counter@func = counter@func + 1 if total@func > 1 ; implementation 2 nop else ; implementation 1 end if } counter@func = 0 ; program body func ; program end total@func = counter@func Or did I misunderstood what do you need? |
|||
31 Jan 2009, 21:07 |
|
IronFelix 31 Jan 2009, 21:24
Thank for so quick reply Tomasz, but I need not exactly this - is it possible to get "implementation2" for all functions if counter@func > 1,
not "implementation1" for the first, and "implementation2" for rest? And only if "func" is the one in code - use "implementation1". |
|||
31 Jan 2009, 21:24 |
|
IronFelix 31 Jan 2009, 21:29
Sorry, this work as needed. Thanks a lot Tomasz.
|
|||
31 Jan 2009, 21:29 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.