-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 31.05.2014 15:10, Alan Cox wrote: > On Sat, 31 May 2014 13:38:55 +0200 Ardillas del Monte > <ardillasdelmo...@gmail.com> wrote: > >> Hi, >> >> I'm trying to find some way of compiling C code for the Z380, >> with 32bit linear addressing. The Z380 is compatible with the >> Z80, so any Z80 compiler could be a good start point. > > I think not. The Z80 is a horrible processor for C because it > lacks proper stack relative addressing modes.
I disagree. sdcc supports targets that might be called horrible for C. But the Z80 is not one of them. The Z80 is okay; not pefect, but okay. It is not too hard to set up a frame pointer (as sdcc usually does in ix), and use it for accessing the stack. > > The simple fact you can do things like LD HL, (SP-30) totally > changes the way you generate code IMHO. Not really. You save the code for setting up the frame pointer at function entry, but otherwise the generated code is very similar. sdcc has backends for the Rabbit 2000, Rabbit 3000A and TLCS-90. These do have some instructions with stack-pointer-relative adressing, but in the sdcc source the backend is the same as the Z80 one (with a few if(TARGET_IS_TLCS90), etc) in there. Philipp -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iEYEARECAAYFAlOKw+EACgkQbtUV+xsoLprhTgCffSi1TspoiihKmy9qopAz+vSc v5kAn0Oxfmbs4gtELpnhhbouYyibi1Ze =VbOx -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ Time is money. Stop wasting it! Get your web API in 5 minutes. www.restlet.com/download http://p.sf.net/sfu/restlet _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user