Its got 16  8 bit registers with access to 64K of ram. (At least directly)
It has conditional branching and also a "stack" which is based off a "top"
internal register that holds the value of the top of the stack that you can
access to load and store it. (And also to initially set up the stack.)  It
also has very basic 16 bit support using pairs of registers.

I would say it's slightly similar to x86.

On Tue, Nov 10, 2020 at 11:59 PM Philipp Klaus Krause <p...@spth.de> wrote:

> Am 11.11.20 um 05:43 schrieb Bill Gaylord:
> > Hello,
> >    Is there any sort of straight forward guide to adding a new target to
> > SDCC?
> >    I am working on a homebrew CPU / System and want to "port" C to it.
> > (I already have a slightly above Assembly like language for it.)
> >
> >    If you could point me in the right direction that would be greatly
> > appreciated.
> >
> > Thanks,
> > William Gaylord
>
> What is your CPU like? How many registers are there? Does it have
> efficient stack acccess (.e.g via a stackpointer-relative addressing
> mode)? Is it a variant of an exisitng architecture (e.g. a Z80-like with
> a few instructions added or removed)?
>
> Have a look at the subdirectories for some existing ports:
>
> src/z80: This has all the compiler-side infrastructure for the classic
> Z80 and derivatives (Z180, Rabbit, etc). Many general-purpose registers.
> Locla variables go onto the stack accessed mostly via index registers.
>
> src/stm8: The STM8 port. A modern 8-Bit architecture with efficient
> stack access.  Few registers. Local variables on stack.
>
> src/pdk: The pdk13, pdk14 and pdk15 ports. A minimal architecture.
> Accumulator only (though SDCC uses an additional pseudo-register). Local
> variables by default not on stack due to lack of efficient stack access.
>
> Philipp
>
>
> _______________________________________________
> Sdcc-user mailing list
> Sdcc-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to