beautypg.com

Avago Technologies LSI53C1010 User Manual

Page 230

background image

9-32

SCRIPTS Programming Topics

2.

Give the internal and external SCRIPTS programs unique array
identifiers by using the PROC statement at the beginning of each so
that both can be linked into a driver.

The compiler generates the SCRIPTS arrays without the default
SCRIPTS name.

3.

Compile both source files with the

-p

option instead of the

-o

option.

This prevents generation of data structures which share common
names between the two files, causing a ‘C’ compile time conflict with
both files being linked into a driver.

4.

Use absolute jumps between the internal and external SCRIPTS
routines and use EXTERNs as the destination address variable.

This patches the proper jump address after the base addresses of
both SCRIPTS programs have been established at run time.

5.

Define any labels being jumped to from the opposite SCRIPTS
program as entry points with the ENTRY declarative.

This causes the compiler to provide the proper offset information in
the compiled output file so that physical addresses can be resolved
at run time.

6.

Assign unique names to all labels, externs, and relative buffers in
each SCRIPTS program to prevent ‘C’ compile time conflicts.

7.

Use the REL modifier to process all jumps that move within the same
SCRIPTS program.

8.

Use RAMFIX to process the file that contains the internal SCRIPTS
program to eliminate any other conflicts between the two files.

The RAMFIX utility can be downloaded from the LSI Logic BBS.

Figures 9.12

through

9.15

are the internal and external

SCRIPTS.LIS

and

.OUT

files, and illustrate the interactions between the two. Certain parts

of the program text appear in bold type to highlight the coding differences
when both internal and external RAM are used for SCRIPTS program
storage. The numbered notes at the end of each example program
reference numbered items in the far left column of the program text.

This manual is related to the following products: