Rabbit 4000/5000 support

New features and project activity between releases
Post Reply
User avatar
dom
Well known member
Posts: 2317
Joined: Sun Jul 15, 2007 10:01 pm

Rabbit 4000/5000 support

Post by dom »

Following another heroic effort from Paulo, Rabbit 4000/5000 support has been added to z88dk.

The 4000 was a follow up on the 3000 adding two sets of 32 bit index registers, new 16 bit registers (jk and jk') and the ability to operate on 32 bit register pairs (jkhl and bcde) as well as bunch of new addressing modes and few hundred new instructions. On startup the instruction set is backwards compatible with the 3k, but a hardware register is available to turn on the 4k features.

The increasingly inaccurately named z80asm, z88dk-dis and z88dk-ticks support the -mr4k flag for assembling, disassembling and running 4000 code respectively.

The +test target has a -clib=rabbit4k option to allow compiling for the 4000. It should be possible to use sdcc as well. It should be noted that neither compiler makes use of the extra features of the 4000. The library may in future take advantage (but see below)

During this work, z88dk-ticks had a bit of a cleanup as well (it's no longer a single 5000 line switch statement!) and it's a lot easier to add support for unimplemented instructions. These all now have placeholders and across all the CPUs there's about 130 or so (search for UNIMPLEMENTED) - most of them are block instructions. If anyone is at a loose end, contributions are welcome!

I know the Rabbit is somewhat of a niche target (and that's saying something given some of the hardware we support) but I hope this of use to someone.
Post Reply