NorthC Version 1.0 March 1990 (c) 1990 S.Hawtin. NorthC by Steve Hawtin Welcome to NorthC, the first complete(ish) public domain 'C' environment for the Amiga that I am aware of. This disk contains all you need to compile and link 'C' programs, all the necessary documentation is included on the disk. You are allowed to copy this disk and distribute copies, provided you charge no more than a reasonable copy fee. However you may not copy the "Blink" program without "Blink.doc", the "A68K" program without "A68k.doc" or the "NorthC" program without "Bugs.doc". I have attempted to create a single floppy containing everything you will need to start programming in 'C', if you wish to copy the programs on this floppy you are welcome to them. If you are passing on any of this software please copy the complete floppy, even if you know enough about 'C' to not require all the examples and documentation someone further down the chain might not be so clever. **** NOTE **** If you change the name of this disk from "NorthC" you must edit the files "setup-NorthC" and "Single-Disk" or they will cease to work. In addition you should edit "hello.doc". **** NOTE **** The complete NorthC 1.0 disk contains at least the following files, hello.doc A quick introduction to 'C' under NorthC, read this if you have never used 'C' before, or if you have trouble remembering the parameters to "cc". This document takes the first time 'C' user through the steps neccesary to produce the "Hello world" program. setup-NorthC A script file to set the path and create a logical device "clibs:" you should run this each time you use NorthC. If you are using NorthC from a hard disk you can put the contents of this file in your startup sequence. If you have only a single floppy "Single-disk" will set up the environment. Single-disk A script file to set up an unexpanded Amiga 500 to compile the "Hello World" program, after you have used it once you should go out and buy a second drive then use "setup-NorthC". README This file, a list of the files in NorthC 1.0. tools/ar.c tools/cc.c The source files for the ar and cc programs, the commands "cc -occ cc.c" and "cc -oar ar.c" will recompile these files for you. These are here mainly as examples that are garenteed to compile with NorthC. Also cc.c is a good program to hack about a bit if you want to change your top level interface. libs The 'C' library files, this directory contains the files NorthC requires for the standard library and the startup routines. The files in this directory are listed below. libs/libc.doc Documentation on the 'C' library routines currently implemented in the 'C' library. This document should be printed out and often refered to. libs/clibdefs.i Some macros to use in assembler routines, these are specifically made to suit my programming style, feel free to steal any ideas you think are usefull. libs/dos.i A list of the standard AmigaDOS library offsets, this has been generated from "small.lib" in ":examples/libread". By including these as hard coded offsets I do not have to load any library other than "libc.a" when linking NorthC programs. libs/libc.a The standard 'C' library, the functions in this library attempt to follow the ANSI standard, see "libc.doc" for a list of the functions implemented. The maths routines use Motorola Fast Floating Point format, the "double" data format in NorthC is 32 bits. libs/crt0.o The startup routine, this will load up the libraries, open a console, and generally do the things startup routines are supposed to. Examine the source code for details of what it does. libs/crt0.asm The source for the startup routine, alter this if you do not like the startup, but remember to note the fact in the file. It is important that you call "__main" not "_main" otherwise some things will not be initialised correctly. bin This directory contains the compiler, assembler, linker and front end for NorthC, these mostly come from other people see the documentation for the sources. bin/NorthC The compiler, this will translate 'C' source into assembler files. Read the file "bugs.doc" to find details of the current release. bin/a68k bin/A68k.doc The assembler from Charlie Gibbs, again the doc file gives more details. This translates assembler files into object files. bin/Blink bin/Blink.doc The linker from "The Software Distillary", see the doc file for details. This combines object files and libraries to produce executable programs. bin/Bugs.doc A list of known bugs in this version of NorthC, this includes work arounds for many of the bugs. It is important to read this document when you find your program not behaving as it should. bin/cc bin/cc.doc The front end, this will control the compiler assembler and linker. This program loosly follows the normal UNIX conventions, however it needs to be hacked before it does everything you will need. bin/ar The library creator, note this takes a very simple view of creating libraries, it just concatenates files together. See the tools directory to examine the source. include/string.h include/ctype.h include/stdarg.h include/assert.h include/stddef.h include/stdio.h include/errno.h include/macros.h include/setjmp.h include/limits.h include/time.h include/stdlib.h include/types.h The standard 'C' include files, this set comes originally from the Sozobon 'C' compiler. The compiler automatically looks in the ":include" directory for the include files, if you want it to look elsewhere change the "INCLUDE" environment variable. include/exec include/graphics include/intuition There are selected parts of selected include files within these directories, these were the bare minimum to allow me to get at the operating system. The "Amiga ROM Kernel Reference Manual: Includes & Autodocs" contains full listings of the contents of all the include files. examples This directory contains some simple examples that have been ported to NorthC, these sources should be looked at to get ideas from. examples/libread/libread.c A simple library reading program, this program converts "small.lib" to an assembly language include file "dos.i". examples/libread/small.lib examples/libread/POSTER Small.Lib from the "Fish 92" disk, "POSTER" gives details. This file is on the disk to act as a data file, it is not directly used by the NorthC environemnt. examples/gnu-go This directory contains a very preliminary port of the GNU version of Go. It contains the source code for a simple Go player. examples/gnu-go/DOCUMENT examples/gnu-go/COPYING examples/gnu-go/README The GNU documentation for GnuGo, the copying conditions only apply to files within the "examples/gnu-go" directory. However I fully endorse the warranty clauses in "COPYING", they can be taken to apply to all portions of the disk that I own the copyright to. examples/gnu-go/README.doc A quick introduction to the Amiga Port of GNU-GO. examples/gnu-go/Makefile.Amiga A batch file to compile the complete gnu-go program, at the moment most of the compile lines are commented out, remove the ';' characters and type "execute Makefile.Amiga" at the CLI to remake the program. examples/gnu-go/blink.list A Blink "with" file to relink the gnu-go program, when I have a working version of "make" I will not need to use Blink "with" files. At the moment there are too many files to link at the same time. examples/gnu-go/AmLow.asm examples/gnu-go/AmWindow.c Some source files, these show one way to call OS functions from NorthC. If you want to add stubs to AmigaDOS commands copy the ideas from here, but remember to save the registers. NorthC Version 1.0 March 1990 (c) 1990 S.Hawtin. Permission is granted to copy all original data and programs on this disk provided that: 1) It is not used for commercial gain 2) This notice is included in all copies 3) Altered copies are marked as such. No liability is accepted for the contents of any part of this disk. It is my understanding that all the non original data and programs on this disk can be copied freely, provided the restrictions noted in the various documentation files are observed. This software is in the public domain, you should not have to pay more than a copy fee for it. If you feel that my hard work in preparing this disk deserves some reward you could send a donation of $25 (US) or £15 (sterling), or equivalent, to S.Hawtin, 54 Gloucester Drive, Basingstoke, Hampshire, RG22 4PH, U.K. this would encourage me to fix bugs, improve the software and come out with another release. If you include bug reports and comments I will try to act on them, if you also send a blank floppy and a self addressed envelope I will send you the latest release of the disk.