The "Go" tools
     The GoAsm manual

FAQ ....

"When I click on the GoAsm or GoLink or GoRC icon something flashes on the screen but nothing else happens"

by Jeremy Gordon -

This file is intended for those interested in 32 bit assembler programming, in particular for Windows.

In common with many developer's tools, GoAsm (the assembler), GoLink (the linker) and GoRC (the resource compiler) are Windows console programs. This means that they do not have a GUI (Graphics User Interface). In other words they do not permit any input from the user once they have started running.

Because of this, if you just click on the tool's icon, the program will start in a console window. When the program ends, the console window will disappear, because the program has ended.

Development tools tends to work in this way because they have a specific job to do, and after they have done it, the programmer most likely needs to do something else, such as run another tool or view the result of compilation. These actions are often automated in the build process and having a GUI simply gets in the way of this.

This does mean, though, that a way has to be found to tell the tool what to do.

"So how can I tell the tool what I want it to do?
This is done by providing information to the tool in its command line. The command line is the instruction to the operating system (Windows) to start the program itself. You can see a command line if you right click on a shortcut on your desktop and then click on "properties". The "target" shows the command line used to start the program concerned. Any characters after the name of the program concerned are the parameters. These are used to provide the program with information when it starts. What is actually happening here is that when the program runs, it reads the command line (it actually uses the Window function GetCommandLine), and then acts accordingly.
In Windows, true MS-DOS programs have PIF files, which also control how they run (this does not apply to the "Go" tools).
When using console programs in the build process, you will need to change the command line parameters from time to time and therefore changing the shortcut target is usually not a convenient way to proceed. The other problem is (as we have seen) that the console window closes when the program finishes, making it different to see reports from the tool (although these could be diverted to a file).

"Using console programs in the build process
There are two main ways to do this conveniently.
Either you can use a IDE (Integrated Development Environment) or you can use a console window, also known as MS-DOS window or "command prompt".
An IDE is a GUI program which appears on the screen with windows and a menu as you would expect with any Windows program. In such programs you normally start a "project" which will be the final product you wish to make (your program). The IDE lets you create your own command line for starting the tools you wish to use and for sending the appropriate parameters. Some IDE's, however, are tied to certain tools which you cannot vary. If you want to use an IDE you need to follow the instructions of the IDE, as appropriate.
Personally, I prefer to use a console window since I don't really believe in using tools unless they are really necessary. This is of course a matter of choice. When starting out you will probably find it quicker to get going if you use an console window.

"How do I get a console window (also known as MS-DOS window or command prompt) on my computer?
All Windows computers permit you do do this, but it is slightly different depending on which operating system you are using. Start the computer in the usual way in Windows, and then:-
for Windows 95 and 98 you need START, PROGRAMS, MS-DOS Prompt
for Windows ME you need START, PROGRAMS, ACCESSORIES, MS_DOS Prompt
for Windows NT you need START, PROGRAMS, ACCESSORIES, MS_DOS Prompt
for Windows XP you need START, ALL PROGRAMS, ACCESSORIES, COMMAND PROMPT
If in doubt, consult your Windows help file or instruction manual

When it first appears the console window looks something like this:

Note how, at first, the command line shows
The characters here are called the "command prompt". The command prompt tells you which disk drive and which folder on that disk drive will be used for all file actions using the console window. In this example, the console window will perform all file actions using drive "C" (the main hard drive), and the folder "\Windows". The "\" means the root folder (also known as the root directory) in the drive concerned (ie. the very first folder in drive "C").

Now you need to change the folder that the console window will be using for file actions, to the folder that contains your project and your tools. You can do this using the MS-DOS command "cd" (literally change directory). For example if you type in "cd c:\prog\myproject" and press the enter key, you will be changing the folder that the console window will use to the prog\myproject folder in the c drive. Then the command prompt will look like this:-
Now, assuming that your tools are in this folder, you are ready to run them. Test this by typing in, for example, GoAsm and then pressing enter. If GoAsm.exe is in the c:\prog\myproject folder then it will respond to you. The console window will remain open for the next command.

Now you need to return to the Quick Start and HelloWorld examples to see exactly what parameters to pass to the tools on the command line. Before doing so you may be interested in a few additional MS-DOS commands which you may find useful to use (remember "directory" means "folder" in Windows terminology:-

md            make directory, eg. "md hello" makes the directory hello
cd            change directory (see above)
rd            remove directory
cd ..         change to directory above this one
cd \          change to the root directory
a:            use drive a:
c:            use drive c:
d:            use drive d:
dir           show list of files in this directory
dir /p        show list of files in this directory but pause after a screenful
dir /w        show list of files in this directory (wide format)
cls           clear the screen
copy          copy one file to another
del xxxx      delete the file (careful! no recycle bin)
time          set the time
date          set the date
type          look at file in the console
type >prn     send file to printer
type >xxxx    send file to a file
ver           get Windows version
myprog        run myprog.exe (or myprog.bat if myprog.exe is not found)
myprog >xxxx  run myprog.exe (or .bat) sending its output to a file


Copyright © Jeremy Gordon 2003
Back to top