25.4.5 Persistent Objects
The __persistent
qualifier can be used to indicate that variables should
not be cleared by the runtime startup code.
Use the native keywords discussed in the Differences section to look up information on the semantics of this qualifier.
Example
The following shows a variable qualified using __persistent
.
__persistent int serialNo;
Differences
The 8-bit compilers have used the qualifier, persistent
, to indicate
this meaning.
The 16- and 32-bit compilers have used the persistent
attribute with
variables to indicate they were not to be cleared.
Migration to the CCI
With 8-bit compilers, change any occurrence of the persistent
qualifier
to __persistent
, for example, from:
persistent char template[20];
to:
__persistent char template[20];
For the 16- and 32-bit compilers, change any occurrence of the
persistent
attribute to __persistent
, for example,
from:
int tblIdx __attribute__ ((persistent));
to
int __persistent tblIdx;
Caveats
None.