Jameco Electronics 3000 User Manual

Page of 349
User’s Manual
27
than the XPC segment, can call other code in the root using short jumps and calls. Code in 
the XPC segment can also call code in the root using short jumps and calls. However, a 
long call must be used when code in the XPC segment is called. Functions located in the 
root have an efficiency advantage because a long call and a long return require 32 clocks 
to execute, but a short call and a short return require only 20 clocks to execute. The differ-
ence is small, but significant for short subroutines.
Figure 3-5.  Use of XPC Segment
3.2.2  Separate I and D Space - Extending Data Memory
In the normal memory model, the data space must share a 64K space with root code, the 
stack, and the XPC window. Typically, this leaves a potential data space of 40K or less. 
The XPC requires 8K, the stack requires 4K, and most systems will require at least 12K of 
root code. This amount of data space is sufficient for many embedded applications.
One approach to getting more data space is to place data in RAM or in flash memory that 
is not mapped into the 64K space, and then access this data using function calls or in 
assembly language using the 
LDP
 instructions that can access memory using a 20-bit 
address. This greatly expands the data space, but the instructions are less efficient than 
instructions that access the 64k space using 16 bit addresses.
The Rabbit 3000 supports separate I and D or Instruction and Data spaces. When separate 
I and D space is enabled it applies only to addresses in the root segment or data segment. 
Separate I and D spaces mean that instruction execution makes a distinction between 
10000
E000
D000
Stack segment
Data segment
Root segment
short 
calls
returns
XPC=N
PC=F000+K
XPC=N+1
PC=E000+K+4
Illustration of sliding XPC window
 E000
 F000
Compiler notices that
code has passed F000.
Compiler inserts
long jump in code.
XPC segment