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. Z380 has stack pointer relative
addressing. It also has a lot of register banks. It may be able to run
Z80 code but its 'native' instruction set needs a very different compiler.

The simple fact you can do things like LD HL, (SP-30) totally changes the
way you generate code IMHO.

> But I was wondering whether SDCC has indeed some imposed design limitation
> for not allowing 32bit pointers, or if there's no such limitation.

SDCC has 24/32bit pointers on some things, at least for some far types.

> In other words, could the Z80 backend support 32bit pointers for full Z380
> support, or would that be an incompatible task with the SDCC design and
> concept?

You would I think want to treat it as a completely new compiler target -
different timings, different registers, different sizes, different
instruction set. That'll be true whatever compiler you use. Might be
easier to knock something up with one of the other compilers if you don't
need good quality code.

Probably even cheaper still to use a less zany processor 8)

If you are willing to go with a commercial solution then Zilog produced
"380-C" which ran under Windows. 

Alan

------------------------------------------------------------------------------
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

Reply via email to