User`s manual
50 rabbit.com The Rabbit BIOS
6.5.1.4 Origin Declaration Start and End Syntax
<start>
The non-terminal start is simply the terminal “#orgstart”. It must occur exactly once and must occur before
the end non-terminal. All origin declarations must follow this non-terminal.
<end>
The non-terminal end is simply the terminal “#orgend”. It must occur exactly once and must occur after
the start non-terminal. When the compiler encounters this non-terminal, it locks the definitions of the ori-
gins and performs final collision detection. All origin declarations must precede this non-terminal.
6.5.1.5 Origin Application Syntax
<orguse>
The orguse non-terminal specifies which region the compiler should use for the origin type corresponding
to name. The name non-terminal must be a previously declared origin. All occurrences of orguse must fol-
low orgend.
<action>
The action non-terminal specifies what action the compiler should take for the named origin and may be
the terminal “apply” or “resume”. The “apply” terminal signifies resetting the memory region, and should
be used with care since the compiler may have already generated code or data to the origin. The “resume”
terminal signifies switching to the origin with its state preserved before a previous orguse refocused the
compiler's attention.
The terminals “apply” and “resume” have no effect on a region of type “xvarorg”.
6.5.1.6 Origin Macro Declaration Syntax
<macdef>
The non-terminal macdef is the terminal “#orgdef” followed by the non-terminal define and signifies a
macro declaration based on an attribute of a previously declared origin. Although the compiler does not
force restrictions on where one may place a macdef, prudence dictates the placing them after orgend is the
logical choice in most cases.
<define>
The define non-terminal represents the assignment of an origin attribute to a specific macro name. The
non-terminal name must be a valid C macro identifier not previously declared. The orgval non-terminal
represents an origin attribute as explained below.
<orgval>
An orgval is the non-terminal name, which must be a previously declared origin, followed by an optional
non-negative integer, followed by the optional terminal "boundary", followed finally by the aspect non-ter-
minal. The optional integer specifies an origin fragment if the given origin is fragmented, otherwise the
compiler ignores it. A user must access fragments of an origin linearly as if they were elements of a C
array. Thus, one accesses the first fragment through index zero, and so forth. The optional terminal
"boundary" signals the compiler to return attributes that the origin had before it were fragmented or short-
ened by the declaration of any child origins.