User`s manual

Rabbit 4000 Designer’s Handbook rabbit.com 51
<aspect>
The aspect non-terminal represents an individual aspect of an origin. This non-terminal may be one of
three things. It may be the "size" terminal, in which case the compiler assigns the size of the origin in bytes
to the macro. It may be the "fragments" terminal, wherein the compiler will assign the number of frag-
ments within the origin to the macro. Lastly, it may be the non-terminal quality followed by position as
explained below.
<quality>
This non-terminal specifies a quality of a particular boundary, and may be any of the terminal symbols
"physical", "logical", or "segment". Each correspond to the physical address, logical address, and segment
value respectively of the origin boundary in context. If the origin is not a logical origin, then the segment
and logical terminals will represent the physical boundary converted to an xxx:Exxx address type.
<position>
The position non-terminal is either "start" or "end", and represents the beginning or end respectively of the
origin in context.
6.5.2 Origins Prior to Dynamic C 10.21
The following grammar (in BNF) describes the syntax used for the declaration of origin statements prior to
Dynamic C version 10.21.
origin-directive : #origin-type identifier origin-designator
origin-designator : action-expression | origin-declaration
origin-declaration : physical-address size [follow-qualifier][I&D-qualifier][action-qualifier]
[debug-qualifier]
origin-type: rcodorg | xcodorg | wcodorg | wvarorg | rvarorg | rconorg
follow-qualifier : follows identifier [splitbin]
I&D-qualifier : ispace | dspace
action-qualifier : resume | apply
size : constant-expression
physical-address : constant-expression constant-expression
The non-terminals, identifier and constant-expression, are defined in the ANSI C specification. Basically,
an identifier is a sequence of letters and digits that must start with a letter. The underscore character is
considered a letter. The definition of constant-expression is more involved as it winds up the restricted
subset of operators that are allowed in the evaluation of the expression, but the result is a constant. For a
comphrensive definition of the non-terminals, identifier and constant-expression, please refer to
Appendix A in “The C Programming Language” by Kernighan and Ritchie.
6.5.2.1 Origin Directive Semantics
An origin directive associates a code pointer and a memory region with a particular type of code. The type
of code is specified by #origin-type.