flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > INCLUDE like in MASM

Author
Thread Post new topic Reply to topic
alorent



Joined: 05 Dec 2005
Posts: 201
alorent
Hello,

I have been reading through the documentation and preprocessor tutorials, but not luck on my "weird" issue.

I have a strange configuration where I'm migrating from MASM to FASM, so, my application is composed by several MASM files (OBJs) and new FASM files and I compile all together and it works fine.

My problem is that I have to share some "include" files (with just EQU definitions) between my MASM and FASM files but those include files have inside other include files with more EQUs definition.

The problem is that MASM uses the syntax:

include MyFileInc.inc

and FASM

include 'MyFileInc.inc"


My question is if there is any macro that allows FASM to accept:

include MyFileInc.inc ; without the ' '

So, it will accept other include files from MASM which have inside more "include" lines.

I'd love to have all files in FASM, hence this problem disappear, but that's not possible for me due to size of project.

Thanks.
Post 07 Jan 2006, 09:57
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7734
Location: Kraków, Poland
Tomasz Grysztar
As long as the path doesn't contain slashes, backslashes, nor spaces, you could use such macro:
Code:
macro incmasm [file]
 { include `file }
INCLUDE fix incmasm

; example:
INCLUDE win32a.inc    

(note the case-sensitivity).

But, since MASM includes use EQU, it may cause some problems, because in fasm there are some important differences between EQU and =, and they make = more appropriate for numerical equates.
Post 07 Jan 2006, 10:16
View user's profile Send private message Visit poster's website Reply with quote
alorent



Joined: 05 Dec 2005
Posts: 201
alorent
Thank you very much! Very Happy
Post 07 Jan 2006, 10:45
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-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.