Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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?

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.

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).

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

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.

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!

![]() |
Ms dos
|
Need Help With Batch File...
|

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