Figure11.13 scripts source code–recovery message, Figure11.14 scripts source code–test unit ready, 13 scripts source code–recovery message – Avago Technologies LSI53C1010 User Manual
Page 260: 14 scripts source code–test unit ready, 15 scripts source code–stopped_busy_tur command

11-10
Using the SCRIPTS Processor in Target Applications
If the target device goes into the Message In phase, a resulting exception
condition requires the target device to send some type of recovery
message to the initiator, as shown in
. These commands
indicate what the initiator must do next. The messages may include, but
are not limited to: Message Reject or Restore Data Pointers.
Figure 11.13 SCRIPTS Source Code–Recovery Message
Test Unit Ready,
, is the final sequence of commands for any
I/O. The SCRIPTS processor sends a status message, disconnects from
the SCSI bus, executes an interrupt on the fly, and goes back to the
wait_select
label to get ready for next command.
Figure 11.14 SCRIPTS Source Code–Test Unit Ready
The
stopped_busy_tur
,
, is the same as the Test Unit
Ready label. However, the SCRIPTS processor has been selected while
processing another command or has been issued a Stop command. If
the command is one the target device does not have to accept when
busy or stopped the device stops and sends back a busy status.
Figure 11.15 SCRIPTS Source Code–stopped_busy_tur Command
msg_in_phase:
move from msg_in_buf, with msg_in
;move a message to the initiator
int message_sent
;interrupt to determine what to do next
tur: ; (Test Unit Ready)
move from stat_buf, with status
;send out status byte
move from msg_in_buf, with msg_in
;send out message byte
move 0x20 to scntl1
;turns off the halt on parity error or atn
disconnect
;disconnect from the SCSI bus
intfly
;interrupt to signal end of process
jump rel(wait_select)
stopped_busy_tur:
move from stat_buf, with status
;send out status byte
move from msg_in_buf, with msg_in
;send out message byte
move 0x20 to scntl1
;turns off the halt on parity error or atn
disconnect
;disconnect from the SCSI bus
move scratcha1 to sfbr
;get the busy flag
int done_with_busy_command, if 0x01
;if busy, interrupt to continue
intfly
;interrupt to signal end of process
jump rel(stopped_busy_wait_select)