flat assembler
Message board for the users of flat assembler.

Index > Windows > configuring include path for command line fasm

Author
Thread Post new topic Reply to topic
ac5



Joined: 25 Sep 2006
Posts: 3
ac5
Hi, I just discovered fasm and I'm impressed.

I was not able to find the way to specify the location of include files for FASM.EXE. I'm sorry if it's faq or obvious. For FASMW it's documented, but I need to set the path of include folders for command line, fasm.exe

Thank you in advance
Post 25 Sep 2006, 16:45
View user's profile Send private message Reply with quote
HyperVista



Joined: 18 Apr 2005
Posts: 691
Location: Virginia, USA
HyperVista
hello ac5. while i normally use FASMW, i believe you can use the include directive in your source, specifying the fully qualified path to the include files in your quoted include statement.

i.e. include 'your_drive_letter:/.../fasm/macros.inc'
Post 25 Sep 2006, 17:10
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7796
Location: Kraków, Poland
Tomasz Grysztar
In the same place where you found it documented for FASMW, it is said that this is the environment variable that you need to set - and method to do it depends on what OS are you using.

Actually it is assumed that if you're able to use the command line, you should also know what an environment variable is and how to set it up. Hmm, was it an unfounded assumpion from my side?
Post 25 Sep 2006, 17:29
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Quote:

Hmm, was it an unfounded assumpion from my side?


I used DOS for years without knowing what is an environment variable. I think it's no so strange that someone knows how to use command line but don't know how to setup an environment variable.

Is not possible to add some default setting inside FASM? includes directory is typically located at "includes" subdirectory found in the same place where FASM is, I think FASM should try to use it when does not found any environment variable (if this is possible).
Post 25 Sep 2006, 17:45
View user's profile Send private message Reply with quote
HyperVista



Joined: 18 Apr 2005
Posts: 691
Location: Virginia, USA
HyperVista
oh ... sorry, ac5. i misunderstood your question. if you're using windows, which i assume you are because you posted your question in the windows topic, you can change your environment variable as follows:

Quote:
1. open "performance and maintenance" then "system" in the control panel
2. on the "advanced" tab, click "Environment Variables"
3. since you're adding a new variable (FASM in this case), click "New" and add the path to where you installed the FASM include files


sorry i misunderstood your original question.

hope this helps.


Last edited by HyperVista on 25 Sep 2006, 18:06; edited 1 time in total
Post 25 Sep 2006, 17:53
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7796
Location: Kraków, Poland
Tomasz Grysztar
Note that this is a way to do it for the NT line of Windows (NT/2000/XP/2003), but not for the 9x line.
Post 25 Sep 2006, 17:58
View user's profile Send private message Visit poster's website Reply with quote
HyperVista



Joined: 18 Apr 2005
Posts: 691
Location: Virginia, USA
HyperVista
ah, yes ... legacy Win 9x line:

For Windows 95 you will have to manually edit the Autoexec.bat file:
Quote:
set include= (add your fasm path here to already existing include statement)

For Windows 98/ME you can use the same manual method described above or use the "Start" "Run" command to run "msconfig" then click on the autoexec.bat tab to add your path.
Post 25 Sep 2006, 18:18
View user's profile Send private message Visit poster's website Reply with quote
ac5



Joined: 25 Sep 2006
Posts: 3
ac5
Hello Tomasz and everybody.

You are right, it is written in the PDF. But I must admit that I haven't tried to read each word. I saw the title "System requirements", skipped the text completely (the first idea when you read this title is that there is written how many memory the computer has to have and how much disk space, and never "here's how the include folder is specified"), saw the .ini sample, thought "ok, that's for fasmW", then tried to find something under "1.1.3 Executing compiler from command line" and failed. If you search for fasm.exe in the text, you'll find it in "Compiler overview" and in mentioned 1.1.3.

But Tomasz, I must use the possibility to thank you for a beautiful program. The concept where the assembler can fully control the image and even produce resources is simply brilliant. Likewise that assembler manages to do the linking, at least as much as it needs. And that it's multitarget assembler. Congratulations on the really brilliant work!

P.S. Yes I know how to edit env. variables, but even if I saw the INCLUDE in the text I wouldn't recognize it when I wouldn't read really slow, since I wouldn't expect that you'd use the same variable which is used by m$ compilers.
Post 25 Sep 2006, 18:57
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7796
Location: Kraków, Poland
Tomasz Grysztar
ac5 wrote:
I wouldn't expect that you'd use the same variable which is used by m$ compilers.

This is much more widely used standard. I actually got used to it with the Borland compilers. Also, because it allows to specify multiple paths separated with semicolons, you can even use it for many compilers simultaneously (yeah, that's only theory, I know Wink).
Post 25 Sep 2006, 19:11
View user's profile Send private message Visit poster's website Reply with quote
ac5



Joined: 25 Sep 2006
Posts: 3
ac5
> because it allows to specify multiple paths separated with semicolons, you can even use it for many compilers simultaneously.

At least with compilers, it's not so simple. Even with two different versions of ms compilers, there is going to be a conflict -- both will use the first .h file that matches the name, but only one will be able to compile it (there are even incompatible library dlls behind these headers). So at least when working with compilers, it's quite a pain having the common "include".

Tomasz, one more question, if I may: do I understand it correctly, that your assembler doesn't produce any listing files (the bytes generated etc?) How do you do debugging?
Post 25 Sep 2006, 19:25
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7796
Location: Kraków, Poland
Tomasz Grysztar
ac5 wrote:
At least with compilers, it's not so simple. Even with two different versions of ms compilers, there is going to be a conflict -- both will use the first .h file that matches the name, but only one will be able to compile it (there are even incompatible library dlls behind these headers). So at least when working with compilers, it's quite a pain having the common "include".

But if there no conflicts between names of files you're going to include (like different extensions for different languages), it might work.

ac5 wrote:
Tomasz, one more question, if I may: do I understand it correctly, that your assembler doesn't produce any listing files (the bytes generated etc?) How do you do debugging?

Well... with debugger. Wink

PS. Look also at the sticky thread in the "Compiler internals" forum. I don't use that feature myself, though - and thus it's not so well supported. Wink
Post 25 Sep 2006, 19:27
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 GitHub, YouTube, Twitter.

Website powered by rwasa.