Emerson MVME147 Computer Hardware User Manual


 
Interface Rules for the SCSI Firmware
5-13
5
* RESTORE REGISTERS FOR SCSI ROUTINE
* The driver must restore the registers the SCSI firmware has used.
* A3 is pointing to a list of the registers to restore.
* The following code is for 68010 or newer processor and could be more
* efficient if more advanced processor as 68020, 68030 is used.
* Entry: A3 = Pointer to register list of registers to
* restore.
* Exit: Back to caller.
RESTORE_REG:
MOVE.L #14,D0 Number of longwords to move
= 15.
ADDA.L #60,A3 Start from bottom
of register
list.
RSTRLOOP MOVE.L -(A3),-(SP) Store on the stack
for MOVEM
instruction.
DBRA D0,RSTRLOOP
MOVEM.L (SP)+,D0-D7/A0-A6 Restore registers.
REST_OUT RTS
END
******************************************************************
************
Interface Rules for a Single Caller
You can use the same rules as provided for multiple callers. By doing so, a
second or third caller may later be added without the necessity of modifying
the initial caller routine. By using the rules for multiple callers, a user also
expects the firmware to do more work than would otherwise have to be done