SGetDriver
SpBlockPtr spBlkPtr ; address of 56-byte Slot Parameter Block
structure
SGetDriver loads the driver corresponding to the sResource designated by the slot number spSlot and the sResource list identification number spID into a
relocatable block on the system heap and returns a handle to it in spResult
( referenced by A0 in assembly language). Used only by the Operating System.
spBlkPtr is the address of a 56-byte Slot Parameter Block structure.
The relevant fields are as follows:
Out-In Name Type Size Offset Description
¨ spResult long 4 0 FUNCTION result
Æ sp sExecPBlk Ptr 4 20 Pointer to sExec parameter block Æ spID char 1 50 sResource list ID
Æ spExtDev char 1 51 ID of the external device
Æ spSlot char 1 49 Slot number
Other parameters affected include:
spSize long 4 8 Size of structure
spFlags char 1 54 Internal use only
noErr (0) No error
smEmptySlot (-300) No card in slot.
smCRCFail (-301) CRC check failed.
smFormatErr (-302) FHeader format is not Apple's
smRevisionErr (-303) The revision of the card's declaration ROM is wrong.
smNoDir (-304) Directory offset is NIL
smNosInfoArray (-306) The SDM could not allocate memory for the sInfo
array.
smResrvErr (-307) A reserved field of the declaration ROM was used.
smUnExBusErr (-308) An unexpected bus error occurred.
smBLFieldBad (-309) A valid ByteLanes field was not found.
smDisposePErr (-312) An error occurred during execution of DisposPointer.
smNoBoardSRsrc (-313) There is no board sResource.
smGetPRErr (-314) Error during execution of sGetPRAMRec.
smNoBoardId (-315) There is no board ID.
smInitStatVErr (-316) The InitStatus_V field was negative after Primary or
Secondary Init.
smInitTblVErr (-317) Error while trying to initialize the sResource Table.
smNoJmpTbl (-318) Slot Manager jump table could not be created smBadBoardId (-319) Board ID was wrong; reinit the PRAM record
Notes: The driver can come from either of two sources:
First, the sResource sLoad directory is checked for a Macintosh
sLoadRecord. If one is found, then the sLoad record is loaded into RAM and
executed.
Second, If no sLoad record exists, the sResource sDriver directory is
checked for an sDriverRecord. If one is found, then the sDriver record is
loaded into RAM.