User manual
mikroPascal PRO for PIC32
MikroElektronika
171
Memory Type Speciers
The mikroPascal PRO for PIC32 supports usage of all memory areas.
Each variable may be explicitly assigned to a specic memory space by including a memory type specier in the
declaration, or implicitly assigned.
The following memory type speciers can be used:
- code
- data
- rx (reserved for compiler purposes only)
- sfr
code
Description The code memory type may be used for allocating constants in program memory.
Example
// puts txt in program memory
const txt = ‘ENTER PARAMETER:’; code;
data
Description This memory specier is used when storing variable to the Data RAM.
Example
// puts data_buffer in data ram
var data_buffer : char; data;
rx
Description This memory specier allows variable to be stored in the working registers space (reserved for compiler
purposes only).
Example
// puts y in Rx space
var y : char; rx;
sfr
Description This memory specier allows user to access special function registers. It also instructs compiler to
maintain same identier in source and assembly.
Example
var y : char; sfr; // puts y in SFR space
Note : If none of the memory speciers are used when declaring a variable, data specier will be set as default by the
compiler.
Related topics: PIC32 Memory Organization, Accessing individual bits, SFRs, Constants, Functions