The Go tools for Windows + Assembler |
||||||||||||||||||
|
The "Go" Tools
|
|
![]() |
If you are interested in 32-bit or 64-bit programming for Windows,
you will find everything you need here including an
Assembler,
a Resource Compiler,
Linker,
Symbolic Debugger,
and links to Integrated Development Environments (IDEs),
a Help Compiler,
Information about Windows
and Header Files (include files).
There are also
"Go" tutorials and sample code,
Third party tutorials and sample code,
a Demonstration program, and
other Links.
Also see the enhanced Unicode support in the "Go" tools
and 64-bit programming.
Windows+assembler is becoming more and more popular. Here you can use
a low level language (assembler) together with a very high level language
(the Windows API) - a perfect combination!
A
ssembler -
A free assembler (GoAsm.exe), which produces COFF object files
ready to be given to a linker to create the final executable. My aim here
has been to make an assembler with clean and obvious syntax, which is very
quick, and which always tries to produce the smallest code. GoAsm also
has some useful extensions to make programming for Windows easier. It
has enhanced support for making Unicode programs and can produce programs
for both Win32 and Win64(x64) platforms (see 64-bit programming).
View the GoAsm manual
Download GoAsm version 0.62.0.0 (with documentation 378K)
Filename: Goasm.zip SHA-256: d4f0f6e55f4435771bac9daf682ad56035f7e7aaaeba409d6ab40f71e6760926
Filename: GoAsm.exe SHA-256: 7e2073eff80448d0dec79ee23400421b2523193efcc0ad6387b9b29dc09c9156
Resource Compiler -
A free resource compiler (GoRC.exe), which produces RES files
from RC files, or OBJ files from RC or RES files, together with documentation.
View the GoRC manual
Download GoRC version 1.0.3.0 (with documentation 67K)
(this is a 32/64-bit version: see 64-bit programming)
Filename: Gorc.zip SHA-256: 908fe5fa898492e7ed5e5d814f4f43ff2a7f5d016d1d05ffe3e3bef23cfe6acf
Filename: GoRC.exe SHA-256: 96aef2e39322588f56f20fd720334055c7fe010ee358dd57e66b529078462fae
Linker -
A free linker (GoLink.exe), which takes COFF object files and a Res file and creates EXE or DLL executables able to run under Windows Win32 or Win64(x64) see 64-bit programming. This is a full featured but "reduced baggage" linker which keeps files to a minimum. You do not need Lib files to identify what functions reside in the DLLs. Instead GoLink looks inside the DLLs themselves. Used with GoAsm, this linker can report on redundant data and code in your programs. It also allows use of Unicode filenames and labels (exports and imports).
View the GoLink manual
Download GoLink version 1.0.4.5 (with documentation 49K)
Filename: Golink.zip SHA-256: 8661ad1f0ddb83ab7569fd3e6af180d4945cbfb2e7dd52fc3b59024519144fe5
Filename: GoLink.exe SHA-256: 24388acced5cb4889ae4f1b447f5bbda5f100ab068f59b83f79a4ad9513806c1
Debugger -
"GoBug" - A free Win32 symbolic debugger for assembler programmers, together with "Testbug" its accompanying test
program and Win32+assembler demo program. It is itself written entirely in assembler, using my assembler GoAsm and my linker GoLink.
Go to the GoBug site for more details and for free download here.
IDEs - Integrated Development Environments -
Here are some IDEs which work with the "Go" tools. Please let me know if I have
missed any:-
Easy Code for GoAsm.
The excellent visual assembler IDE for Windows written by
Ramon Sala.
Download ECGo.zip - package for use with Easy Code
containing the latest versions of the "Go" tools - 491K.
Bill Aitken's tutorials for using GoAsm and the IDE
RadAsm IDE forum
Another excellent visual assembler IDE for Windows from
Ketil Olsen.
Help Workshop -
All you need (free from Microsoft) to create the new compiled html help files
http://msdn2.microsoft.com/en-us/library/ms670169.aspx
Windows 32/64 -
The whole SDK (Software Development Kit)
can be downloaded free from Microsoft.
It's massive so make sure you
have a cheap and fast internet connection! Use the link below to get
into the Microsoft MSDN site, then click "downloads" then "SDK downloads",
then you may have to search for "Platform SDK", and then click on "Release
Date" to sort the results so you can see the latest SDK.
This sequence changes slightly as Microsoft changes its download site.
The "Windows Server 2003 R2 Platform SDK" will contain everything you need
although there are now also the Vista SDK's and an SDK for the Windows Server
2008 pre-release if you want to be very up to date.
To a limited extent you can choose what to download and what not to download.
You will need at least the "documentation" which gives details of the Windows
APIs, but it is a good idea also to download the header files.
Good luck!
Go to the Microsoft MSDN site
Header files - contain the constant values, structures
and parameters you need to know about when you call a Windows API.
Many programmers "include" them directly in their source code, so that the
constant values and structures can be referred to by name. Typically these files
have ".h" or ".inc" extensions.
There are various source for such files.
![]() |
The recommended way is to use the header files prepared by the GoAsm Header Project from "Donkey's Stable", which are now available from here. | |
![]() |
You can use the header files from the Windows SDK, and then use Wayne J Radburn's xlatHinc utility to convert those header files into include files for direct use by GoAsm. | |
![]() |
You can use Bryant Keller's header files, including Windows constants, structures, procedures and some macros. They are available from here. |
|
|
![]() Wayne was the first to publish assembler and windows skeleton code and all his examples are now in GoAsm syntax but with a MASM flavour. Here you can get:
![]()
![]()
|
please contact me if you would like your work to be added to this list
DEMONSTRATION PROGRAM
LOOP and REP Aligning code and data Using branch hints FPU v CPU @ 64 bits Addressing data in code section Various ways of writing numbers Comparing the Win32 memory APIs Comparing Win32 text APIs |
Various tests and demos using DLLs Ways to put temporary notices on screen Clipping regions in windows How to use the memory APIs How to use different language resources How to draw non-Roman characters under W9x/ME How to draw Unicode characters Different types of WndProc to use Simulating a dialog using ordinary window |
How API errors are shown Recursion in WndProcs Passing arguments on the stack Using EBP as spare register Local data and stack frames When waiting return from a call Infinite loops to break out of Debugging multi-threaded applications Breaking on various exceptions Displaying output string Watching and logging messages |
Use of IDIV Use of IMUL Use of NEG and NOT Size of code using various mnemonics Using the bit control mnemonics Use of REP SCAS and variants Use of the BCD mnemonics JMPs and CALLs to unique labels Using the Floating Point Unit Using the MMX registers Using the 3DNow! instructions Using the XMM registers SSE and SSE2 instructions SIMD floating point control Use the debugger as a hex calculator |
There are plenty of samples of asm code for Win32 in the
links!
GoAsm, GoLink and GoRC are now capable of producing 64-bit programs which can be run on X64 (x86-64) processors (such as the AMD64 and those using EM64T) running under Windows x64. The same versions of these tools work for both 32-bit or 64-bit assembly.
All the 64-bit capable versions of these tools are beta versions as follows:-
GoAsm 32/64-bit assembler (version 0.62.0.0 with documentation 378K)
GoRC 32/64-bit resource compiler (version 1.0.3.0 67K)
GoLink 32/64-bit linker (version 1.0.4.5 with documentation 49K)
Despite the differences between the 64-bit processors and their 32-bit counterparts, and between the x64 (Win64) operating system and Win32, using GoAsm to write 64-bit Windows programs is just as easy as it was in Win32.
In fact, you can readily use the same source code to create executables for both platforms if you use GoAsm's enhanced instructions ARG and INVOKE and FRAME...ENDF, and conditional assembly for data sizes and structures. Then specify /x64 in the command line to make a 64-bit object file and /x86 to make a 32-bit one. GoLink automatically senses the type of object file to make the correct executable. See writing 64-bit programs for details.
AdaptAsm is part of the GoAsm package and helps towards converting your existing 32-bit code to 64-bit code, changing registers automatically and changing PUSH/CALL combinations to ARG/INVOKE as required. It uses Leland M George's clever javascript file ApiParamCount.js which can take a Microsoft header file and create a list of the APIs and their parameter counts. You can download this file separately here. See writing 64-bit programs for details of how to use AdaptAsm in this way.
Here is some sample code:-
Hello 64World 1 a simple 64-bit console program
Hello 64World 2 a simple 64-bit windows program
Hello 64World 3 switchable 32-bit or 64-bit windows program
All bug reports would be appreciated. The tools do not yet offer full support for 64-bit structured exception handling. This is in progress but I would welcome any ideas for an appropriate syntax to use.
GoBug may eventually be revised to enable it to debug 64-bit applications.
![]() |
UNICODE |
GoAsm |
Input file formats supported:-
ANSI, Unicode UTF-8 with BOM and UTF-16LE with BOM |
|
Output:- Output to the console will be in Unicode if permitted by the system; list file and any file to receive redirected output will be in the same format as the first input file. |
||
Unicode can be used in:- filenames in include files and raw data files; filenames in input and output files via the console (command line); defined words in the command line; defined words in source or include files (equates, structs and macros); comments; data labels (permitting access to data using Unicode); code labels (permitting calls to functions using Unicode names, imports and exports to other executables); strings (see below). |
||
Declaring strings in data:- |
||
DB "..." | - (default action) in an ANSI file, no conversion;
- in a Unicode file, put in data in UTF-16 format; |
|
and to override the default action:- | ||
STRINGS UNICODE | - strings always to be in UTF-16 format for the rest of the file | |
STRINGS ANSI | - strings always to be in ANSI format for the rest of the file | |
and irrespective of the STRINGS directive:- | ||
DUS "....",0Dh,0Ah,0 | - declare sequence in data in UTF-16 format (string and control characters) | |
DB L"..." | - declare string in data in UTF-16 format | |
DW L"..." | - declare string in data in UTF-16 format | |
DB 8"..." | - declare string in data in UTF-8 format | |
DB A"..." | - declare string in data in ANSI format | |
Pushing pointers to null terminated strings in data:- |
||
PUSH "....." | - (default action) in ANSI file no conversion;
- in a Unicode file, push pointer to null-terminated Unicode string in data in UTF-16 format |
|
and to override the default action:- | ||
STRINGS UNICODE | - push strings to be in UTF-16 format for the rest of the file | |
STRINGS ANSI | - push strings to be in ANSI format for the rest of the file | |
and irrespective of the STRINGS directive:- | ||
PUSH L"....." | - push pointer to null terminated string in UTF-16 format | |
PUSH 8"....." | - push pointer to null terminated string in UTF-8 format | |
PUSH A"....." | - push pointer to null terminated string in ANSI format | |
Quoted immediates:- |
||
MOV EAX,'a' | - (default action) in ANSI file no conversion
(put into EAX the character value of 'a' in the current codepage);
- in a Unicode file, put Unicode character value for "a" into EAX; |
|
and to override the default action:- | ||
STRINGS UNICODE | - use Unicode character values for the rest of the file | |
STRINGS ANSI | - use ANSI character values for the rest of the file | |
and irrespective of the STRINGS directive:- | ||
MOV EAX,L'a' | - use Unicode character value | |
MOV EAX,8'a' | - use UTF-8 character value | |
MOV EAX,A'a' | - use ANSI character value | |
Switching using conditional assembly:- |
||
Switching Unicode/ANSI APIs - various methods, aided by the double hash
Switching of the STRINGS directive Switching of Unicode or ANSI character sequences Switched type "S" to switch as B,W,D,Q or T type indicator Switched character size indicator |
GoRC |
Input file formats supported:-
ANSI, Unicode UTF-8 with BOM and UTF-16LE with BOM |
|
Output:- Output to the console will be in Unicode if permitted by the system; file to receive redirected output will be in the same format as the first input file. |
||
Unicode can be used in:- filenames in include files resource files (eg. icons and bitmaps) and raw data files; filenames in input and output files via the console (command line); defined words in the command line; defined words in source or include files (equates and macros); comments; resource IDs; resource types; strings (see below). |
||
Strings in version resource, stringtables, dialogs, menus, controls and user-defined resources:- |
||
always converted to Unicode UTF-16 format if not in that format already, escape sequences allowed and number conversion carried out (see GoRC manual) | ||
Strings in RCDATA resource (raw data in resource script) |
||
(default action) kept in the same format as the source script, escape sequences allowed and number conversion carried out (see GoRC manual) | ||
L"....." | - string converted to UTF-16 format if not in that format already |
GoLink |
Input commands:-
Command line in console (MS-DOS command prompt):- accepts Unicode filenames if supported by the operating system. Command files:- can be ANSI, Unicode UTF-8 with BOM and UTF-16LE with BOM |
|
Output:- Output to the console will be in Unicode if permitted by the system; file to receive redirected output will be in the same format as the first Unicode command file. If there is no Unicode command file the format depends on the operating system - see the GoLink manual. |
Copyright © Jeremy Gordon 1999-2023. All rights reserved.
Last update 18th November 2023.