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 2 - Slot Manager / Slot Manager Reference
Slot Manager Routines / Accessing Expansion Card Parameter RAM


SReadPRAMRec

You can use the SReadPRAMRec function to read the parameter RAM information for a particular slot.

FUNCTION SReadPRAMRec (spBlkPtr: SpBlockPtr): OSErr;
spBlkPtr
A pointer to a Slot Manager parameter block.
-->spSlotSignedByteThe slot number.
-->spResultPointerA pointer to an SPRAMRecord data structure (described on page 2-27).
XspSizeLongInt 

DESCRIPTION
The Macintosh Operating System allocates one SPRAMRecord data structure for each slot in the system parameter RAM. The Slot Manager initializes this structure with the data from the sPRAMInit record on the firmware of the expansion card. The SReadPRAMRec function provides a copy of this information to your application.

You specify the slot number in the spSlot field of the Slot Manager parameter block you point to in the spBlkPtr parameter. You must also allocate a SPRAMRecord data structure and store a pointer to it in the spResult field. The SReadPRAMRec function copies the appropriate parameter RAM information into this data structure.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for the SReadPRAMRec function are
Trap macroSelector
_SlotManager$0011

You must set up register D0 with the routine selector and register A0 with 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
D0$0011
Registers on exit
D0Result code

RESULT CODES
noErr0No error
smEmptySlot-300No card in this slot
SEE ALSO
For more information about the sPRAMInit record, see Designing Cards and Drivers for the Macintosh Family, third edition.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996