Add SCSIStat()

This commit is contained in:
Laurent Vivier 2006-10-30 21:52:23 +00:00
parent c44daf1cd4
commit 6df85e6083
2 changed files with 20 additions and 0 deletions

View File

@ -27,6 +27,14 @@ enum {
scCompareErr = 6, /* Comparison error from scComp instruction */
};
enum {
scsiErrorBase = -7936
};
enum {
scsiBusy = scsiErrorBase + 49,
};
typedef struct TIB { /* Transfer Instruction Block */
short opcode; /* operation code */
int param1; /* 1st parameter */
@ -107,4 +115,15 @@ static inline OSErr SCSISelect(short targetID)
return ret;
}
static inline OSErr SCSIStat(void)
{
register OSErr ret asm("%%d0");
asm("clr.w -(%%sp)\n"
SCSIDispatch(_SCSIStat)
: "=d" (ret) :: UNPRESERVED_REGS );
return ret;
}
#endif /* __MACOS_SCSI_H__ */

View File

@ -77,6 +77,7 @@
#define _SCSIComplete 0x0004
#define _SCSIRead 0x0005
#define _SCSIWrite 0x0006
#define _SCSIStat 0x000A
#define SCSIDispatchSelector(a) " move.w #"#a", -(%%sp)"