Am 31.08.2013 22:21, schrieb Maarten Brock:
> 
> For the 8051 bank switching is handled by crtbank.asm. But the calls are
> generated by src/mcs51/gen.c. To add support for Z80 you'd have to modify
> src/z80/gen.c. There is also support needed in src/z80/main.c to
> compensate for the extra required stack space.

To anyone wanting to implement code bank switching for the Z80, I would
suggest to implement it for the Rabbits first, since they have special
call and return instructions for inter-bank calls.

> 
> Named address spaces can provide data memory bank switching.

Note that, while sdcc in many places handles code and constant data the
same, this is not true here: Named address spaces will work with
constant data.

> This is not
> implemented for 8051.

AFAIR the named address spaces do not require support in the back-end,
and should work with any port (but the function for switching between
banks has to be supplied by the user). I currently don't see how it
would be useful for the mcs51 though, unless someone uses custom bank
hardware to extend the memory space.

Philipp


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to