Previous Book Contents Book Index Next

Inside Macintosh: Devices /
Chapter 2 - Slot Manager / Slot Manager Reference
Low-Level Routines /


This function is used only by the Macintosh Operating System.

FUNCTION SPtrToSlot (spBlkPtr: SpBlockPtr): OSErr;
A pointer to a Slot Manager parameter block.
-->spsPointerPtrA pointer to a byte in declaration ROM.
<--spSlotSignedByteThe slot number.

The SPtrToSlot function returns the slot number of the card whose declaration ROM is pointed to by spsPointer. The value of spsPointer must have the form $Fsxx xxxx, where s is a slot number and x is a hexadecimal number.

The trap macro and routine selector for the SPtrToSlot function are
Trap macroSelector

On entry, register D0 contains the routine selector and register A0 contains the address of the Slot Manager parameter block. When _SlotManager returns, register D0 contains the result code.
Registers on entry
A0Address of the parameter block
Registers on exit
D0Result code

noErr0No error
smUnExBusErr-308A bus error occurred
smBadsPtrErr-346Bad spsPointer value

Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996