flat assembler
Message board for the users of flat assembler.
Index
> Main > How to include source at the DESIRED place? |
Author |
|
revolution 23 Sep 2005, 09:57
I think your problem is with the way you use "define". Try this.
In MAIN.ASM: Code: macro if_ndef name { match =name,name \{ } include 'my_lib.inc' lib_call some_func arg0, ... argN Code: if_ndef LIB_INCLUDED macro lib_call f_name*, [args] \{ LIB_\#f_name args \} include '%asm_lib%/p1.inc' } define LIB_INCLUDED Code: if_ndef P1_INCLUDED macro LIB_some_func [args] \{ include '%asm_lib%/some_func.inc' common call P1_some_func \} } define P1_INCLUDED Code: if_ndef LIB_SOME_FUNC_INCLUDED P1_some_func: ; 'SOME_FUNC' code ret } define LIB_SOME_FUNC_INCLUDED |
|||
23 Sep 2005, 09:57 |
|
alxdef 23 Sep 2005, 11:35
May be I'm a lamer, but fasm says
Quote:
??? |
|||
23 Sep 2005, 11:35 |
|
vid 23 Sep 2005, 13:25
FASM's default "proc" macro doesn't generate the code if procedure isn't used anywhere, if this is what you wanted. But this is task of assembler, not preprocessor.
|
|||
23 Sep 2005, 13:25 |
|
revolution 23 Sep 2005, 13:38
Oops, sorry forgot this
Code: macro define name { name equ defined } |
|||
23 Sep 2005, 13:38 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.