Important: The information in this document is obsolete and should not be used for new development.
WriteParam
You can use theWriteParam
function to write the modified values in the system parameters record to parameter RAM.
FUNCTION WriteParam: OSErr;DESCRIPTION
TheWriteParam
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 theGetSysPPtr
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 theWriteParam
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 theWriteParam
functions are
Registers on entry A0 SysParam D0 MinusOne
Registers on exit D0 Result code For historical reasons, you must set up register A0 with the global variable
SysParam
and register D0 with the global variableMinusOne
. WhenWriteParam
returns, register D0 contains the result code.RESULT CODES
noErr 0 No error prWrErr -87 Parameter RAM written did not verify SEE ALSO
For a description of the system parameters record, see page 7-31.