REGISTER

Use the REGISTER directive to assign one of the EPPC processor's non-volatile registers to a user-defined small data section.

REGISTER(nn [ , limit])
  
Parameter

nn

Specifies one of the predefined small data base registers, a non-volative EPPC register, or any of the following values:

This "register" value instructs the linker to treat relocations that refer to objects in your small data section as non-small data area relocations. These objects are converted to near absolute relocations, which means that the objects referenced must reside within the first 32 KB of memory. If they do not, the linker emits a "relocation out of range" error. To fix this problem, rewrite your code such that the offending objects use large data relocations.

limit

Specifies the maximum size of the small data section to which register nn is bound. This value is the size of the initialized and uninitialized sections of the small data section combined. If limit is not specified, 0x00008000 is used.

Note: Each small data section you create makes one less register available to the compiler; it is possible to starve the compiler of registers. As a result, create only the number of small data sections you need.