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 / Managing the Slot Interrupt Queue


SIntInstall

You use the SIntInstall function to install an interrupt handler in the slot interrupt queue for a designated slot.

FUNCTION SIntInstall (sIntQElemPtr: SQElemPtr; 
                      theSlot: Integer) : OsErr;
sIntQElemPtr

A pointer to a slot interrupt queue element record, described on page 2-28.
theSlot
The slot number.
DESCRIPTION
The SIntInstall function adds a new element to the interrupt queue for a slot. You provide a pointer to a slot interrupt queue element in the sIntQElemPtr parameter and specify the slot number in theSlot.

The Slot Manager calls your interrupt handler using a JSR instruction. Your routine must preserve the contents of all registers except A1 and D0, and return to the Slot Manager with an RTS instruction. Register D0 should be set to 0 if your routine did not service the interrupt, or any other value if the interrupt was serviced. Your routine should not set the processor priority below 2, and must return with the processor priority equal to 2.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro for the SIntInstall function is _SIntInstall ($A075).

You must set up register D0 with the slot number and register A0 with the address of the slot queue element. When _SIntInstall returns, register D0 contains the result code.
Registers on entry
A0address of the slot queue element
D0slot number
Registers on exit
D0Result code

RESULT CODES
noErr0No error

Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996