flat assembler
Message board for the users of flat assembler.

Index > Main > Including source files using macroinstructions

Author
Thread Post new topic Reply to topic
alxdef



Joined: 15 Sep 2005
Posts: 4
alxdef
Hi there!
I've made a problem for myself. It is necessary to include source inside of macroinstruction like this:

macro my_macro [args]
{
include 'some_src.inc' ; function 'my_func' implemented here
call my_func
}

but I need to include 'some_src.inc' at the end of main .ASM module. Is it possible?

Thanks a lot!
Post 15 Sep 2005, 08:48
View user's profile Send private message ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17287
Location: In your JS exploiting you and your system
revolution
You can use include anywhere in the sources that you need. If you put the include inside a macro (like above) then each time you instantiate the macro you also include the file. Try removing the include from the macro and put it at the end of main.asm.
Post 15 Sep 2005, 09:17
View user's profile Send private message Visit poster's website Reply with quote
alxdef



Joined: 15 Sep 2005
Posts: 4
alxdef
Yes, but result of using of this macro:

; some code

my_macro some_args

; some code

is including 'some_src.inc' right this place where macro occured, but I need to insert 'some_src.inc' at the end of whole code or after predefined label.
Post 15 Sep 2005, 09:38
View user's profile Send private message ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17287
Location: In your JS exploiting you and your system
revolution
Code:
macro my_macro [args] 
{ 
call my_func 
}

; some code 

my_macro some_args 

; some code 


include 'some_src.inc' ; function 'my_func' implemented here 

    
Post 16 Sep 2005, 00:54
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.