Important: The information in this document is obsolete and should not be used for new development.
Using the Parameter RAM Utilities
The Parameter RAM Utilities provide two functions--GetSysPPtr
andWriteParam
--that allow you to directly manipulate parameter RAM. TheGetSysPPtr
function lets you access the low-memory copy of the parameter RAM, and theWriteParam
function lets you write the modified low-memory copy back to parameter RAM. A third function,InitUtil
, is used by the system software only. At system startup, this function reads the values from parameter RAM into low memory.You may find it necessary to read the values in parameter RAM or even change them. You read from and write to parameter RAM using the
GetSysPPtr
andWriteParam
functions.Many of the values held in parameter RAM are also copied at system startup into other low-memory locations. Therefore, to change a value in parameter RAM, you must change all low-memory copies representing the value before you call
WriteParam
to write the values back to the clock chip. For example, the global variableSPVolCtl
points to the location within the system parameters record that stores the speaker volume, and the global variableSdVolume
references a copy of this information stored elsewhere in low memory. You could change one without changing the other, although ordinarily you change both simultaneously.
The global variable
- WARNING
- It is not recommended that you directly manipulate parameter RAM. Your application should, if at all possible, use the routines provided by the Toolbox to read the information stored in parameter RAM.
SysParam
points to the beginning of the system parameters record stored in low memory. You can access the system parameters record directly by using this global variable, or you can use theGetSysPPtr
routine to return a pointer to the system parameters record. Thus, you can access the low-memory system parameters record like this:
WITH GetSysPPtr^ DO BEGIN ... {access the system parameters record directly here} END;At startup, system software calls the
- IMPORTANT
- Though system software automatically copies parameter RAM into low memory at startup, it does not automatically do the reverse. Therefore, after you make a change to the information in the low-memory system parameters record, you must use the
WriteParam
function to copy values from that record back to the clock chip to make the change permanent.InitUtil
function (which you should never need to call yourself) to copy the values stored in parameter RAM into low memory. (It then copies those values into other appropriate global variables.) When you make changes to the low-memory copy of parameter RAM, you must call theWriteParam
function to record your changes in the clock chip.