flat assembler
Message board for the users of flat assembler.

Index > Linux > how to compile FASM in linux

Author
Thread Post new topic Reply to topic
psihokiller4



Joined: 26 Sep 2010
Posts: 2
psihokiller4 26 Sep 2010, 19:01
ok NASM is compiled like this:

nasm -f elf file.asm
ld file.o -o file
and run it with ./file

and how to compile FASM?
I saw How to make Linux executable?
or 'm I just too dump not to understand

are there any FASM assembly GOOD tutorials written for linux


please I need help been looking whole day and I gave up posting in forum for help
Post 26 Sep 2010, 19:01
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler 26 Sep 2010, 19:51
Fasm is invoked with "fasm [filename]", w/o the braces of course. Depending on the format you use, you may or may not have to link the produced file before it is executable. See 2.4.4 Executable and Linkable Format for info on the different elf formats available.

EDIT: For more info on invoking Fasm from the command line, see 1.1.2 Executing compiler from command line
Post 26 Sep 2010, 19:51
View user's profile Send private message Reply with quote
ManOfSteel



Joined: 02 Feb 2005
Posts: 1154
ManOfSteel 26 Sep 2010, 20:49
You can create ELF files directly using fasm, but the "convention" is to only assemble with fasm and then link the resulting object file against the local libraries, just like you are doing with nasm. I personally use gcc.
Code:
fasm file.asm
gcc file.o -o file
    


By the way, makefiles are very useful.
Post 26 Sep 2010, 20:49
View user's profile Send private message Reply with quote
psihokiller4



Joined: 26 Sep 2010
Posts: 2
psihokiller4 27 Sep 2010, 20:07
thanks
Post 27 Sep 2010, 20:07
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.