M20 Olivetti M20

Cross-programming for the Olivetti M20 using GCC


Christian Groessler maintains a particular version of the very well known GCC compiler, able to compile ANSI C programs to be run on an Olivetti M20 running PCOS. Here is what Chris writes on the user manual of the compiler:

This manual contains documentation for a Z8000 C and assembler development toolchain targeting the Olivetti M20 personal computer running the PCOS operating system.
The toolchain is based on a Z8000 port of the GNU C compiler (the one which comes with the eCos tools), the GNU binutils, and newlib.

The ability to program all resources of the Olivetti M20 in a modern environment with modern tools and a modern language open remarkable possibilities for the porting of existing applications and utilities and the writing of new software.

Download and install

This version of GCC can be installed on a Linux or MacOSX system. A few binaries are available here and on Chris' ftp site (ftp://ftp.groessler.org/pub/chris/olivetti_m20), but the manual contains a very detailed description of how to compile and install the toolchain on other operating systems (POSIX compliant). In the following table, we can find the manuals, the binary distributions as well as the digital signature (md5) files of the packages.

File: Language: Description:
z8kgcc.pdf (296 KiB) English The z8kgcc user manual in pdf.
z8kgcc.html (164 KiB) English The z8kgcc user manual in HTML.
z8kdoc-source.tar.gz (24 KiB) English LaTeX source code of the documentation.
z8kdoc-examples.tar.gz (4 KiB) English The source samples described in Chris' manual.
z8kgdb-jan-19-2009.tar.bz2.md5 (1 KiB) Source code of the debugger (message digest).
z8kgdb-jan-19-2009.tar.bz2 (10.4 MiB) Source code of the debugger.
z8kgcc-jan-19-2009-netbsd-4-0-ppc.tar.bz2.md5 (1 KiB) The binary distribution for NetBSD (message digest).
z8kgcc-jan-19-2009-netbsd-4-0-ppc.tar.bz2 (16.8 MiB) The binary distribution for NetBSD
z8kgcc-jan-19-2009-linux-fc9.tar.bz2.md5 (1 KiB) The binary distribution for Linux (message digest).
z8kgcc-jan-19-2009-linux-fc9.tar.bz2 (16 MiB) The binary distribution for Linux (compile on RedHat Fedora 9)
z8kgcc-jan-19-2009-freebsd-7-0-x86.tar.bz2.md5 (1 KiB) The binary distribution for FreeBSD 7.0 (message digest).
z8kgcc-jan-19-2009-freebsd-7-0-x86.tar.bz2 (15.3 MiB) The binary distribution for FreeBSD 7.0
z8kgcc-jan-19-2009-darwin-9-ub.tar.bz2.md5 (1 KiB) The binary distribution for Darwin 9 (MacOSX Leopard, message digest).
z8kgcc-jan-19-2009-darwin-9-ub.tar.bz2 (26.8 MiB) The binary distribution for Darwin 9 (MacOSX Leopard, universal binary PPC and Intel)
z8kgcc-jan-19-2009.tar.bz2.md5 (1 KiB) The compiler sources (message digest).
z8kgcc-jan-19-2009.tar.bz2 (10.4 MiB) The compiler sources

Demo and screenshots

Here are a few graphical examples written in C:

File Screenshot Description
lena.zip (24 KiB)


A 256*256 pixels dithered Lena image on the Olivetti M20. A graphic demo by Davide Bucci and Christian Groessler, written in C.
The Lena image is a Anti-Correlation Digital Halftoned version.
slideshow-0.9.zip (72 KiB)


A slideshow graphic demo by Christian Groessler, written in C.
The Lena image is a Anti-Correlation Digital Halftoned version. The Alfa 147 image comes from Alfa Romeo
The other photos are by Davide Bucci.
This version is more responsive to key presses and a simple effect to switch slides has been added. Call the program with the %e option, to enable the effect.
The effect is implemented twice, once in C and in assembler. The pre-compiled binary is compiled with the assembler version.
Use "make ASSEMBLER_EFFECT=1" to compile the asm version, by default the C version is built. This project is an example of mixing C and ASM code in a M20 cross-compile project.
Modern text adventures, by Davide Bucci Two Days to the Race Full-blown text adventures, compiled for the Olivetti M20 with z8kgcc.

Page Log

  • January 20, 2022: link to TDTTR removed, substituted to the link to the page describing TDTTR, TQF and SD text adventures.
  • February 23, 2019: added a link to Two Days to the Race.
  • October 13, 2009: first version of this page

RSS feedsRSS feeds

Search in the M20 site
Search in the Internet