Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Previous Book Contents Book Index Next

Inside Macintosh: Operating System Utilities /

Chapter 8 - Trap Manager

This chapter describes how your application can use the Trap Manager to augment or override an existing system software routine.

Although this chapter describes patching in some depth, you should rarely, if ever, find a need to use patches in an application. The primary purposes of patches, as their name suggests, are to fix problems and augment routines in ROM code.

To use this chapter, you should have some knowledge of assembly language. For information about the instruction sets of microprocessors in the Motorola MC680x0 family, see the appropriate user's manual, for example, the MC68020 32-Bit Microprocessor User's Manual.

This chapter describes how the Trap Manager works and then shows how you can use the Trap Manger to

Chapter Contents
About the Trap Manager
Trap Dispatch Tables
Process for Accessing System Software Routines
Patches and System Software Routines
Daisy Chain of Patches
Head Patch (Normal Patch)
Tail Patch
Come-From Patch (Used Only by Apple)
Patch for One Application
Patch for All Applications
A-Line Instructions
A-Line Instructions for Operating System Routines
Calling Conventions for Register-Based Routines
Parameter-Passing Conventions for Operating System Routines
Function Results
Flag Bits
A-Line Instructions for Toolbox Routines
Calling Conventions for Stack-Based Routines
Parameter-Passing Conventions for Toolbox Routines
Function Results
The Auto-Pop Bit
About Trap Macros
About Routine Selectors
Using the Trap Manager
Determining If a System Software Routine is Available
Patching a System Software Routine
Trap Manager Reference
Accessing Addresses From the Trap Dispatch Tables
Installing Patch Addresses Into the Trap Dispatch Tables
Detecting Unimplemented System Software Routines
Manipulating One Trap Dispatch Table (Obsolete Routines)
Summary of the Trap Manager
Pascal Summary
Data Types
C Summary
Data Types
Assembly-Language Summary
Trap Macros

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996

Get information on Apple products.
Visit the Apple Store online or at retail locations.

Copyright © 2004 Apple Computer, Inc.
All rights reserved. | Terms of use | Privacy Notice