Home

Awesome

Z88DK - The Development Kit for Z80 Computers

WinXP+ MacOSX Linux and Other

Z88DK is a collection of software development tools that targets the 8080 and z80 family of machines. It allows development of programs in C, assembly language or any mixture of the two. What makes z88dk unique is its ease of use, built-in support for many z80 machines and its extensive set of assembly language library subroutines implementing the C standard and extensions.

INSTALLATION

There are several ways to install z88dk.

  1. Use the Most Recent Official Release. Follow these installation instructions.
  2. Get the Nightly Build. Every night we build complete binary packages for Windows and MacOS and generate source packages for everyone else. The simple installation instructions should be followed. Using a nightly build means you can keep up with bugfixes and new features rather than having to wait an entire year for a release to occur.
  3. Use the Snap package on Linux
  4. Use the Docker image
  5. Use GitHub and build it yourself. The z88dk repository uses git submodules, these are not automatically downloaded by git by default so you will have to either adjust your clone line, or retrieve them manually. To clone with submodules use git clone --recursive https://github.com/z88dk/z88dk.git. To add the submodules to an already existing clone use git submodule update --init --recursive. To build, the following instructions should be followed.

The Tools

The front end of z88dk is called zcc, it is this that you should call if you want to do any compilations. It can process C files (.c) , preprocessed C files(.i), compiled C files (.asm), optimised compiled file (.opt) or assembled files (.o), any combination of them can be mixed together and the relevant processes will be done on them. Also processing of a file list is supported, with processing of each file done in turn (i.e. preprocess, compile, optimise, assemble), and at the end all processed files may be linked into a correctly formatted single executable if desired.

It is not typically necessary for a new user (or for an established platform) to need to use the other tools individually.

Many tools have a z88dk- prefix to distinguish them from tools from other packages that may be installed with the same name. The documentation generally omits the prefix when referring to them.

These tools are not normally directly invoked by the user:

Benchmarks

The assembly language libraries supplied by z88dk give it performance advantages over other z80 compilers. For details please look at the Benchmarks section in the Wiki.

Using cmake to build z88dk projects

CMake can be used to build Z88DK projects (a toolchain is provided). Please refer to CMake wiki.

Using z88dk

Some things to know:

When you form a compile line you must decide which compiler you will use and which c library you will link against. You will make that decision based on which targets you want to compile for and what features you need.

The classic c library is z88dk's main c library and has crts that allow generation of programs for over 100 different z80 family machines. The level of support for each is historically determined by user interest. Documentation begins here and example programs can be found in z88dk/examples with compile lines most often appearing at the top of .c files. Over time it has replaced non-standard implementations with those that exist with new library.

The new c library was z88dk's rewrite aiming for a large subset of C11 conformance. The bulk of the standard library has now been incorporated into classic, however it still supports some targets not supported by classic: hbios, rc2014, scz180, yaz180 as well as some incorporating 3rd party libraries for some duplicated targets: sega master system, zx spectrum, and zx spectrum next. Additionally, a bare bones target for the z180, z80 can be used to compile programs for any z80 machine. Documentation begins here and example programs can be found in z88dk/libsrc/_DEVELOPMENT/EXAMPLES with compile lines most often appearing at the top of .c files.

Quick links

Z88DK Home Page Includes a link to the nightly builds where you can get an up-to-date package.

Install Instructions

Bug Reporting

Introduction to Compiling Using the Classic C Library Examples in z88dk/examples

Introduction to Compiling Using the New C Library Examples in z88dk/libsrc/_DEVELOPMENT/EXAMPLES

Using z88dk with the rc2014 target, covers cpm, hbios, and rc2014 subtypes.

Using z88dk with zx, covers the zx target, and by extension the zxn target.