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: Memory /
Chapter 4 - Memory Management Utilities / Memory Management Utilities Reference
Routines / Setting and Restoring the A5 Register


SetCurrentA5

You can use the SetCurrentA5 function to get the current value of the system global variable CurrentA5.

FUNCTION SetCurrentA5: LongInt;
DESCRIPTION
The SetCurrentA5 function does two things: First, it gets the current value in the A5 register and returns it to your application. Second, SetCurrentA5 sets register A5 to the value of the low-memory global variable CurrentA5. This variable points to the boundary between the parameters and global variables of the current application.

SPECIAL CONSIDERATIONS
You cannot reliably call SetCurrentA5 in code that is executed at interrupt time unless you first guarantee that your application is the current process (for example, by calling the Process Manager function GetCurrentProcess). In general, you should call SetCurrentA5 at noninterrupt time and then pass the returned value to the
interrupt code.

ASSEMBLY-LANGUAGE INFORMATION
You can access the value of the current application's A5 register with the low-memory global variable CurrentA5.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996