![Interface Rules for a Single Caller](/images/new-backgrounds/105596/105596133x1.webp)
Interface Rules for the SCSI Firmware
* RESTORE REGISTERS FOR SCSI ROUTINE
5 |
*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 | Store on the stack | ||
for MOVEM |
|
|
|
|
|
|
|
| instruction. |
| DBRA | D0,RSTRLOOP |
| |
| MOVEM.L | 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