Section 1 Home page Section 3

2. AHCC Setup and Project Files

AHCC can be downloaded from

There is no installation step: simply unzip and copy to a convenient location on your hard disk. I have a desktop shortcut to the AHCC program, so it is always accessible.

2.1. Version 5.3 Issues

We will be using the include libraries for AHCC (not the short int versions, in sinclude). Unfortunately, as at version 5.3, some of the constants we require are not in "include/aes.h". You need to copy the values from "sinclude/aes.h". These missing constants include:

#define WM_SHADED 22360         // <1>
#define WM_UNSHADED 22361
#define FL3DNONE 0x000          // <2>
#define FL3DIND 0x0200
#define FL3DBAK 0x0400
#define FL3DACT 0x0600
#define FL3DMASK 0x0600
#define SUBMENU 0x0800
  1. These two events are used in TOS 4.0 programs.

  2. These flags are needed if you create any dialogs in a resource file.

If you get "missing constant" messages from AHCC, first see if they are missing from "include/aes.h".

2.2. Project Files

Structure of a project file:

; some comment
PROGRAM.PRG       ; <1>
.C [-7 -iinclude] ; <2>
=                 ; <3>
ahcstart.o        ; <4>

program.c         ; <5>

ahccstdi.lib      ; <6>
  1. Name of output program to compile.

  2. Optional set of parameters for the compilation.

  3. Separator between output definition and input files.

  4. The standard startup code, for the linker.

  5. Your program’s .c files are listed.

  6. Usually three libraries: these vary depending on the platform you target.

The usual things to change in the above project are:

  • line (1) gives the name of your program.

  • line (2), the target platform. -7 means the Firebee / Coldfire, -2 for 68020, and nothing for the Atari ST / 68000.

  • line (5), expand this with all the .c files in your project.

  • line (6), change this and the subsequent lines for different Atari targets. e.g. for the Firebee with floating point, use ahccstdf.lib and ahccgemf.lib The libs shown are suitable for targeting the Atari ST / 68000.

The standard library comes in four versions (thanks to Eero Tamminen for explaining this):

  1. ahccstdf.lib (Firebee / Coldfire)

  2. ahccstd.lib (680x0 + FPU)

  3. ahccstdi.lib (68000 with floating point support missing from printf/scanf)

  4. ahccstfi.lib (Firebee / Coldfire without FPU, may be compatible with Falcon)

2.3. Settings

When AHCC starts, it is initially set to use the libraries in "sinclude". These use a short int data type.

Before trying the programs here, set AHCC to use the libraries in "include". Do this by opening the Config dialog (Alt-O), finding the "Options for the compiler", and checking the line for "-i include".