ANSIfied Amsterdam Compiler Kit

dtrg 8da0d38b6d Applied a patch to support OpenBSD. 17 years ago
bin 454bdae81f Added the appropriate #! magic at the beginning of shell scripts. (Some modern shells don't like scripts to be without it.) 18 years ago
distr 9170d09462 Performed major renovations to make the script work on OpenBSD. 17 years ago
doc 4b79248af9 Modified to no longer build LLgen, as it is now distributed separately. 18 years ago
emtest 9bc8c07deb Replaced references to /usr/tmp with references to /tmp. 19 years ago
etc 415e7e14fc em_table is now in /h; new_table is now in util/data. 17 years ago
examples 681e2e0432 Added example programs. 17 years ago
fast c3855160fb use stdarg when compiling with ANSI C compiler 29 years ago
fcc b9a67e72ca use stdarg when compiling with ANSI C compiler 29 years ago
first b611731ec3 Updated .distr files for the new release. 17 years ago
h b611731ec3 Updated .distr files for the new release. 17 years ago
include b611731ec3 Updated .distr files for the new release. 17 years ago
lang b611731ec3 Updated .distr files for the new release. 17 years ago
lib 5c5f711cbb Done a major overhaul of the way target include files are installed and 17 years ago
mach b611731ec3 Updated .distr files for the new release. 17 years ago
man 1db6a3029b Header --> Id 30 years ago
modules b611731ec3 Updated .distr files for the new release. 17 years ago
plat b611731ec3 Updated .distr files for the new release. 17 years ago
util 040151dd76 Removed some explicit (and wrong) redeclarations of system 17 years ago
.distr b611731ec3 Updated .distr files for the new release. 17 years ago
Action 57084134e5 Modified to no longer build LLgen, as it is now distributed seperately. 18 years ago
Copyright a56d81ea51 new copyright notice in repository 19 years ago
DistrAction 3ad68743ca corrected for new TakeAction 36 years ago
Makefile 71c9695eae Initial revision 40 years ago
NEW e8b47b4745 Added some new readmes at the top level. 19 years ago
README d85e045ae6 Updated for the new release. 17 years ago
TODO e8b47b4745 Added some new readmes at the top level. 19 years ago
TakeAction d722986e66 Added the appropriate #! magic at the beginning of shell scripts. (Some modern shells don't like scripts to be without it.) 18 years ago
config.pm 3dd11c674d Adjusted some of the default parameters and their names. 17 years ago
pm 8da0d38b6d Applied a patch to support OpenBSD. 17 years ago
pmfile 17b0c36f69 Replaced the call to posix.setenv() with the more portable 17 years ago

README

# $Source$
# $State$
# $Revision$

THE AMSTERDAM COMPILER KIT V6.0pre1
===================================

© 1987-2005 Vrije Universiteit, Amsterdam


INTRODUCTION
============

The Amsterdam Compiler Kit is a complete compiler toolchain consisting of
front end compilers for a number of different languages, code generators,
support libraries, and all the tools necessary to go from source code to
executable on any of the platforms it supports.

This is an early prerelease of the upcoming version 6.0 release. Not a
lot is supported, the build mechanism needs work, and a lot of things are
probably broken. However, what's there should be sufficient to get things
done and to evaluate how the full 6.0 release should work.


SUPPORT
=======

Languages:

ANSI C, K&R C, Pascal, Modula 2, Occam 1, and a Basic variant.

Platforms:

pc86 produces bootable floppy disk images for 8086 PCs


INSTALLATION
============

The version 6.0 build mechanism has been completely rewritten and is based
around the Prime Mover build tool (see http://primemover.sf.net for more
information). Installation ought to be fairly straightforward.

Requirements:

- an ANSI C compiler. Currently, I'm afraid, it's hard-coded to use gcc.
To change, try changing the variable definitions in first/c.pm. This also
needs to be available as 'cc' from the shell.

- about 20MB free in /tmp (or some other temporary directory).

- about 6MB in the target directory.

Instructions:

- edit config.pm. There's a small section at the top containing some editable
variables. Probably the only one you may want to edit is PREFIX, which
changes where the ACK installs to.

- Run:

./pm configure

...from the command line. This will write out a configuration file.

- Run:

./pm

...from the command line. This will actually do the build. This takes
about two minutes on my 1.6GHz Athlon.

- Run:

./pm install

...from the command line. This will install the built ACK into whatever
directory you nominated in PREFIX.

The ACK should now be ready to use.


USAGE
=====

Currently I haven't sorted out all the documentation --- it's supplied in the
distribution, but not all of it gets installed yet --- so here is a quickstart
guide.

The main command to use is 'ack'. This invokes the compiler and the linker.
Some useful options include:

-m build for the specified platform
-o specifies the output file
-c produce a .o file
-c.s produce a .s assembly file
-O enable optimisation
-ansi compile ANSI C (when using the C compiler)
build file

ack figures out which language to use from the file extension:

.c C (ANSI or K&R)
.b Basic
.mod Modula-2
.ocm Occam 1
.p Pascal
.o object files
.s assembly files

For further information, see the man page (which actually does get
installed, but is rather out of date).

There are some (known working) example programs in the 'examples' directory.


GOTCHAS
=======

There are some things you should be aware of.

- The only platform supported so far is pc86, which generates 8086 tiny mode
executables that will work as floppy disk boot images. So, to run, simply dd
the output file (pc86.img by default) onto a floppy disk and boot from it.
Be aware that very little functionality is supported and that the entire
program, heap and stack and code and all, must fit within 64kB. See
plat/pc86/README for more information.

- By default, the ack tool will compile K&R C. Practically all C source these
days is ANSI C --- use the -ansi switch to enable ANSI mode. No, the ACK is
not C99 compatible.

- When compiling languages other than C, the ACK will usually look at the
first character of the file. If it's a #, then the file will be run through
the C preprocessor anyway.


DISCLAIMER
==========

The ACK is mature, well-tested software, but the environment in which it was
developed for and tested under is rather different from that available on
today's machines. There will probably be little in the way of logical bugs,
but there may be many compilation and API bugs.

If you wish to use the ACK, *please* join the mailing list. We are interested
in any reports of success and particularly, failure. If it does fail for you,
we would love to know why, in as much detail as possible. Bug fixes are even
more welcome.

The ACK is licensed under a BSD-like license. Please see the 'Copyright' file
for the full text.

You can find the mailing list on the project's web site:

http://tack.sourceforge.net/

Please enjoy.

David Given (dtrg on Sourceforge)
dg@cowlark.com
2007-02-25