FASM Installation notes

There are a few things to remember when using FASM with RadASM. First because you want to take advantage of the resource editors in RadASM you will probably want to use COFF file format as your format. This will create a .obj file that can be used when linking to the resources created by RadASM. It is highly recommended that you use the FASM&ALink package when installing FASM. For more information about this combination see the following thread. It contains the FASM assembler and the includes necessary to begin Win32 programming. The rest of this page will assume the following configuration :

Assembler : fasm.exe - console version (1.46 was used for this example)
Linker : GoLink.exe - this freeware linker can be downloaded from
Res compiler : GoRC.exe - This freeware res compiler can be downloaded from

Unzip the FASM&ALink file to C:\FASM, and create a folder called BIN in the \FASM folder. Copy ALink.exe to the BIN folder if you are planning on using ALink to link your programs. Unzip GoRC and GoLink to the BIN folder as well. Create a folder called HELP to put your Win32.HLP reference and any other help references you might need.

To use GoLink you must create the following simple txt file in the BIN folder. The file should be named GFL.txt (Golink File List). This file contains a list of Windows DLLs that GoLink will scan when looking for a particular imported function. GoLink starts at the top of the file and scans down, quitting when it finds the file it needs, so put the most common DLLs at the top. It should have at least these files:

Kernel32.dll
User32.dll
shell32.dll
Gdi32.dll
comdlg32.dll
comctl32.dll

You can continue to add to this list as needed and don't worry about having too many files in it, the linker only takes what it needs, but be sure to put the DLLs that are most common near the top, this will make the link faster. Remember the order of the files is directly related to link time, e.g. putting Kernel32 last in a long list is a bad idea, you will always use that dll (GetModuleHandle)

Make the following changes :

FASM.INI

[Project]
Type=Win32 App,Win9x Unicode,Win32 App (no res),DLL
Files=Asm,Inc,Txt,RC
Folders=Bak,Mod
MenuMake=Compile RC,Assemble,Link,Build,Go,Run,Go All

[Win32 App]
Files=1,1,0,1,0
Folders=1,0,1
MenuMake=1,1,1,1,1,1,1,0
;x=FileToDelete/CheckExistsOnExit,
;(O)utput/(C)onsole/0,Command,
;MakeFile1[,MakeFile2[,MakeFile3...]]
1=4,O,$B\GORC /r,1
2=3,O,$A\FASM,2,3
3=5,O,$B\GoLink @$B\GFL.txt /entry start /files ,3,4
4=0,0,,5
5=
6=
11=4,O,$B\GORC /r,1
12=3,O,$A\FASM,2,3
13=5,O,$B\GoLink @$B\GFL.txt /debug coff /entry start /files,3,4
14=0,0,,5
15=
16=

Add the following sections:

[Win9x Unicode]
Files=1,1,0,1,0
Folders=1,0,1
MenuMake=1,1,1,1,1,1,1,0
;x=FileToDelete/CheckExistsOnExit,
;(O)utput/(C)onsole/0,Command,
;MakeFile1[,MakeFile2[,MakeFile3...]]
1=4,O,$B\GORC /r,1
2=3,O,$A\FASM,2,3
3=5,O,$B\GoLink @$B\GFL.txt /mslu /entry start /files,3,4
4=0,0,,5
5=
6=
11=4,O,$B\GORC /r,1
12=3,O,$A\FASM,2,3
13=5,O,$B\GoLink @$B\GFL.txt /mslu /debug coff /entry start /files,3,4
14=0,0,,5
15=
16=

[Win32 App (no res)]
Files=1,1,0,0,0
Folders=1,0,1
MenuMake=1,1,1,1,1,1,1,0
;x=FileToDelete/CheckExistsOnExit,
;(O)utput/(C)onsole/0,Command,
;MakeFile1[,MakeFile2[,MakeFile3...]]
1=4,O,$B\GORC /r,1
2=3,O,$A\FASM,2,3
3=5,O,$B\GoLink @$B\GFL.txt /entry start /files,3
4=0,0,,5
5=
6=
11=4,O,$B\GORC /r,1
12=3,O,$A\FASM,2,3
13=5,O,$B\GoLink @$B\GFL.txt /debug coff /entry start /files ,3
14=0,0,,5
15=
16=

[DLL]
Files=1,1,1,0,1,0
Folders=1,0,0
MenuMake=0,1,1,1,0,0,0,0
;x=FileToDelete/CheckExistsOnExit,
;(O)utput/(C)onsole/0,Command,
;MakeFile1[,MakeFile2[,MakeFile3...]]
1=4,O,$B\GORC /r /f,1
2=3,O,$A\FASM,2,3
3=7,O,$B\GoLink @$B\GFL.txt  @$6 /dll /entry DllEntryPoint /files ,3
4=0,0,,5
5=
6=
11=4,O,$B\GORC /r /f,1
12=3,O,$A\FASM,2,3
13=7,O,$B\GoLink @$B\GFL.txt @$6 /dll /debug coff /entry DllEntryPoint /files,3
14=0,0,,5
15=
16=

note 1: start (or DllEntryPoint) is the entry point of your program, this can be changed to reflect the actual entry point name.

note 2: The /files option is used to obtain a more verbose output from the linker, it can be omitted. I have included it in order that you can see which DLLs the linker is using and adjust your GFL.txt file to better suit your needs if link time becomes too long.

note 3: The def file for GoLink (separate command file) was added in version 0.21a.If you are using a version under that you must remove the @$6 from the DLL link command and manually enter your exports.

note 4: The Win9x Unicode option when you create a file will include the Microsoft Layer For Unicode in your executable, this DLL is available from Microsoft and should be placed in the BIN folder. It will enable Unicode support on 9x systems. The destination system must have the DLL in the applications folder or Windows will issue an error and your application will terminate. This is necessary for any applications that make calls to Unicode functions on a 9x system.

Set the paths as follows, bold indicates a change from default

[Paths]
$A=C:\Fasm
$B=$A\BIN
$D=$R
$H=$A\Help
$I=$A\Include
$L=$A\LIB
$P=$R\Fasm\Projects
$S=$R\Fasm\Sniplets
$T=$R\Fasm\Templates
$M=$R\Fasm\Macro

If you are using the Fasm&ALink package the invoke macro is available for StdCalls. To have the API list drop down make the following change. Since the masmApiCall.api is the most complete you are best to redirect your lookups to that file.

[Api]
Trig=invoke
Call=Masm\masmApiCall.api
Const=Masm\masmApiConst.api
Word=Fasm\fasmApiWord.api
Message=Fasm\fasmMessage.api

Be sure to add include '%include%/win32ax.inc' to your project in order to have access to the Invoke macro

In the FASM&ALink file there is a linker named ALink, this is not used in this example installation as the libraries for that linker were not complete at the writing of this help file. IMHO it will make a better (read faster) linker when the libraries are properly developed. For now I recommend GoLink as it does not need any library files to work with, giving you access to the complete named API. If you decide to use ALink substitute the following in [Win32 App], for [Win32 App (no res)] remove the ,4

3=5,O,$B\alink -oPE,3,4,$L\win32.lib,-entry,start
13=5,O,$B\alink -oPE,3,4,$L\win32.lib,-entry,start