7 relative, Relative – Avago Technologies LSI53C1010 User Manual
Page 131

Assembler Declarative Keywords
4-11
code can be divided into different sections where one section would fit in
a limited space (such as SCRIPTS RAM) and the remaining code can
be stored elsewhere.
4.6.7 RELATIVE
Use RELATIVE to begin the definition of a data structure named
baselabel
with offsets into the buffer specified by the labels. It allows
the declaration of buffers to be positioned relative to one another. The
expression used is the offset from the start of the relative data area
where the buffer variable is located.
Syntax
PROC label:
Fields
label
is the name assigned to the SCRIPTS output array.
Examples
PROC Start:
Description
When a PROC keyword is used, the SCRIPTS output array in the
.out
file is given the name specified in
label
, overriding the
default name
SCRIPT
. If additional PROC statements are used in
the same SCRIPTS source file, NASM will create additional
output arrays in the
.out
file with the name specified in
label
for
each PROC statement.
Syntax
RELATIVE label = expression [, label = expression...]
or
RELATIVE baselabel \
label = data_specifier [, label = data_specifier...]
a data specifier is:
{byte_val [, byte_val]}
or
count{byte_val |??}
Fields
A byte_val is any valid constant with a value between 0 and
255. For example: 0x10 and 16 both represent a byte value of
16. Also, the special data value ‘??’ can be used to indicate
that a byte should be reserved, but that it should not be
initialized to a specific value. The SCRIPTS program does not
allocate memory; this is done by “C” code in the SCRIPTS
debugger or in the driver code. A count is any valid constant
with a value between 0 and 64 Kbytes.