Avago Technologies LSI53C1010 User Manual
Page 144

5-6
The NASM Output File
#define Ext_count count
Where
count
is defined as number of external variables. Second is a
character array of all external names used:
char *External_Names[Ext_Count] = {
“dsa_storage”,
“in_offset”,
“out_offset”
};
Third is a list of External Contents Records:
#define E_name offset
Where
name
is the name of the variable and
offset
is defined as the
byte offset from the beginning of the data area. It is always zero for
externals.
Following this is an array of unsigned longs named by appending
“_Used” to the variable name. This array is a list of Dword offsets from
the beginning of the SCRIPTS array where the variable is used and
should be patched.
#define E_name_Used offset
The last two sections (External Contents Record and Offset Array) of the
External record are repeated for every External defined in the SCRIPT.
The output depends on which command line switches are selected. If the
-o
compiler option is used then all items mentioned above are included
in the output file. If the
-p
(partial ‘C’ output) option is used then the
External Header Record and Character Array are omitted from the output
file. An example of the output generated using each compiler option is
listed below.
Example using
-o
assembler option:
#define Ext_Count
2
char *External_Names[Ext_Count] = {
“ex_buf2”,
“ex_buf1”
};
#define E_ex_buf1 0x00000000L
ULONG E_ex_buf1_Used[] = {
0x0000000FL,