User`s manual
28 rabbit.com Rabbit Memory Organization
5.2.5 The Extended Memory Segment
This 8 KB segment from logical address 0xE000 to 0xFFFF is a sliding window into extended code and it
can also be used by routines that manipulate data located in extended memory. The xmem window uses up
only 8 KB of the 16-bit addressing space. While executing code the mapping is shifted by 4 KB each time
the code passes the halfway point in the 8 KB xmem window. The halfway point corresponds to the root
address 0xF000, or 60KB. On all Rabbit processors, up to 1 MB of code can be efficiently executed by
moving the mapping of the 8 KB window using special instructions that are designed for this purpose: long
call (LCALL), long jump (LJP) and long return (LRET). Dynamic C currently supports up to 1MB of code
using these instructions. The Rabbit 4000 processor allows up to 16 MB of code using new extended ver-
sions of these instructions: long long call (LLCALL), long long jump (LLJP), and long long return
(LLRET).
The xmem segment is a window into the physical address space. Using the appropriate segment register
(XPC or LXPC) any logical address in the range 0xE000 to 0xFFFF can be mapped to any address in the
physical address space. Consider the following examples:
WARNING: The XPC is used for addressing up to 1 MB, and the LXPC is used for addressing
up to 16 MB. Mixing the use of the XPC and LXPC is dangerous.
Please see Technical Note 202, “Rabbit Memory Management in a Nutshell,” for more details on how
memory mapping works on the Rabbit 2000 and Rabbit 3000. This document is available at: rabbit.com.
Table 5-2 Mapping Xmem Addresses
Segment Register Logical Address Mapping Equation Physical Address
XPC = 0xFE 0xE74F 0xFE000 + 0xE74F = 0x10C74F 0x10C74F
LXPC = 0x0FE 0xE74F 0x0FE000 + 0xE74F = 0x10C74F 0x10C74F
XPC = 0xF2 0xE000 0xF2000 + 0xE000 = 0x100000 0x100000
LXPC = 0xFF0 0xFFFF 0xFF0000 + 0xFFFF = 0xFFFFFF 0xFFFFFF