mirror of
https://github.com/vivier/EMILE.git
synced 2024-11-14 22:04:43 +00:00
Add SCSIStat()
This commit is contained in:
parent
c44daf1cd4
commit
6df85e6083
@ -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__ */
|
||||
|
@ -77,6 +77,7 @@
|
||||
#define _SCSIComplete 0x0004
|
||||
#define _SCSIRead 0x0005
|
||||
#define _SCSIWrite 0x0006
|
||||
#define _SCSIStat 0x000A
|
||||
|
||||
#define SCSIDispatchSelector(a) " move.w #"#a", -(%%sp)"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user