Z80 cross-compiler for Arcs?

Development tools discussion area.
Post Reply
pkersey
Posts: 207
Joined: Wed Feb 06, 2013 11:22 pm
Contact:

Z80 cross-compiler for Arcs?

Post by pkersey » Wed Dec 04, 2019 2:39 pm

Hello.

Are there any Z80 cross-compilers available that would run on an A5000, possibly A3020?

User avatar
daveejhitchins
Posts: 5194
Joined: Wed Jun 13, 2012 5:23 pm
Location: Newton Aycliffe, County Durham
Contact:

Re: Z80 cross-compiler for Arcs?

Post by daveejhitchins » Wed Dec 04, 2019 4:38 pm

There’s the Cross32 - I still have a few copies. See here and PM me if you’re interested.

Dave H :D
Parts: UM6502CE, GAL22V10D, GAL16V8D, AS6C62256A, TC514400AZ, WD1772, R6522, TMS27C512, AT28C256
Products: ARA II, ARA III, ABR, ATI, AP6, MGC, AP5 . . .
For a price list, contact me at: Retro Hardware AT dave ej hitchins DOT plus DOT com

User avatar
jgharston
Posts: 3755
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield
Contact:

Re: Z80 cross-compiler for Arcs?

Post by jgharston » Wed Dec 04, 2019 6:04 pm

I either use Z80 BBC BASIC running on !Z80Tube, or ZMac:
http://mdfs.net/Software/Z80/ZMac/

I typically use ZMac with a command line with an Obey build file such as:

Code: Select all

| Makefile for FastPrint
|
If "<ZMac$Dir>" = "" Then Error 0 !ZMac not seen
Set Here$Dir <Obey$Dir>
Echo Assembling
Run <ZMac$Dir>.ZMac -o <Here$Dir>.fastprn -x <Here$Dir>.fastprn/lst <Here$Dir>.fastprn1/asm
SetSpec <Here$Dir>.fastprn
ZX.BINtoTAP <Here$Dir>.fastprn <Here$Dir>.fastprn/tap fastprint
to build http://mdfs.net/Info/Comp/Spectrum/Prog ... stprn1.asm

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

pkersey
Posts: 207
Joined: Wed Feb 06, 2013 11:22 pm
Contact:

Re: Z80 cross-compiler for Arcs?

Post by pkersey » Sat Dec 07, 2019 5:15 pm

Thanks for the replies. :)

User avatar
jgharston
Posts: 3755
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield
Contact:

Re: Z80 cross-compiler for Arcs?

Post by jgharston » Sat Dec 07, 2019 10:10 pm

I've just re-read the thread, are you looking for, as you asked, a cross COMPILER, or a cross ASSEMBLER?

A compiler takes stuff that looks like main(a,b) { for (c=0; d++; c<d) { foo(); thing(c,a); } bar(b); } and converts it into a binary file that you can execute.

An assember takes stuff that looks like LD HL,&4000:LD D,H:LD E,L:INC D:LD (HL),0:LDIR:RET and converts it into a binary file that you can execute.

If you want a Z80 COMPILER for the Arc, you need to specify what language it compiles. The Z88 Development Kit compiles C and targets the Z80, and I believe it has been ported to RISC OS as it itself is written in fairly unexceptional C. The GNU gcc compiler has been ported to all sorts of platforms and has a target=Z80 module. I don't know of any compilers for other languages that target the Z80 and run on RISC OS.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

Post Reply