History of HCC & TOP Amiga Versions: ------------------------------------ The first time I got the compiler was 'Sozobon-C' from Fish #171. Since I always wanted a C compiler (Until now HCC is my first and only C compiler), I looked what it would do, but it seemed not to be a working tool. So I put it back to the disk box. The next version was 'Zc' from Fish #193. This was a modified version by Joe Montgomery. The output of this program looked as if A68k would understand this, and so I decided to do the simplest test for a C compiler written in C: I tried to let the compiler compile itself. This was my fault (but your luck), since several weeks of error-detection followed. Joe Montgomery did some serious mistakes in the Motorola conversion routines. Every output file of Zc had to be edited manually. The linker missed many names that should be XDEF'd in other program parts. Then, when I linked the first version of Zc that was fully XDEF'd, the linker missed something like 'getc', 'printf' etc. I found out that this are standard C library functions. I searched for this functions and found them in the 'dLibs' PD standard C library by Dale Schumacher, which was released with the first version of Sozobon-C on Fish #171. So I tried to compile this functions. OK, naturally, they needed other library functions of a lower level, which needed other functions... at the lowest level, there were system calls to TOS and GEMDOS, since the library was designed for the Atari ST. But the machine in front of me looked different... what should I do? I decided to replace the Atari system calls with equivalent calls to AmigaDOS, compiled and linked all together, and... got a guru, then another guru, etc. But only a few weeks later, it was done: the compiler could compile itself, but only when his output was manually edited, and only when some delicate things in the source were changed (for example, every constant number had to be explicitly casted to int!). The next step was a version that fully automatical compiled itself without manual editing. I decided not to release this version, since my self-written library routines were VERY slow. It took several hours to compile the complete compiler. Besides, I wanted a more complete standard library. When searching through the Fish disks, I found Fish #260 with CClib.library by Robert Albrecht. This looked to be the solution for my problem. When reading through the manual, I found that this library expected 32 bit int's, but my compiler used 16 bit int's. OK, the flag -L was created to force int's to 32 bit. Then the startup code was modified. CClib.library had to be called via JMP, not via JSR, so special interface stubs had to be created. Then everything was linked together, started and... crashed. When debugging, I found that the library destroyed the contents of some registers which were used by the compiler to hold register variables. I forbid the compiler to use them, then it worked (and the compiler was faster and shorter!). Before releasing this compiler, I decided to report the found bugs to Sozobon, Limited, and to ask about a newer version. I send my bug reports, US$10, and an offer to create a compiler that would work on both systems via #ifdef AMIGA, #ifdef ATARI_ST. I received version 1.2 of the compiler, optimizer, etc. on two Atari-formatted disks, but no answer. After solving the problem of reading Atari disks, I updated the compiler and optimizer. This time I implementd the conversion to Motorola format into the optimizer. Nearly every change to the original is commented (Try 'Search #?.c search TetiSoft'). When inspecting Fish #314 with Zc, I found that this compiler could not compile itself. The changes made to the source were mostly not documented. The only things I took from this version are Jeff Lydiatt's math library routines and his implementation of (void *) as universal pointer (and, of course, the latest version of A68k). The next thing was to test the compiler with other programs than itself. I found that he could compile A68k. OK. But the 'CManual' from Fish #337 made problems. The compiler did not distinguish between 'unsigned' and 'unsigned short'! After fixing this problem (and some others), HCC could compile most of the 'CManual' examples. Next thing in this history is the successfull implementation of CClib.library V3.0, which allowed to use D3 again for register variables, and had the bugs fixed I reported to Robert W. Albrecht. Wrote new startup that alerts with a text message if CClib.library V3 or higher not found. The latest enhancement is the implementation of the 2.0 Atari version I received from Sozobon, Limited. OK, and now I think it's time to release the compiler. Let's make the first entry in the table: May 1991: Amiga version 1.1. First release, portation of Atari version 2.0. Greetings to all AMIGA freaks, Detlef Wuerkner Werrastrasse 7 D-6300 Giessen GERMANY