Home/Support/Support Forum/Rabbit 4000 instructions in Rabbit 3000 mode?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Rabbit 4000 instructions in Rabbit 3000 mode?

0 votes
The Rabbit 4000 (and above) has a Rabbit 3000 compability mode (bits 7:6 of EDMR register).

When in Rabbit 3000 mode, the Rabbit 4000 uses the Rabbit 3000 main page of instructions. Clearly, Rabbit 4000 instructions ont he main page and on 0x7f page are not available.

However, I wonder if a Rabbit 4000 in Rabbit 3000 mode can use Rabbit 4000 instructions that do not conflict with Rabbit 3000 instructions, e.g. cp hl, de on the 0xed page.
asked Sep 8, 2020 in Rabbit by spth New to the Community (24 points)

Please log in or register to answer this question.

2 Answers

0 votes
Best answer
In Rabbit 3000 mode (EDMR bits 7:6 00), the Rabbit instructions on the dd, ed, fd and cb pages are available.

In undocumented modes 01 and 10, some more Rabbit 4000 instructions are available. For more details see the section "Instruction sets" on https://sourceforge.net/p/sdcc/wiki/Rabbits/
answered Nov 8, 2020 by spth New to the Community (24 points)
0 votes
If it isn't spelled out in the Rabbit 4000 Microprocessor User's Manual (https://www.digi.com/resources/documentation/digidocs/PDFs/019-0152_N.pdf), you will need to do some testing to verify one way or the other.

You can use the "db" keyword to insert a series of bytes into a #asm block and then check the outcome of running them on a Rabbit 4000 in the two modes and possibly compare to running them on a Rabbit 3000.
answered Sep 8, 2020 by TomCollins Veteran of the Digi Community (2,222 points)
To me, the manual is unclear on that.
But I'd prefer to get an official statement (or better yet a clarification in the manual). Even if I find it happens to work for some instructions, I still couldn't be sure if that is intentional vs. an "undocumented feature".
A quick test I did using ld bcde, (hl) indicates that at least that instruction works in Rabbit 3000 mode.