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: Mac OS Runtime Architectures /
Chapter 2 - Indirect Addressing in the CFM-Based Architecture


CFM-68K Implementation

In the CFM-68K runtime environment, the A5 register acts as the base register.

To access global, static, or imported data, the build-time offset of the direct data item is added to the value in A5. The result is the address of a pointer that points to the desired data.

To access imported routines, the offset of the routine is added to the value in A5, as in the data version, but the address at that location points not directly to the routine, but to a transition vector.

Note
CFM-68K transition vectors reside above the jump table in the direct data area of the called routine. This positioning is dictated by segmentation requirements.
A CFM-68K import library's transition vector is typically similar to that of a PowerPC import library, containing two 4-byte elements: the address of the routine being called and the address of the called fragment's direct data area (A5 world).

Note
Transition vectors in CFM-68K application fragments include a third field of segment information to allow them to properly address routines in a segmented application. For more information about the structure of CFM-68K applications and the application launch process, see "CFM-68K Application Structure," beginning on page 9-3.

Subtopics
Direct and Indirect Calls
The Direct Data Area Switching Method

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 MARCH 1997