Figure7.3 scripts table declaration, Figure7.4 creating table indirect entry offsets, Scripts table declaration – Avago Technologies LSI53C1010 User Manual
Page 170: Creating table indirect entry offsets
![background image](https://www.manualsdir.com/files/864554/content/doc170.png)
7-4
Integrating SCRIPTS Programs into “C” Language Drivers
Figure 7.3
SCRIPTS Table Declaration
7.1.2.2 Creating Table Indirect Entry Offsets
The “C” code example in
sets up a table that can be used with
the table indirect addressing mode. Each entry in the table is a pair of
32-bit values. These entries reference the same buffers as the SCRIPTS
code examples above. For more illustration on the relationship between
these pieces of code, refer to
Section 7.1.2, “Table Indirect Operations.”
For this SCRIPTS program to work correctly, the table must start on a
Dword boundary and the offset labels must be in the same order as in
the SCRIPTS table declaration.
Figure 7.4
Creating Table Indirect Entry Offsets
TABLE dsa_table \
sendmsg = ??, \
rcvmsg = ??, \
cmd_adr = ??, \
device = ID{??}, \
status_adr = ??, \
ext_buf = ??, \
sync_in = ??, \
data_adr = ??
/* The following definition sets up a table that can be
used with the LSI53C8XX table indirect addressing mode.
Each entry in the table is a pair of 32 bit values. For
the SCRIPTS routine to work correctly the table MUST start
on a word boundary and the offset labels must be in the
same order in the SCRIPTS table declaration. */
enum offsets {
SENDMSG = 0,
RCVMSG,
CMD_ADR,
DEVICE,
STATUS_ADR,
EXT_BUF,
SYNC_IN,
DATA_ADR, /* DATA_ADR must be last buffer.
};