beautypg.com

Avago Technologies LSI53C1010 User Manual

Page 146

background image

5-8

The NASM Output File

Where

name

is the name of the Relative buffer, for example

rel_buf1

,

and

offset

is the relative offset of this buffer from the beginning of the

entire Relative buffer. For example, in the above SCRIPTS example

rel_buf2

has an offset of 0x00000001L, indicating that it starts one byte

from the beginning of the Relative buffer.

The final part of the Relative record is the offset array which lists the
Dword offsets in the SCRIPTS array where each individual relative buffer
is used. It is the same as the offset array used for External buffers,
except that the array names are of the format

R_name_Used

where

name

is the name of the individual relative buffer.

#define R_name_Used offset

The last two sections of the Relative record, Relative Buffer Record and
Offset Array, are repeated for every Relative defined in the SCRIPTS
program.

Command line switches also effect Relative. Using the

-o

compiler option

includes all items mentioned above in the output file. Using the

-p

, partial

‘C’ output option, omits the Relative Header Record and Relative Patch
Array from the output file. An example of the output generated using
each compiler option is listed below.

Example using

-o

assembler option:

#define Rel_Count 2
ULONG Rel_Patches[Rel_Count] = {

0x00000007L,
0x00000005L

};
#define R_rel_buf1 0x00000000L
ULONG R_rel_buf1_Used[] = {

0x00000005L

};

#define R_rel_buf2 0x00000001L
ULONG R_rel_buf2_Used[] = {

0x00000007L

};

Using -p assembler option:

#define R_rel_buf1 0x00000000L
ULONG R_rel_buf1_Used[] = {

0x00000005L

This manual is related to the following products: