Short: Z88DK - Generic Z80 Small C+ Compiler with Z88 Libraries Author: Cain, Yorston et al, extended by Dominic Morris Uploader: Dominic Morris Type: dev/cross Architecture: m68k-amigaos Z88DK v1.0 - sccz80 v1.10b0.51 - Source Code Archive ---------------------------------------------------- Z88DK is a package along the lines of the GBDK, however it produces code for full Z80s and not the cutdown version in the Gameboy. The package consists of a Small C+ Compiler, Peephole Optimizer, and unified assembler and linker (provided by Z80asm from Interlogic). Libraries are supplied for the Cambridge Z88 however it would be a fairly trivial task to create libraries for other Z80 based machines. This is the first public release of the compiler, however it has under fairly extensive testing for 6 months and I now believe it to produce stable code. Features of the compiler include: - Structs/unions - Floating point support (either generic Z80 or stubs for the Z88 fp calculator) - Long (32 bits), int (16 bits), char (8 bits) datatypes - Signed and unsigned datatypes - Compiler support for far datatypes (allows support for up to 4MB of memory) though no library support as yet. - Literal pools for double constants and strings, both pools feature literal merging (removal of repeated constants). - ANSI & K&R function style declarations and prototypes - Extensive support library (over 200 usable routines) including almost a full complement of string and ctype functions - Definition during declaration of global and local static variables (though not auto variables) The compiler front end (zcc) is a much rewritten affair based on the ZCC096 frontend by Ken Yap, it has been considerably extended and rewritten to function as much as possible like any other big box compiler frontend. Optimization is provided courtesy of a peephole optimizer which substitutes certain compiler output for more efficient code, in particular logical operation on unsigned chars are well catered for. Savings in program size of over 10% are common place. All assembler output is generated in a form suitable for use with the Z80 Module Assembler from Interlogic (A full setup is included within this archive), this freely distributable assembler generates compact object files and allows linking in of routines from multiple library files. The source code for the entire suite is available in a separate archive (z88dk_v1.0s.lha). Potential Problems: - Floating point constants may not be correctly evaluated, I can't reproduce the problem that has been reported by some people. - Far Pointer code is far from complete so the compiler might produce some spectacularly duff code. Potential source of confusion: - This compiler comes with no warrantry, if it works for you, thats great, if it doesn't and in the process destroys France than thats not my problem! The compiler lacks the following features: - Casts (though conversions between types are done automatically this will raise compiler warnings) - Enums (get around by use #define) - Typedefs (get around by use of #define) Recompense: - This compiler suite is provided free of charge and nothing is expected off of you if you use it, however it would be nice to get an email if you use it. If you release a commercial program using this package then it would be good to learn about it and know that all my work is not in vain! (A copy of the program would be appreciated). - Hardware, especially of the SCSI variety, always accepted A few thank yous: Although I mention them in the doc file, I feel I ought to mention the following people, without whom this compiler would not have got this far: - Dennis Groning, this guy tirelessly compiled the compiler for WinBlows and reported back with so many bug reports and suggestions that have made the compiler so much better. - Gunther Strube, without this guys assembler, z80asm, I wouldn't be sat here writing this text. - Garry Lancaster, for not compiling for Linux for almost 6 months(!), but especially for putting up with me rabbiting on about it for those 6 months without getting too irate (though he did write convert Forth for the Z88 in that time - maybe thats his way of venting anger?!?! ) Finally: I'm still developing the Compiler, and I would very much like to keep a unified Cross Compiler, I release the source so that you can pick up on any bugs, laugh at the kludges which I've made(!) If you make any changes could you please let me know so that I can incorporate them into my set of sources - it would be a shame to come this far and end up with n different distributions, cheers! Have fun with the package, d. 22/3/99