flat assembler
Message board for the users of flat assembler.

Index > Windows > FASM Arguments help

Author
Thread Post new topic Reply to topic
NanoBytes



Joined: 02 Jun 2011
Posts: 57
Location: Iowa, United States
NanoBytes
Ok, my project comes with fasm. Now all of the inculsion file are in the same directory as fasm. My problem it that when I give fasm a file to assemble i need to include several files, but FASM automaticly assumes the location of my file, not its own location, the one with the files.
Code:
Command line example
bin\FASM code\ASM.asm
    

so lets say ASM.asm include win32ax.inc. The inclusion file i am looking for is located in bin\INCLUDE, but FASM will look for the file in code\. This happens because the file I sent is in that directory. Now I cant use a solid addres for my inclusions because the user could move my program anywhere they like. Any suggestions.

_________________
He is no fool who gives what he cannot
keep to gain what he cannot loose.
Post 16 Oct 2011, 03:02
View user's profile Send private message Send e-mail Visit poster's website Reply with quote
FrozenKnight



Joined: 24 Jun 2005
Posts: 128
FrozenKnight
In your fASM directory there is a file FASMW.INI in it you need to place the following lines
Code:
[Environment]
Include=C:\fASM\INCLUDE
fasminc=C:\fASM\INCLUDE    

Note i have fasminc there for older fasm programs, it's kind of depreciated now. you can use all the default includes with the following syntax.
Code:
include 'win32a.inc'     

Note this is covered in the FASM.PDF that is in the root dir with FASM, and in the documentation section on the main site.
Post 16 Oct 2011, 05:26
View user's profile Send private message Reply with quote
NanoBytes



Joined: 02 Jun 2011
Posts: 57
Location: Iowa, United States
NanoBytes
See, except that only works with FASMW.exe, the GUI. I am running my programs from the command line, any help?
Post 16 Oct 2011, 19:59
View user's profile Send private message Send e-mail Visit poster's website Reply with quote
addes3



Joined: 09 May 2011
Posts: 29
addes3
Set the environment variable INCLUDE to fasm's include directory.
Post 16 Oct 2011, 23:17
View user's profile Send private message Reply with quote
NanoBytes



Joined: 02 Jun 2011
Posts: 57
Location: Iowa, United States
NanoBytes
That would work except that when the person downloads my program(it comes with fasm) they could download it anywhere, and then move it as many times as they want. I figured a way around it, thanks anyway though
Post 17 Oct 2011, 00:43
View user's profile Send private message Send e-mail Visit poster's website Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1408
Location: Toronto, Canada
AsmGuru62
I had same issue with running FASM as an internal compiler in FASM Writer. I ran it in a separate thread which calls CreateProcess and invokes FASM.EXE that way. So, CreateProcess has a parameter called lpEnvironment. All I had to do is supply the INCLUDE value inside that parameter and FASM was assembling fine.
Post 17 Oct 2011, 14:43
View user's profile Send private message Send e-mail Reply with quote
Enko



Joined: 03 Apr 2007
Posts: 678
Location: Mar del Plata
Enko
I saw some codes using a local enviroment variable 'fasminc'
This way, to access the includes: '%fasminc%/api/win32a.inc'
Post 17 Oct 2011, 19:50
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.

Powered by rwasa.