flat assembler
Message board for the users of flat assembler.

Index > Main > BatchFile

Author
Thread Post new topic Reply to topic
ic2



Joined: 19 Jan 2008
Posts: 75
ic2
How would I write this so that FASM can assemble the file. FASM is on the C :\ and my file is in a folder outside of FASM folder on the same drive. I gave it the full path name and it still didn't work. I did a search but founded nothing about how to do it. Neither batchfile work.

Thanks in advance

build.bat
-------------

Code:
set fasminc=\fasmw\include
\fasmw\fasm DisplayIcon.asm DisplayIcon.exe    


Code:
set c:\fasm\include\win32a.inc
c:\fasm\fasmw\fasm DisplayIcon.asm DisplayIcon.exe    
Post 08 Apr 2008, 00:25
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17658
Location: In your JS exploiting you and your system
revolution
fasm uses "include", the "fasminc" is no longer used.
Post 08 Apr 2008, 00:36
View user's profile Send private message Visit poster's website Reply with quote
MichaelH



Joined: 03 May 2005
Posts: 402
MichaelH
Check my reply in this thread -

the examples are broke
Post 08 Apr 2008, 01:38
View user's profile Send private message Reply with quote
ic2



Joined: 19 Jan 2008
Posts: 75
ic2
IDEA: My computer is set up where I can comply any masm ready ASM file for with masm32 from any other drive. So my masm32 environment is compete and it was all done with masm32 inifile. No need to tamper with the Systems Environment Variables.

Since exploring the site I see that some things may never be included in FASM by choice. Tomasz Grysztar has his reasons and I'm not into rebuilding a assembler . I rather leave it along so I can do things the standard way when needed. For one of my single named project I rather to build a simple work around to do what I need.

For starters I want to use Ewaynes's AsmEdit as my editor for FASM and want to do it as simple as possible. I'm not trying to build a IDE. I'll just add a few buttons needed by me for additional convenience such as executing a FASM batchfile for assembling the opened project.

This way I can still use it for all of my masm32 projects with-out changing stuff in the Windows Registry or the Systems Environment Variables.. All I need to know is how to write a batchfile or whatever it takes to make FASM execute. The rest is easy.


MichaelH, Wow!!! All kind of harsh words there it seems. I covered my ears just in case. Anyway, I have not figure things out yet.

In cmd.asm you'll find two lines

include 'win32a.inc'
include 'cmd.inc'

I can't find cmd.asm or cmd.inc ... and if I did where would I include them and how? I'm not even sure if any parts of this is written correclty or if using the keyword (Set) works

set c:\fasm\include\win32a.inc
c:\fasm\fasmw\fasm DisplayIcon.asm DisplayIcon.exe


revolution, I did use include even with the FullPathName and it did not work.


Last edited by ic2 on 08 Apr 2008, 18:05; edited 1 time in total
Post 08 Apr 2008, 18:00
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17658
Location: In your JS exploiting you and your system
revolution
ic2 wrote:
set c:\fasm\include\win32a.inc
c:\fasm\fasmw\fasm DisplayIcon.asm DisplayIcon.exe

revolution, I did use include even with the FullPathName and it did not work.
The first line up there will do nothing.

You need something like this:
Code:
set include=\fasmw\include
\fasmw\fasm DisplayIcon.asm DisplayIcon.exe    
Post 08 Apr 2008, 18:05
View user's profile Send private message Visit poster's website Reply with quote
ic2



Joined: 19 Jan 2008
Posts: 75
ic2
Thanks revolution. Going to try it now.
Post 08 Apr 2008, 18:07
View user's profile Send private message Reply with quote
ic2



Joined: 19 Jan 2008
Posts: 75
ic2
It didn't work. Is there some documents about FASM batchfiles somewhere?

@echo off

set include=c:\fasm\fasmw\include
c:\fasm\fasmw\fasm DisplayIcon.asm DisplayIcon.exe

What is the bold word above icluding for... do it mean the next line...[/b]

In the 2nd line I take it that is FASM to execute fasm editor which hold the command line to my file.

... is that the way it is suppose to execute \fasmw\
Post 08 Apr 2008, 18:50
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17658
Location: In your JS exploiting you and your system
revolution
Everyone seems to have their own way of arranging the directories on their HDD, so a batch file from one person my not work for you.

FWIW, here is the line from my include:

include=...;q:\assemble\fasm\include;...

But I doubt it will work for you unless you have a Q: drive and you put fasm under a subdirectory named assemble.

I use a "path" line to find the executable but the effective place is q:\assemble\fasm\fasm.exe (this is the 32bit console assembler which I use)
Post 08 Apr 2008, 19:05
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3035
Location: vpcmipstrm
bitRAKE
afaik, the fasm editor does not assemble from the command line, but it will open the file. Smile (Use FASM.EXE instead of FASMW.EXE if trying to compile from the command line.)

_________________
¯\(°_o)/¯ unlicense.org
Post 08 Apr 2008, 20:07
View user's profile Send private message Visit poster's website Reply with quote
MichaelH



Joined: 03 May 2005
Posts: 402
MichaelH
ic2 wrote:

I can't find cmd.asm or cmd.inc


'cmd.inc' was an include file specific to that thread, it was just an example, it could have been any include file.


ic2, please read the link I posted again. You should be able to set environment variables so that you can type -

cd someAsmFileDirectory
fasm.exe someAsmFile.asm someAsmFile.exe

Just for clarity, someAsmFileDirectory and someAsmFile.asm are just example names Wink
Post 08 Apr 2008, 23:04
View user's profile Send private message Reply with quote
ic2



Joined: 19 Jan 2008
Posts: 75
ic2
FASM is Fantastic
It work!!!

Code:
@echo off
set include=c:\fasm\FASM\include 
c:\fasm\FASM DisplayIcon.asm DisplayIcon.exe    

Now I'm getting ready to back-up my system and try to do it at system level with Environment Variables just in case I screw up. I think I can see why that works. I always been afraid to try became I had no clue of how to do it and I thought it would take over the machines asm files (one IDE only). Anyway, I'm about to find out.

Thanks you ALL

The sample batch was created by Vortex, helping me to to solve a previous problem in my attempt to try some FASM coding. The batch didn't work for me, but the code did. But I keep it around. Fasmw default no tool bar. Most others makes me lazy. Some takes up too much screen space. I think Qeditor and Ewaynes's AsmEdit are the perfect editors to use when coding for MASM and FASM. To me they are both are so down-to-earth.
...
Post 09 Apr 2008, 05:14
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 GitHub, YouTube, Twitter.

Website powered by rwasa.