Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Previous Book Contents Book Index Next

Inside Macintosh: Operating System Utilities /
Chapter 7 - Parameter RAM Utilities / Parameter RAM Utilities Reference
Routines /


WriteParam

You can use the WriteParam function to write the modified values in the system parameters record to parameter RAM.

FUNCTION WriteParam: OSErr;
DESCRIPTION
The WriteParam function writes the modified values in the system parameters record to parameter RAM. Your application should call this function only after making changes to the system parameters record (returned by the GetSysPPtr function described in the previous section).

The WriteParam function also attempts to verify the values written by reading them back in and comparing them to the values in the low-memory copy.

SPECIAL CONSIDERATIONS
Because the organization of parameter RAM is subject to change, you should not use the WriteParam function to change the values in parameter RAM. Instead use the appropriate Toolbox routines to modify values in parameter RAM.

Note
If you accidentally use WriteParam to write incorrect values into parameter RAM, the user can clear the current settings in the parameter RAM and restore the default values by holding down the x-Option-P-R keys at system startup.
ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit for the WriteParam functions are
Registers on entry
A0SysParam
D0MinusOne
Registers on exit
D0Result code

For historical reasons, you must set up register A0 with the global variable SysParam and register D0 with the global variable MinusOne. When WriteParam returns, register D0 contains the result code.

RESULT CODES
noErr0No error
prWrErr-87Parameter RAM written did not verify
SEE ALSO
For a description of the system parameters record, see page 7-31.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996

Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2004 Apple Computer, Inc.
All rights reserved. | Terms of use | Privacy Notice