User manual

mikroPascal PRO for dsPIC30/33 and PIC24
MikroElektronika
170
Memory Type Speciers
The mikroPascal PRO for dsPIC30/33 and PIC24 supports usage of all memory areas.
Each variable may be explicitly assigned to a specic memory space by including a memory type specier in the
declaration, or implicitly assigned.
The following memory type speciers can be used:
- code
- data
- rx
- sfr
- xdata
- ydata
- dma
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 specier 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 specier allows variable to be stored in the working registers space
(WREG0-WREG15).
Example
// puts y in Rx space
var y : char; rx;
sfr
Description This memory specier allows user to access special function registers. It also
instructs compiler to maintain same identier in source and assembly.
Example
var y : char; sfr; // puts y in SFR space