Avago Technologies LSI53C1010 User Manual
Page 181
Running a SCRIPTS Program
7-15
Figure 7.9
General.ss SCRIPTS Source File (Cont.)
; After every data transfer add 8 to data_adr. This allows
; scatter/gather operations when the list of addresses to
; read or write is appended to the end of the buffer_table.
1
dataout:
MOVE FROM data_adr, WHEN DATA_OUT
MOVE MEMORY 4, out_offset, scratch_adr
CALL REL(addscratch)
MOVE MEMORY 4, scratch_adr, out_offset
JUMP REL(switch)
2
datain:
MOVE FROM data_adr, WHEN DATA_IN
MOVE MEMORY 4, in_offset, scratch_adr
CALL REL(addscratch)
MOVE MEMORY 4, scratch_adr, in_offset
JUMP REL(switch)
addscratch:
MOVE SCRATCHA0 + 8 to SCRATCHA0
MOVE SCRATCHA0 to SFBR
JUMP REL(ck_carry), IF 0x00
RETURN
ck_carry:
MOVE SCRATCHA1 + 1 to SCRATCHA1
RETURN
end:
MOVE FROM status_adr, WHEN STATUS
INT err5, WHEN NOT MSG_IN
MOVE FROM rcvmsg, WHEN MSG_IN
MOVE SCNTL2 & 0x7f to SCNTL2 ;expect disconnect
CLEAR ACK
WAIT DISCONNECT
INT ok
resel:
INT err6
select_adr:
INT err7