Path: utzoo!mnetor!uunet!van-bc!root From: jlydiatt@jlami.van-bc.UUCP (Jeff Lydiatt) Newsgroups: comp.sys.amiga Subject: Re: Free C Compiler? Almost! Message-ID: <1692@van-bc.UUCP> Date: 15 Mar 88 03:15:49 GMT Sender: root@van-bc.UUCP Lines: 73 I am pleasantly suprised at the interest shown in a free C compiler for the Amiga. There is a real good one on the way RSN :-) - read on - A fellow from Holland, Olaf Seibert, and myself have independently been working on the compiler from FF #110 throughout the winter. In mid-February, he mailed me his version, and I spent three weeks merging his with mine. The result is a greatly enhanced compiler: o macros now fully supported by Cpp (Decus C preprocessor). o more friendly error diagnostics. o typedef and void now fully supported. o casts handled correctly. o parameter passing problems fixed. o compile time constant expressions supported. o initialization of static and auto variables. o handles unsigned char, short and long. o better register allocation and tracking algorithm. o gets rid of a lot of the "magic numbers" in the code. o somewhat better code optimization. In addition to the changes to the compiler, there are also a number of good support programs and library functions that has either been developed, or have been discovered: o a good PD assembler with source. The same as on FF #110 but with a few fixes. o a good PD make (not the one on FF #110). o a cc-like front end that integrates the cpp preprocessor, compiler, assembler, and Blink. IE "cc -o hello hello.c" is all the typing required to produce a runnable hello world program. o a rudimentary I/O support library for getc, putchar, fprintf, read, write etc. o a pretty comprehensive string library (strlen, strcpy) etc. The compiler is not yet fully functional however. Some of the missing features and/or problems are outlined below: o no long multiply, divide and mod functions. Int's are 32 bit longs, but these operations are done with the native instructions and a warning is printed. o no floating point support. o The standard i/o library and functions needs fleshing out. o Seems to have run into a bug with Blink for the larger programs - if we can't solve that by altering the compiler generated code, we may be faced with writing a linker. Wonder what the chances of the Software Distillery Boys releasing the source to the PD version of Blink? Assuming Olaf has no objections, it is my intention to release the compiler and whatever source code I have when the compiler has been tested out. In order for the compiler to be useful however, you will need the Native Developers kit available from Commodore for $20. This will give you the include files and the Amiga.lib C-stub glue support to the Amiga operating system. I have noted Bryce's suggestion that Commodore may be willing to grant a distribution licence with the compiler and will follow that up. The compiler would be much more useful if the include files could be distributed on the same disk. I don't plan to have any restrictions on the redistribution of the compiler other than the copyright notices remain intact, that the compiler be made available for only a nominal distribution fee, and all commercial rights not claimed by Matt Brandt (the original compiler author) are also reserved. The compiler is really close to releasing. I've sucessfully compiled assembled and linked the assembler source code and used the result to assemble a couple of large programs. The object code generated by the PDC-assembler and the Manx-assembler compares the same! I'll keep you all updated on it's status. -- // Jeff Lydiatt UUCP: uunet!van-bc!jlami!jlydiatt \X/ or : {ihnp4!alberta!ubc-vision,uunet}!van-bc!jlami!jlydiatt