Computing.Net > Forums > Programming > FASM compiling help

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

FASM compiling help

Reply to Message Icon

Name: Lucifer2012
Date: May 26, 2009 at 19:58:14 Pacific
OS: Microsoft Windows XP Professional
CPU/Ram: 860 MHz / 119 MB
Product: Via technologies, inc. / Vt8601
Subcategory: General
Comment:

I just got FASM, because I decided to pick up assembly recently. One problem: whenever I click "run" or compile, the only thing that happens is a new .bin file is made in the directory of the .asm file, and there's nothing I can do with a bin file. I want to be able to convert .asm to .exe or at least run the assembly program as it is.. compile and run are supposed to do that, right?



Sponsored Link
Ads by Google

Response Number 1
Name: IVO
Date: May 27, 2009 at 03:12:02 Pacific
Reply:

I do not know the FASM assembly, but I suppose you need to trig the linkage editor after compiling. To create an executable from source requires two steps

- assembly/compile that generates a binary .bin file;

- linking that puts toghether the .bins previously generated and outputs the executable .exe

Sometime the linkage editor step is hidden in the IDE, but it is required anyway.


0

Response Number 2
Name: Lucifer2012
Date: May 28, 2009 at 14:27:42 Pacific
Reply:

...Still confused. Linkage editor?


0

Response Number 3
Name: IVO
Date: May 29, 2009 at 05:33:07 Pacific
Reply:

YES, Linkage Editor is the program that collects the .bin binary files produced by the assembly or compile phase and generates the final executable .exe module.

That is often forgotten, but a compiler or assembler just translates symbolic text to a raw binary module stil not executable as there are unresolved addresses to work out inside the code. The Linkage Editor does the job converting .bin into .exe.

In the FASM package you downloaded there is, I'm sure, an associated Linkage Editor to perform the described step. And there is a related command in the IDE as Compile translates (.asm into .bin), Run executes (a .exe) and ??? performs linkedit (i.e. from .bin to .exe).


0

Response Number 4
Name: Lucifer2012
Date: May 30, 2009 at 11:38:56 Pacific
Reply:

Hmm ok ill look into it. My friend said at the main page for fasm he saw another program for download, i believe that is the 'link editor' i missed as i was in a rush


0

Response Number 5
Name: IVO
Date: May 31, 2009 at 13:22:06 Pacific
Reply:

You have to code at the beginning of your asm text the following output directives

format PE GUI 4.0
entry start

where start is the entry point label of the program (start:)..

That generates a Windows executable, but this is just a hint as the full theory of compiled modules is quite complex for a novice. My post about Linkage Editor still right, but FASM can directly generate a simple executable.

Take a look at Examples as a starting point to go on along an impervious lane.


0

Related Posts

See More



Response Number 6
Name: Lucifer2012
Date: May 31, 2009 at 16:33:33 Pacific
Reply:

THANK YOU SO MUCH! I read about directives in the manual and thought that they might be needed, but I didn't know how to insert the code properly!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Ms dos Need Help With Batch File...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: FASM compiling help

Compiler help www.computing.net/answers/programming/compiler-help/3540.html

C++ help www.computing.net/answers/programming/c-help/3099.html

Borland C++ Compiler Help www.computing.net/answers/programming/borland-c-compiler-help/3387.html