Documentation Archive Developer
Search

ADC Home > Reference Library > Technical Q&As > Legacy Documents > Carbon >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

A5 World


Q: Will rememberA5, setupA5, and setCurrentA5 still work as designed in MPW/ThinkC for the PowerPC? Some documentation I've read clearly states that these routines need to work (for example, in the MyGrowZone example of IM:Memory).

A: Regarding calls such as SetA5 and SetCurrentA5, these work as documented when called from PowerPC, which is not to say that they are actually useful in the situation you describe.

A5 worlds serve several different functions for a 68K application, most notably, access to QuickDraw globals and access to application globals.

For a PowerPC application, the system maintains a notion of an A5 world for the purposes of accessing QuickDraw globals because much of the system code depends on locating the QuickDraw globals this way. But there is no concept of an A5 world for accessing application globals, because such globals are accessed by a different mechanism. The way that mechanism works means that a code fragment always has access to its globals. So code that previously had to jump through hoops to get to global data no longer has to do so.

Therefore, the calls to SetCurrentA5 and SetA5 in the GrowZone proc example in IM:Memory are unnecessary for PowerPC code. [They still are required, however, for 68K code, even if running on a PowerPC machine under the emulator.]

[May 01 1995]