User`s manual

52 rabbit.com The Rabbit BIOS
All code sections (rcodorg, xcodorg code and wcodorg) grow up. All non-constant data sections
(rvarorg) grow down. Root constants are generated to the rcodorg region when separate I&D space is
disabled. When separate I&D space is enabled, root constants are generated to the rconorg region.
xdata and xstring are generated to the current xcodorg region.
All origin directives must have a unique ANSI C identifier. The scope of this identifier is only with other
origin directives or declarations.
6.5.2.2 Defining a Memory Region
Each memory region is defined by calculating a physical address from an 8-bit base address (first constant-
expression of physical-address) and a 16-bit logical address (second constant-expression of physical-
address). The size of the memory region is determined by 20-bit size. Overflow of these three values is trun-
cated.
6.5.2.3 Action Qualifiers
The keywords apply and resume are action-qualifiers. They tell the compiler to generate code or data
in the memory region specified by identifier. An apply action resets the code or data pointer for the spec-
ified region to the starting physical address of the region and makes the region active. A resume action
does not reset the code or data pointer, but does make the memory region active.
A region remains active (i.e., the compiler will continue to generate code or data to it) until another region
of the same origin-type is activated with an apply or resume action or until the memory region is full.
6.5.2.4 I&D Qualifiers
The ispace and dspace qualifiers suppress compiler warnings regarding collisions between the two
logical regions and the physical memory space. When an ispace or dspace qualifier is used in an ori-
gin directive, that directive is no longer collision checked against origin directives in the other space. For
example, a rcodorg directive with the ispace qualifier is not checked against any origin directives
with a dspace qualifier.
6.5.2.5 Follow Qualifiers
The option follow-qualifier is best described with an example. First, let us declare yourcode in an origin
statement containing an origin-declaration. A follow-qualifier can only name a region that has already
been declared in an origin-declaration.
Table 6-3 Origin Types Recognized by the Compiler
Origin Type Keyword
root code rcodorg
xmem code xcodorg
watch code wcodorg
watch code wvarorg
root data rvarorg
root constants rconorg