How to Install FASM in Windows

This How-To applies to both 32-bit and 64-bit Windows Operating System.

  1. Download fasm for Windows

    image

    What you’ll get is the file fasmw17122.zip, as indicated by the description in the website, this file contains the following:

    image

    FASM.PDF is the complete manual, a very valuable resource for FASM Assembly Language programmers. Also included is the Flat Assembler Editor for where you can create and edit your assembly language programs.
     

  2. Extract fasmw17122.zip file in your hard drive. I extracted mine in drive C:\fasm you should be able to see something like below: 

    SNAGHTML4890332
     

  3. Include c:\fasm in your path so you can use it anywhere in your  Command Line Interface (CLI) prompt; or as usually called, DOS prompt.

    From the desktop, Right click on “Computer” then select “Properties”

    image

    Click on “Advanced system settings”

    image

    Select the “Advanced” tab and click on the “Environment Variables…” button

    SNAGHTML4bf5de0

    Under the “User variables for …” find and select the “PATH” environment variable then click the “Edit…” button

    SNAGHTML4c27e9a

    In the “Edit User Variable” dialog, and the path to fasm at the end as shown below (make sure you put it after the “;” semi-colon).

    SNAGHTML4c44487

    Then click the “Ok” button. Make sure you click “Ok” also from the previous dialog boxes. If everything works fine, you should be able to run fasm anywhere from the command line.

    SNAGHTML4c9179e
     

  4. Lastly, to be able to program in Windows using fasm, you must also add its include files in the environment variables called “include” because fasm doesn’t know where its include files are located. To do this, repeat the same steps above when you add the path to fasm, but this time you’ll edit the “include” variable in user environment. If there’s no such variable yet, just create it and it’ll work just the same.

    image

    This time, I put the C:\fasm\INCLUDE first in the line, but you can also add it at the end as long as it would not conflict with other includes. Make sure that paths are separated by semi-colon because that’s the delimiter, otherwise Windows will get confused. Then click the “Ok” button in all these dialog boxes for the changes to take effect.
     

     

  5. To test, open your command prompt and go to where the example “HELLO.ASM” is located.  In my case, it’s in C:\fasm\EXAMPLES\HELLO. Compile it by typing

    fasm HELLO.ASM

    If everything is ok, you should see “HELLO.EXE”

    SNAGHTML4da5c2c

    Typing “hello” at the prompt should execute the program and produce the following output:

    SNAGHTML4dba9cf

  6.  

 

That’s it! I hope this helps. Cheers! 😀

Comments on this post

  1. Just want to say your article is as surprising. The clearness in your post
    is just great and i could assume you’re an expert on this subject.
    Fine with your permission allow me to grab your RSS feed to
    keep updated with forthcoming post. Thanks a million and please carry on the rewarding work.

  2. I do not even know the way I finished up right here, but I thought
    this post used to be great. I do not realize who you might be however certainly you’re going to
    a famous blogger if you aren’t already. Cheers!

  3. A big thank you for your blog article.Thanks Again. Want more.

  4. Hi there! I’m at work browsing your blog from my new iphone!

    Just wanted to say I love reading through your blog and look forward to all your posts!
    Carry on the fantastic work!

  5. I’m not that much of a internet reader to be honest but your
    sites really nice, keep it up! I’ll go ahead
    and bookmark your site to come back later on. Many thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

Trackbacks and Pinbacks on this post

No trackbacks.

TrackBack URL