flat assembler
Message board for the users of flat assembler.

Index > Main > refer to labels from a different source file. possible?

Author
Thread Post new topic Reply to topic
zhak



Joined: 12 Apr 2005
Posts: 501
Location: Belarus
zhak 13 Nov 2009, 00:05
Hello guys!
I've got one question that interests me much.
e.g. i have two source files. file1.asm and file2.asm. both files are plain binaries and are loaded to memory close to each other. but they are loaded separately. there's a label in file1.asm. let it be print: (it's just a label, no macros to define procedures or smth. is used). code in file2.asm has to refer to this label from file1.asm.

is it possible to do such a thing (refer to a label from another source file).

thanks in advance for your assistance
Post 13 Nov 2009, 00:05
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20430
Location: In your JS exploiting you and your system
revolution 13 Nov 2009, 00:15
Code:
;this is file2.asm
virtual at wherever_file1_is_loaded
  include 'file1.asm'
end virtual

mov eax,[print]    
Post 13 Nov 2009, 00:15
View user's profile Send private message Visit poster's website Reply with quote
zhak



Joined: 12 Apr 2005
Posts: 501
Location: Belarus
zhak 13 Nov 2009, 00:30
awesome! this works!!! thanks a lot, revolution Smile
Post 13 Nov 2009, 00:30
View user's profile Send private message 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.