Important: The information in this document is obsolete and should not be used for new development.
Chapter 2 - Mixed Mode Manager
This chapter describes the Mixed Mode Manager, the part of the Macintosh system software that manages the mixed-mode architecture of PowerPC processor-based computers running 680x0-based code (including system software, applications, and stand-alone code modules). The Mixed Mode Manager cooperates with the 68LC040 Emulator to provide a fast, efficient, and virtually transparent method for code in
one instruction set architecture to call code in another architecture. The Mixed Mode Manager handles all the details of switching between architectures.The Mixed Mode Manager is intended to operate transparently to most applications and other software. You need the information in this chapter only if
You do not need to read this chapter if you're simply writing 680x0 code that doesn't call external code modules of unknown type, or if you are writing PowerPC code that calls other PowerPC code using a procedure pointer. In these cases, any environment switching that might occur is handled completely transparently by the Mixed Mode Manager.
- you want to recompile your application into PowerPC code and your application passes the address of some routine to the system software using a reference of
typeProcPtr
- your application--written in either PowerPC or 680x0 code--supports installable code modules that might be written in a different architecture
- you are writing stand-alone code (for example, a VBL task or a component) that could be called from either the PowerPC native environment or the 680x0 emulated environment
- you are writing a debugger or other software that needs to know about the structure of the stack at any time (for example, during a mode switch)
To use this chapter, you should already be generally familiar with the Macintosh Operating System. See the books Inside Macintosh: Processes and Inside Macintosh: Memory for information about the run-time architecture of the 680x0 environment. You also need to be familiar with the run-time architecture of PowerPC processor-based Macintosh computers, as explained in the chapter "Introduction to PowerPC System Software."
- IMPORTANT
- This chapter describes the operation and features of the Mixed
Mode Manager and the 68LC040 Emulator as they exist in the
first version of the system software for PowerPC processor-based
Macintosh computers.This chapter begins by describing the mixed-mode architecture of PowerPC processor-
based Macintosh computers and the operations of the Mixed Mode Manager. Then it shows how to use the Mixed Mode Manager to call external code.
Chapter Contents
- About the Mixed Mode Manager
- External Code
- Procedure Pointers
- Mode Switches
- Calling PowerPC Code From 680x0 Code
- Calling 680x0 Code From PowerPC Code
- Using the Mixed Mode Manager
- Specifying Procedure Information
- Using Universal Procedure Pointers
- Using Static Routine Descriptors
- Executing Resource-Based Code
- Mixed Mode Manager Reference
- Constants
- Routine Descriptor Flags
- Procedure Information
- Routine Flags
- Instruction Set Architectures
- Data Structures
- Routine Records
- Routine Descriptors
- Mixed Mode Manager Routines
- Creating and Disposing of Routine Descriptors
- Calling Routines via Universal Procedure Pointers
- Determining Instruction Set Architectures
- Summary of the Mixed Mode Manager
- C Summary
Constants
- Data Types
- Mixed Mode Manager Routines