User`s manual

32 rabbit.com Rabbit Memory Organization
5.3.2.1 Compiling to RAM
For RAM compiles, all banks (quadrants) are mapped to RAM. In a 20-bit physical address space (i.e.,
1 MB physical address space), a 512 KB memory would be mapped with the lower 256 KB mapped to
banks 0 and 2. The higher 256 KB are mapped to banks 1 and 3. In this configuration, A16 is inverted to
provide access to the constants and data starting at the 64K boundary. The standard configuration is to set
the SEGSIZE register to 0xDD so that the base segment occupies the entire 52 KB region up to the stack
segment. Note that this configuration causes the DATASEG register to be irrelevant.
The BIOS sets the MMIDR to 0x21. Bit 5 of this register enables the instruction/data split and bit 0 causes
the inversion of A16.
Figure 5-4 RAM Compile Memory Mapping
Instruction
Data
Shared
0x00000
0x03000
0x0D000
0x10000
0x13000
0x1D000
Root Code
Xmem Code
Root Constants
Root Data
Xmem Code
continued,
xalloc, Stacks
RAM
Root Code
Root Data
Constants
Xmem
Stack
0xD000
0xE000
0xFFFF
0x0000
0x3000
0xCFFF
0xCFFF
0x3000
0x0000
Register Settings
MECR = 0x0
MMIDR = 0x21
SEGSIZE = 0xDD
DATASEG = 0x0 (irrelevant)
0xFFFFF