Figure5.1 sample scripts program, 2 nasm output file examples, Nasm output file examples – Avago Technologies LSI53C1010 User Manual

Page 140: Sample scripts program

Advertising
background image

5-2

The NASM Output File

Figure 5.1

Sample SCRIPTS Program

5.2 NASM Output File Examples

The code segments of the

.out

file discussed in this section correspond

to the example SCRIPTS program in

Figure 5.1

.

ARCH 825
ABSOLUTE Got_Selected = 0xA5
ABSOLUTE Not_Msg_Out = 0x11
ABSOLUTE Select_ID = 2
ABSOLUTE Command_Complete = 0x01
EXTERN ex_buf1
EXTERN ex_buf2
RELATIVE rel_buffer \

rel_buf1 = ??, \
rel_buf2 = 6{??}, \
rel_buf3 = ??

TABLE tbl_buffer \

tbl_buf1 = ??, \
tbl_buf2 = ??, \
tbl_buf3 = ??

ENTRY Start
ENTRY Send_CMD
ENTRY Send_DATA
Start:

SELECT ATN Select_ID, REL(Interrupt)
INT Not_Msg_Out, WHEN NOT MSG_OUT
MOVE 1, rel_buf1, WHEN MSG_OUT

Send_CMD:

MOVE 6, rel_buf2, WHEN CMD

Send_DATA:

MOVE FROM tbl_buf1, WHEN DATA_OUT
MOVE FROM tbl_buf2, WHEN DATA_OUT
MOVE FROM tbl_buf3, WHEN DATA_OUT
MOVE 1, ex_buf1, WHEN STATUS
MOVE 1, ex_buf1, WHEN MSG_IN
MOVE SCNTL2 & 0x7F to SCNTL2
CLEAR ACK
WAIT DISCONNECT
JUMP All_done

Interrupt:

INT Got_Selected

All_done:

INT Command_Complete

Advertising
This manual is related to the following products: