Figure11.17 scripts source code–read label, 17 scripts source code–read label, 18 scripts source code–read_disconnect label – Avago Technologies LSI53C1010 User Manual

Page 262

Advertising
background image

11-12

Using the SCRIPTS Processor in Target Applications

Figure 11.17 SCRIPTS Source Code–Read Label

The

read_disconnect

label,

Figure 11.18

disconnects the device from

the bus and sets the Semaphore bit, which tells the interrupt service
routine it is disconnected.

Figure 11.18 SCRIPTS Source Code–read_disconnect Label

The

read_reconnect

label,

Figure 11.19

, performs reselection, moves

the identify message from the message in buffer, and jumps to send the
data.

read:

move scratchb0 to sfbr

;get identify message

jump rel(read_disconnect) if 0x40 and mask 0xbf;jump disconnect if

;disconnects are allowed

int read_access_medium

;interrupt to read data from
; medium

read_return:

move from data_buf, with data_in

;move the data out from the buffer

move scratchb1 to sfbr

;get the 'finished' flag

jump rel(tur) if 0x00

;jump to status and message
;if transfer done

move scratchb0 to sfbr

;get identify message

jump rel(read_disconnect) if 0x40 and mask 0xbf

;jump to disconnect if disconnects
;are allowed

move from save_pointers, with msg_in

;move out the save pointers
;message

call rel(msg_out_phase) if atn

;jump to message out if atn active

int read_access_medium

;interrupt to access medium

read_disconnect:

move from disconnect_msg, with msg_in

;move out the disconnect message

call rel(msg_out_phase) if atn

;jump to message out if atn active

move 0x20 to scntl1

;turns off the halt on parity
;error or atn

disconnect

;disconnect from the bus

move 0x10 to istat

;set the semaphore bit to say we
;are disconnected

int read_access_medium

;interrupt to read data from medium

Advertising
This manual is related to the following products: