c68 v4.4.5 (TOS) ---------------- INTRODUCTION This is the latest release of my port of the freeware ANSI C compiler c386/c68 v4.4. For users who are not familiar with this product, it is worth pointing out that c68 is merely the main compiler phase of a C compilation system rather than a complete C compiler - you will still need a pre-processor, an assembler and a linker. This version of c68 generates 68000 code compatible with JAS, the assembler from SozobonX. So, in order to obtain a complete compilation system, it is recommended to use SozobonX as the back-end and Scott Bigham's CPP 1.1.3 as pre-processor. A simple compiler driver (cc68x) is supplied as well as a port of MiNTlibs PL44 that will serve as the standard library and a modified version of Fred Fish's portable math library. The compiler should be usable on machines with 1MB and a single disk. This document does not describe the optimal layout for various ST configurations, but you can probably figure out what makes the most sense for your machine. WHO NEEDS C68? With GNU C available for years now, why even bother to port c68 to TOS? The answer is quiet simple: GNU C, as sophisticated as it is, won't work on a small ST (with less than 3MB). SozobonX on the other hand, is still far away from being ANSI compliant, and will probably never be. So, unless you are willing to spend a little fortune on one of the commercial compilers, c68 might be your only choice... INSTALLATION If you don't have them already, obtain the following things: SozobonX: ftp.cs.tu-berlin.de: /pub/atari/Programming/Sozobon.c/* CPP 1.1.3: atari.archive.umich.edu: /pub/atari/Programming/cpp113.zoo MiNTlibs PL44 header files: atari.archive.umich.edu: /pub/atari/Mint/Lib/mntinc44.zoo Follow the included instructions. Copy the contents of the folders man/, inc/, lib/ and bin/ to appropriate places. inc/ contains replacements for mintbind.h and osbind.h from mntinc44.zoo (I have removed support for Lattice C, Pure C and GCC for apparent reasons; add missing parts from the original files if you need them). Let environment variables $C68INC and $C68LIB point to the headers and the library respectively. If necessary adjust your $PATH to include the locations of the compiler parts. Sources to c68/c386 v4.4 have been posted to comp.os.minix and should be available somewhere. I will try to upload them to a FTP-server soon, but I can't tell to which one yet. Since this is Minix-source, any suggestions where to put it? THE ASSEMBLER as68 This version of c68 v4.4.x comes with its own assembler called as68. Why is this so? Well, as68 is in fact the next version of JAS to be included in SozobonX's release 08. It won't work with older versions of HCC and TOP, so I had to rename it to avoid incompatibilities. Once SozobonX's new release is out, you can again use JAS with both HCC and c68. Note that cc68x assumes that the assembler is called 'as68'; should not be too difficult for you to change this, though. WHAT ELSE DO I HAVE TO KNOW? The default size for int is 2 bytes, which can be changed to 4 bytes with the -mlong option of cc68x. See the man pages for further information on this. Note also that sizeof() returns unsigned long, thus printf( "%d\n", sizeof(long) ); will have the surprising result of '0' in -mshort mode. Check also file 'compiler.h' of MiNTlibs to find out more about c68's differences to SozobonX's HCC. COMPILING THE MiNT KERNEL Yes, it should be possible to build the MiNT / MultiTOS Kernel with c68 (68000 processors only and without memory protection of course). The biggest problem right now is that JAS does not know anything about 68030s, FPUs or PMMUs, so you will have to edit most of the '.spp' files and remove that stuff. Use Scott Bigham's mit2mot utility to translate GAS-syntax into something JAS accepts. GEM PROGRAMMING If you want to build GEM applications using c68, you will need appropriate bindings which are not included in this package. I did some tests with the XGEMFAST library from SozobonX, and af- ter a bit twiddling with the header files succeeded in building two small accessories I wrote years ago. c68 complained about lots of implicitly declared functions, but it worked neverthe- less. Maybe I should rewrite the headers to make them ANSI. Any help in providing decent GEM bindings for c68 would be greatly appreciated. DISCLAIMER IN NO EVENT WILL I AND/OR ANY OTHER PARTY BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR OTHER SPE- CIAL,INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR A FAILURE OF THE PROGRAMS TO OPERATE WITH OTHER PRO- GRAMS) THE PROGRAMS,EVEN IF YOU HAVE BEEN ADVISED OF THE POSSI- BILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY. ACKNOWLEDGEMENTS Here is a list of people who helped (directly or indirectly) to turn more than 1.5 MB of source files into a working compiler: Scott Bigham cc68x, cpp, libsort, MiNTlibs Jerry Geiger, Volker Seebode Maintainers of SozobonX Keith and Dave Walker c68/c386 v4.x original releases AUTHORS Versions prior to release 4.0: Christoph van Wullen. ANSIfication work and other enhancements in Release 4.0 and later releases: Keith Walker email: kdw@oasis.icl.co.uk (bug fixes, IEEE support, ANSIfication) Dave Walker email: d.j.walker@slh0101.wins.icl.co.uk (IEEE support, Errors/Warnings, documentation) Port to Atari ST (TOS version): Thorsten Roskowetz email: rossi@titan.rz.uni-osnabrueck.de MiNTlibs PL44 and PML PL23: Lots of people including Dale Schumacher, Eric R. Smith, Fred Fish, Jwahar Bammi, entropy, Michael Hohmuth, Scott Bigham, Andreas Schwab, Howard Chu, Juergen Lock, Bjarne Pohlers, Hildo Biersma, Kay Roemer, Dirk Haun, Cristof Stadler, Frank Baumgart, Frank Rossien, Robert Wilhelm, Stefan Steyer, Michal Jaegermann, Stephen Henson, Simon Gornall, Wolfgang Lux,Martin Koehling, Markus Kilbinger, Ulf Moeller, Ole Arndt, Uwe Ohse, Stefan Steyer, Ulrich Kuehn, Jan-Hinrich Fessel, ... COPYRIGHT Versions of c68/c386 prior to release 4.0 are: Copyright (C) 1989,90,91 Christoph van Wuellen. Credits to Matthew Brandt. All commercial rights reserved. This compiler may be redistributed as long there is no commer- cial interest. The compiler must not be redistributed without its full sources. This notice must stay intact. Starting with release 4.0 Keith and Dave Walker took over sup- port of c68/c386. To avoid confusions with their ongoing work on the compiler, this slightly modified version of release 4.4 doesn't come with full sources but with a diff-listing relative to it. Binaries of c68 v4.4.5 (TOS) may not be redistributed without the diff-listing and this text-file. Most of the Libraries (MiNTlibs and PML) is public domain and hence may be used without restriction. Please note the follow- ing exceptions (explained in more detail in file 'Copyright' of the MiNTlibs PL44 source code distribution): doprnt.c and the curses library/header files are: Copyright (C) 1988 Regents of the University of California. obstack.c and obstack.h are: Copyright (C) 1988 Free Software Foundation, Inc.