The compiler featured in z88dk is a much enhanced Small C compiler; the compiler accepts many features of ANSI C and is only deficient in a few areas where implementation on a z80 processor might prove inefficient. The compiler performs simple optimisations, but the bulk of the optimisation is achieved by a set of peep-hole rules, which will typically reduce the size of a large project by up to a third.
The libraries supplied with z88dk are designed to be as generic as possible, indeed it is possible to port to a new machine simply by supplying two library routines and some startup code. It is hoped that one day z88dk will support as many z80 based machines as there is information available and sufficient interest in. Currently z88dk supports more than twenty z80 targets with the level of library support for each target varying with interest shown by users.
Downtime this week
The server is due to undergo the dummy whammy of having an IP address and a power switchover at some point this week - either Wednesday or Thursday evening (BST).
During this time the forum and wiki will be unavailable. Nightly downloads should continue to be available.
sdcc has made chars unsigned by default rather than signed
Recently sdcc has changed its char type to be unsigned by default. For programs that expect signed chars this can lead to errors and warnings. Compiling with an additional command line flag "--fsigned-char" will cause sdcc to treat char as a signed type as was the default before the change. This affects the current zsdcc binary supplied by z88dk.
The reason for the change is that small uPs, including the z80, are better suited to unsigned types and use of unsigned char rather than signed char leads to faster and more compact code. The thinking is people who use "char" to declare variables are not consciously making a decision about whether "char" should be signed or unsigned. The C standard specifically states that whether char is signed or not is implementation defined. Portable C code should always use "signed char" or "unsigned char" to declare char-size variables.
zcc --c-code-in-asm for sdcc compiles
An option "--c-code-in-asm" for sdcc compiles will embed C code as comments in output assembly listings. With the recent change to using sdcc's preprocessor for sdcc compiles, the C code is correctly placed in the output asm listing.
There is potential for use of this option to cause compile errros when strings containing non-ascii characters are listed in the C code comments. The error arises because one of z88dk's tools, copt (a regular expression engine), is unable to deal with non-ascii character sets. You will still get the asm listing but binary generation will fail. To get the output binary in these cases, simply compile without this option enabled.
zcc +zx -vn -SO3 -clib=sdcc_iy --max-allocs-per-node200000 test.c -o test --c-code-in-asm --list
Among the generated files will be .lst files containing the asm output of the compiler with c code mingled in as comments.
sdcc binaries now packaged with z88dk nightly builds for win and mac
The nightly builds for windows and mac osx are now completely self-contained such that compilation using sdcc as C compiler no longer requires separate installation of sdcc. Necessary patches have been applied to z88dk's sdcc binary. As usual, the sdcc binary has been renamed from "sdcc" to "zsdcc" so that a z88dk install does not interfere with an sdcc install.
z88dk is also now using sdcc's preprocessor for C code rather than z88dk's native preprocessor. A side effect is line numbers for errors reported by sdcc are now correct.
New option "--list" has been added to zcc to generate list files when compiling binaries. The crt will be among the list files generated.
For windows or osx users you can simply replace your zcc binary with one from a nightly build. Other uses will have to recompile zcc from source to update.
Improved SDCC Compiles
A patch has been applied to z88dk's version of sdcc to make the peephole optimizer able to exactly determine register reference in instructions. In the current sdcc, hex constants and label names can sometimes be erroneously searched for register names which can affect whether peephole rules are applied or not. A fix in sdcc itself probably won't come until after its next release.
You can update your zsdcc executable in the usual way: http://www.z88dk.org/wiki/doku.php?id=temp:front#sdcc1
Also included in that package is an updated rules set. This rules set is regularly improved as we check the quality of code generated for test programs. The readme describes where it should be copied to.
z88dk v1.99A Released
The new version is available from sourceforge.
z88dk 1.99A 23.Dec.2015
Major changes incorporated into z88dk. This is a transition release in anticipation of v2.0.
Two C compilers are supported (sccz80 - z88dk's native C compiler - and sdcc).
Two different C libraries are present (classic - the same library as pre 1.99A - and new).
Accordingly, there are now three different compile modes:
1. Compile with sccz80 and the classic C library. This is equivalent to pre-1.99A.
2. Compile with sccz80 and the new C library. Compile lines include "-clib=new".
3. Compile with sdcc and the new C library. Compile lines include "-clib=sdcc_ix" or "-clib=sdcc_iy".
[z80asm] Sections have been introduced for generating memory maps and compiling to bankswitched memory.
[z80asm] Modern logical operators have been adopted.
z88dk v1.99A Release Candidate
The release candidate will be available for testing until December 23 when it will be replaced by an official release of v1.99A.
The download options are a binary win32 build, a binary mac osx build and a generic source tree for other platforms. Installation hints can be found here: http://www.z88dk.org/wiki/doku.php?id=t … tallation. Instructions for installing the MacOSX binary are missing so if a MacOSX user is able to submit those, it would be appreciated
z88dk has undergone some significant development in the past two years. The version number reflects this (v1.99) and anticipates a v2.0 when the development roadmap is completed.
Quite a lot and ..........
Nightly builds for Mac
I'm pleased to say that the build machine has been upgraded and is now generated Mac binary kits which can be grabbed from http://nightly.z88dk.org
Any feedback on them is much appreciated, I've not done much testing on them so it's possible the configuration isn't quite right.
If anyone has any other targets that they'd like built then let me know and if I can get a working toolchain, I can add them.
Apologies for the recent downtime - the server that z88dk.org is hosted on managed to drop off the network and it took a while to gain access to the cabinet to perform a server swapout.
The forums have now been migrated to the replacement server and hopefully things will start working again.
Not working (that I know of):
- Project hosting
- Mail list bridges
I'll update with more info as I fix things.
z88dk v1.10 bugfixed (v1.10.1 released)
z88dk v1.10 released
z88dk 1.10 is now uploaded to Sourceforge.
This snapshot aim is to consolidate all the past behaviour before trying to evolve the project seriously.
- [z80asm] Re-arranged and bugfixed
- [sccz80] Code generation size optimizations, in both standard mode and '-O3' mode
- [sccz80] Type conversion bugfixed (workaround on optimizer)
- [zcc] Skeleton to support the SDCC compiler engine (under development)
- [lib] Mono graphics lib improved and bugfixed
- [lib] simplified console input output bugfixed and optimized
- [lib] Turbo C conio and bgi emulation
- [lib] zx81, Spectrum and TS2068 console libs fixed and improved
- [lib] Sega SC3000: New target
- [lib] Memotech MTX: New target
- [lib] Canon X07: New target
- [lib] OSCA (v6z80p1): New target
- [lib] Sorcerer Exidy: New target
- [lib] SD memory card support code
- [lib] New stdio_new alternate code ready for substitution
- [appmake] New 'dumb' m ..........
z88dk v1.9 released
I think it's time we did this, so there's a new snapshot 1.9 of z88dk uploaded to Sourceforge. There's quite a few bug fixes in this release, there's quite a few changes, mostly improvements and bug fixes:
- [z80asm] Supports -I and -L directives to specify library and include paths
- [z80asm] the # include identify is no longer required
- [z80asm] Bug fixes for rabbit support
- [sccz80] Support for alternate assemblers
- [zcc] Support for alternate assembler/linkers
- [z80nm] Improvements and bug fixes
- [lib] MSX: Many improvements including lib32
- [lib] TRS80: New target
- [lib] Galaksija: New target
- [lib] CPC: Better handling of firmware calls and graphics support
- [lib] C128: Improvements
- [lib] strlcat and strlcpy are now available
- [lib] Many other improvements and bug fixes
...and probably a lot more things that I've forgotten.
As usual, documentation of the features supported ..........
z88dk v1.8 released
A little later than planned, we've released v1.8 of z88dk. Due to a lack of time, it's lacking in the major features that we originally planned, however the changes below are in this release:
- [sccz80] Bug fixes
- [cpp] DATE directive now outputs the date in a sensible format
- [lib] crt0: Different versions of the library are built to avoid index registers or alternate registers depending on the target
- [lib] A simple Xlib emulation has been imported and is available to ports with graphics capabilities
- [lib] CPC: Stability improvements
- [lib] ZX: Direct access to Opus Discovery is available
- [lib] ZX81: Stability improvements
- [lib] ZX81: High Res graphics are available
- [lib] ZX81: SP1 sprite package support
- [lib] TS2068: SP1 sprite package support
- [lib] Newbrain: fcntl support
- [lib] MSX: Improved support
- [lib] MSX: 1 bit sound
- [lib] ABC80: graphics
- [lib] TEST: New test target for ..........
z88dk v1.7 released
The first in our regular cycles of z88dk has been released. This release contains changes that have been applied over the past two years, including a number of new platforms, changes to the core libraries to make compiled programs smaller and faster and a large number of other changes. The details that can be remembered are listed below:
* [sccz80] Bug fixes, tweaks to single parameter function pointer calls
* [z80asm] Z80asm supporting Rabbit
* [zcpp] End of file fix for win32
* [zcc] -Cz flag to pass through to appmake
* [appmake] Support for most z88dk targets
* [lib/crt0] Support for Newbrain, Rabbit, Sega Master System SMS, TS2068
* [lib] Much of the library rewritten to use FASTCALL and CALLEE linkage for faster and small library function calls
* [lib] malloc library can now allocate from a scattered map of available RAM and supports multiple heaps
* [lib] balloc library introduced as a block memory allocator