Z80 C compiler recommendations

David Given <dg@cowlark.com>
9 Jan 2005 20:53:27 -0500

          From comp.compilers

Related articles
Z80 C compiler recommendations dg@cowlark.com (David Given) (2005-01-09)
Re: Z80 C compiler recommendations jr.williams@tiscali.co.uk (John) (2005-01-12)
Re: Z80 C compiler recommendations Juergen.Kahrs@vr-web.de (=?ISO-8859-1?Q?J=FCrgen_Kahrs?=) (2005-01-12)
Re: Z80 C compiler recommendations paulrsm@buckeye-express.com (Paul R. Santa-Maria) (2005-01-12)
Re: Z80 C compiler recommendations dg@cowlark.com (David Given) (2005-01-14)
Re: Z80 C compiler recommendations josejuanmr@lycos.es (Jose Juan Mendoza Rodriguez) (2005-01-15)
| List of all articles for this month |

From: David Given <dg@cowlark.com>
Newsgroups: comp.compilers
Date: 9 Jan 2005 20:53:27 -0500
Organization: Cowlark Technologies
Keywords: C, question
Posted-Date: 09 Jan 2005 20:53:27 EST

I'm currently looking for an open-source Z80 C compiler that generates
good code. I'm wondering if anyone has any recommendations.

What I'd really like is gcc for the z80, but while there have been
numerous projects to do a port none of them have been
completed. There's an lcc port but lcc has dubious licensing and I
could never make it work properly. sdcc supports the z80, but I wasn't
impressed by the code.

Recently, I discovered that the Amsterdam Compiler Kit
(http://www.cs.vu.nl/vakgroepen/cs/ack.html) has been open sourced; it
will generate code for the PDP-11, VAX, 68000, SPARC, 8080, 8086,
80386, Z80, Z8000 and the NS16032, among others, and has frontends for
a number of different languages, including ANSI C and a C++ subset
(and Basic!), and in general looks rather good. However, the build
process is incredibly antiquated and very scary and I never actually
managed to get it installed properly, so I never got the multi-stage
optimiser to work, so I haven't been able to evaluate the code. Does
anyone have any experience of this? Is it worth persevering with?

The problem with the Z80 is that it's so incredibly CISC that
optimising for it requires lots of human effort. Most modern free
compilers do a decent job at optimising for RISC architectures, but
that can mostly be done generically, and so suck on the Z80. Sigh. It
could be worse, however; it could be a 8080, with three usable
registers... the best compiler I've found so far is Hitech C, except
that's not available (for free) as source, and I have to run it
self-hosted in a CP/M emulator.

Is there anything else I should look at? TenDRA? tcc? I'm not averse
to doing some work, including doing a rudimentary port, but I'd prefer
to use one done by someone who actually knows what they're doing.
+- David Given --McQ-+ "I never really understood how there could be
| dg@cowlark.com | things that would drive you insane just because you
| (dg@tao-group.com) | knew them until I ran into Windows." --- Peter da
+- www.cowlark.com --+ Silva

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.