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 / Changing the Addressing Mode


SwapMMUMode

To change the address-translation mode from 24-bit to 32- bit or vice versa, use the SwapMMUMode procedure.

PROCEDURE SwapMMUMode (VAR mode: SignedByte);
mode
On entry, the desired address-translation mode. On exit, the address translation mode previously in use.
DESCRIPTION
The SwapMMUMode procedure sets the address-translation mode to the value specified by the mode parameter. The mode in use prior to the call is returned in mode, and you can restore the previous mode by calling SwapMMUMode again. The value of mode should be one of the following constants on entry and will be one of the following constants on exit:

CONST
   false32b    = 0;              {24-bit addressing mode}
   true32b     = 1;              {32-bit addressing mode}
SPECIAL CONSIDERATIONS
You might cause a system crash if you switch to 32-bit addressing mode when your application is executing a code resource you loaded into memory while 24-bit mode was in effect. See "Switching Addressing Modes" on page 4-20 for a description of how this problem arises and how you can avoid it.

ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit for SwapMMUMode are
Registers on entry
D0New mode
Registers on exit
D0Previous mode


Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996