• Stars
    star
    420
  • Rank 103,194 (Top 3 %)
  • Language
    C
  • License
    Other
  • Created over 9 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Amsterdam Compiler Kit
                     THE AMSTERDAM COMPILER KIT V6.1pre1
                     ===================================

                  © 1987-2005 Vrije Universiteit, Amsterdam
                                2022-08-19


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 apocryphal version 6.1 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.1 release should work. 



SUPPORT
=======

Languages:

ANSI C, B, Pascal, Modula 2, Basic. K&R is supported via the ANSI C compiler.

Platforms:

pc86          produces bootable floppy disk images for 8086 PCs
linux386      produces ELF executables for PC Linux systems
linux68k      produces ELF executables for m68020 Linux systems
linuxppc      produces ELF executables for PowerPC Linux systems
linuxmips     produces ELF executables for little-endian MIPS32r2 Linux systems
cpm           produces i80 CP/M .COM files
rpi           produces Raspberry Pi GPU binaries
pdpv7         produces PDP/11 V7 Unix binaries
msdos86       produces i86 MS-DOS .COM files
msdos386      produces i386 MS-DOS 32-bit DPMI .EXE files



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

The version 5.0 build mechanism has been completely rewritten. Installation
ought to be fairly straightforward. It will build on Unixishes including Linux,
OSX, and Windows using MSYS2 and mingw32.

Requirements:

- an ANSI C compiler. This defaults to gcc. You can change this by setting
  the CC make variable.

- flex and yacc.

- GNU make.

- Lua (any version) with the lua-posix library installed.

- (optionally) ninja; if you've got this, this will be autodetected and give
  you faster builds.

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

- about 15MB in the target directory.

Instructions:

- edit the Makefile. There's a small section at the top where you can change
  the configuration. Probably the only one you may want to edit is PREFIX,
  which changes where the ACK installs to.

- Run:

    make

  ...from the command line. This will do the build.

  The make system is fully parallelisable. If you have a multicore system,
  install ninja and it'll use all your cores. If you don't have ninja, you
  can still use make for parallel builds with:

    make -r -j8   # or however many cores you have

  ...but frankly, I recommend ninja.

- Run:

    sudo make install

  ...from the command line. This will install the ACK in your PREFIX
  directory (by default, /usr/local).

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<platform>     build for the specified platform
  -o <file>        specifies the output file
  -c               produce a .o file
  -c.s             produce a .s assembly file
  -O               enable optimisation (optimisation levels go up to 6)
  -ansi            compile ANSI C (when using the C compiler)
  -v               be more verbose (repeatable)
  <file>           build file

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

  .c               C (ANSI or K&R)
  .b               the PDP-11 dialect of B
  .bas             Basic
  .mod             Modula-2
  .ocm             Occam 1
  .p               Pascal
  .o               object files
  .s               assembly files
  .e               ACK intermediate code 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.
A sample command line is:

ack -mlinux386 -O examples/paranoia.c



GOTCHAS
=======

There are some things you should be aware of.

- Look at plat/<PLATFORMNAME>/README for information about the supported
  platforms.
  
- The library support is fairly limited; for C, it's at roughly the ANSI C
  level, and for the other languages it's similar.
  
- 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.

- BSD systems may need to up the number of file descriptors (e.g.
  'ulimit -n 200') before the ACK will compile.
  
- The ACK uses its own .o format. You won't be able to mix the ACK's object
  files and another compiler's.

- When compiling together multiple B source files, you need to do some extra
  work to initialise them properly otherwise your program will crash on
  startup; see the ack(1) and abmodules(1) man pages.

- The distribution contains *everything*, including the weird, ancient,
  archaic stuff that doesn't work any more and never will, such as the int EM
  interpreter and the assembler-linkers. Only some of it builds. Look for
  build.lua files.



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 (davidgiven on Github)
[email protected]
2018-09-18

More Repositories

1

wordgrinder

A word processor which gets the hell out of your way and lets you get some work done.
Lua
943
star
2

fluxengine

PSOC5 floppy disk imaging interface
C++
352
star
3

cpmish

An open source sort-of CP/M 2.2 distribution.
Assembly
346
star
4

cpm65

CP/M for the 6502
Assembly
266
star
5

cowgol

A self-hosted Ada-inspired programming language for very small systems.
C
238
star
6

clue

An experimental C to Javascript/Lua/Perl5/Lisp/Java compiler
C
144
star
7

minix2

Minix 1 and 2, Quick and Dirty editions
C
117
star
8

typetalk

A SmallTalk like live coding system running in the browser, based on TypeScript.
TypeScript
65
star
9

luje

a Java virtual machine written in pure Lua
Java
61
star
10

fforth

A small, portable Forth written in Posix C
C
44
star
11

LBW

Experimental tool for running Linux binaries on Windows
C++
39
star
12

telinkdebugger

A Raspberry Pi Pico-based debugger bridge for the Telink SWS debug protocol.
C++
22
star
13

pcemu

A software 8086 PC emulator.
PostScript
19
star
14

polf

A toy
Assembly
17
star
15

piface

Bare metal boot loader for the Raspberry Pi's VideoCore processor (no ARM!)
C
12
star
16

narcissus

A chording keyboard tool for X
C
11
star
17

cowjac

An experimental Java bytecode to C++ transpiler
Java
10
star
18

jpegfinder

A simple tool for scraping jpeg frames from files. Suitable for recovering corrupted MJPEG files. I'm looking at you, Hubsan.
C
10
star
19

glueesp

A port of the Geoworks Glue DOS linker.
C
10
star
20

ibm6770keyboard

A USB interface for the IBM 6770/6780 keyboard.
C++
9
star
21

cowbel

An experimental programming language
xBase
8
star
22

btracker

A chiptracker editor and player for the BBC Micro.
Assembly
8
star
23

calculon

A very small, fast shader language using LLVM.
C++
8
star
24

bogomandel

A silly toy Mandelbrot program for the BBC Micro.
Assembly
7
star
25

dso152-breakout

Breakout for the Fnirsi DSO152
C++
7
star
26

plmc

A compiler for PL/M targeting LLVM bitcode.
Yacc
6
star
27

dbztool

A command line tool for accessing the bootstrap protocol on Dragonball CPUs.
C++
5
star
28

gcc-vc4

An experimental port of gcc 4.8.1 to the VideoCore IV.
C
5
star
29

gruntle

A text-based CYO MMORPG engine
HTML
4
star
30

cshell

A very simple command line shell for the Commodore 64.
Assembly
4
star
31

qemu-z80

Z80 support for qemu
C
4
star
32

bterm

Firmware/hardware to use a Brother WP-1 word processor as a serial terminal
Assembly
4
star
33

vtech6502

A collection of data about the internals of various VTech 6502-based toys.
4
star
34

cparser

C
4
star
35

maxii-keyboard

PSoC5 firmware to for an ancient MAX-II industrial keyboard
C
4
star
36

libfirm

C
3
star
37

spey

A spam-filtering SMTP proxy using greylisting
Shell
3
star
38

comal65

A Comal interpreter for the 6502
Assembly
3
star
39

stellation

A web based real time space warfare RTS.
Shell
2
star
40

vimutti

Tool for decrypting Buddha Machine flash images.
C
2
star
41

pblq

Amstrad eMailer PBL boot loader client
Shell
2
star
42

objective-lua

A dialect of Lua extended with syntax borrowed from Objective C to add object orientation support.
Lua
1
star
43

ebooksyncer

A tiny tool for syncing (and decrypting) eink Kindle books from the device to a directory for backup.
1
star
44

flooded-moon

The moon, like you've never seen it before.
POV-Ray SDL
1
star
45

uboot-pw1

Customised uboot for Kindle Paperwhite gen 1 devices.
C
1
star
46

bmdkey

Python
1
star
47

sdcc

Patched sdcc for Fuzix
C
1
star
48

fluxengine-testdata

Test data for the FluxEngine project.
1
star
49

ab

Yet Another Build Generator
Python
1
star
50

fgit

Tools for using Fossil as a git client.
Shell
1
star