MOVE.W 2(A2),D0

Interface Rules for the SCSI Firmware

MOVE.W 2(A2),D0

STATUS WORD TO D0.

 

BTST

#15,D0

FINAL/INTERMEDIATE

STATUS?

BEQ

FINALSTAT

IF 0, THE RETURN IS A FINAL ONE.

******************************************************************

************

*THE FOLLOWING CODE CHECKS ALL ALLOWED INTERMEDIATE RETURN CODES.

*

CMP.B #$02,D0 WAITING FOR AN INTERRUPT? (BUS CLEAR) IF <EQ> THEN

BRA RET_OUT NO NEW COMMANDS TO SEND BECAUSE NO QUEUING

NECESSARY

*FOR MULTIPLE CALLERS, THE SCSI FIRMWARE QUEUES COMMANDS WHEN THE BUS IS

*BUSY.

*BECAUSE OF THIS REASON, NO COMMAND QUEUING IS NECESSARY IN THE DRIVER. IF

*THERE IS NO QUEUING IN THE DRIVER, THE DRIVER WILL NOT HAVE A NEW COMMAND

*TO SEND WHENEVER AN INTERMEDIATE OR FINAL RETURN OCCURS. THE COMMANDS ARE

*ALWAYS SENT AS THEY ARRIVE TO THE DRIVER.

*’RET_INT’ is the user’s code to handle the return from interrupt process.

ENDI

CMP.B #$04,D0

MESSAGE INTERPRETATION?

IF <EQ> THEN

 

BSR INTERPRET

INTERPRET IS A MESSAGE INTERPRETATION

ROUTINE

 

BRA RET_INT

 

ENDI

 

CMP.B #$06,D0

COMMAND RECEIVED FOR THE TARGET?

IF <EQ> THEN

 

BSR SERVCMD

SERVCMD IS TARGET ROLE COMMAND SERVICE

ROUTINE

 

BRA RET_INT

 

ENDI

 

5

5-11

Page 65
Image 65
Emerson MVME147 manual MOVE.W 2A2,D0