Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Devices /
Chapter 3 - SCSI Manager / SCSI Manager Reference


SCSI Manager TIB Instructions

The transfer instruction block (TIB) is a data structure that you use to control the data transfer process. TIB structures are passed as parameters to the SCSIRead, SCSIRBlind, SCSIWrite, and SCSIWBlind functions. The transfer instruction block is defined by the SCSIInstr data type.

TYPE SCSIInstr = 
RECORD
   scOpcode:         Integer;    {operation code}
   scParam1:         LongInt;    {first parameter}
   scParam2:         LongInt;    {second parameter}
END;
The scOpcode field contains a value that specifies the operation to be performed. There are eight possible operations, known as TIB instructions, which carry out tasks such as moving data, looping, and address arithmetic. These instructions are described in this section. The operation codes for the TIB instructions are:

CONST
   scInc       = 1;     {transfer data, increment buffer pointer}
   scNoInc     = 2;     {transfer data, don't increment pointer}
   scAdd       = 3;     {add long to address}
   scMove      = 4;     {move long to address}
   scLoop      = 5;     {decrement counter and loop if > 0}
   scNop       = 6;     {no operation}
   scStop      = 7;     {stop TIB execution}
   scComp      = 8;     {compare SCSI data with memory}
To transfer data, you create a variable-length array of TIB instructions and pass a pointer to this array to any of the SCSI Manager data transfer functions (SCSIRead, SCSIRBlind, SCSIWrite, SCSIWBlind). These SCSI Manager functions interpret the TIB instructions and carry out the requested operations.

For an example of how to use TIB instructions, see "Using CDB and TIB Structures," beginning on page 3-17.

IMPORTANT
Before you call any of the SCSI Manager data transfer functions (SCSIRead, SCSIRBlind, SCSIWrite, or SCSIWBlind), you must first send a SCSI read or write command to the target using the SCSICmd function.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996