Avago Technologies LSI53C1010 User Manual
Page 133

Assembler Declarative Keywords
4-13
Syntax
TABLE tablelabel \
label = data_specifier \
[, label = data_specifier...]
a data specifier is:
{byte_val [, byte_val]} or
count{byte_val | ??} or
ID{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. A count is any valid constant with a value
between 0 and 64 Kbytes.
Example
This example shows the typical use of the TABLE keyword.
NASM does not generate any output based on the TABLE
keyword. This example is a template for a data structure that will
be used in the driver program or in the SCRIPTS debugger.
NASM assembler syntax requires SCRIPTS statements to span
no more than one line. However, in the case of TABLE, this
would result in a very unreadable source code file. The following
example demonstrates the use of the logical line end character
(\). When this character is used, NASM appends the next line
to the end of the current line.
TABLE table_indirect\
stat_buf = {??},\ ;stat_buf = 1 byte
msg_in_buf= {??},\ ;msg_in_buf = 1 byte
data_buf = 512{??},\
R_data_buf = 512{??},\ ; read data buffer
W_data_buf = 512{0xaa},\ ; write data buffer
W_cmd_buf = {0x0A, 0x00, 0x00, 0x00, 0x01, 0x00}, \
R_cmd_buf= {0x08, 0x00, 0x00, 0x00, 0x01, 0x00}, \
dum_buf = 512{??},\
scsi_id = ID{??},\
select_id = ID{0x33, 0x00, 0x00, 0x00}
Description
Table indirect addressing allows a SCRIPTS program to be
placed in ROM and still allows the driver program to dynamically
specify different parameters for the BLOCK MOVE, SELECT, or
RESELECT instructions.