Echelon Neuron Bedienungsanleitung Seite 145

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 237
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 144
DATA.B (Reserve Initialized Memory)
The DATA.B directive is used to reserve memory and initialize the reserved
memory to specific values.
See also RES (Reserve Uninitialized Memory).
Syntax:
The DATA.B directive requires an expression, or a list of expressions separated
by commas. A label is optional.
DATA.B expr
DATA.B expr, expr, ...
label DATA.B expr
label DATA.B expr, expr, ...
The assembler reserves a block of data with a size, in bytes, that matches the
number of expressions in the argument, and initializes each byte to the
corresponding expression's value.
The expr expression can have one of the following forms:
A numeric expression with a value in the range 0..255. Each number,
which can be a constant of a symbolic expression resolved by the linker,
represents one byte of initialized data. For example:
DATA.B h’12, h’34, h’56
A double-quoted string argument that represents a number of bytes equal
to the number of characters in the string (there is no zero termination
byte). Each character represents one initialized data byte. Because a
string has no implicit termination byte, a single character string in a
DATA.B directive is the same as an ASCII character constant. For
example:
DATA.B “The quick brown fox”
A pointer expression consists of the PTR keyword followed by an
expression. For example:
DATA.B PTR expr
The expr expression is interpreted as a two-byte constant, and can have
values in the range 0..65535. The expression is a general expression, and
can be any combination of relocatable symbols, imported or exported
symbols, and any applicable operations defined for expressions.
Examples:
The following example defines a look-up table of three constant bytes:
SEG CODE
ORG
APEXP %lookupTable
Neuron Assembly Language Reference 135
Seitenansicht 144
1 2 ... 140 141 142 143 144 145 146 147 148 149 150 ... 236 237

Kommentare zu diesen Handbüchern

Keine Kommentare