User manual
168
mikoC PRO for dsPIC
MikroElektronika
Memory Type Speciers
The mikroC PRO for dsPIC30/33 and PIC24 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
- 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 code char txt[] = “ENTER PARAMETER:”;
data
Description This memory specier is used when storing variable to the Data RAM.
Example
// puts x in data ram
data unsigned char x;
rx
Description This memory specier allows variable to be stored in the working registers space
(WREG0-WREG15).
Example
// puts y in working register space
rx char y;
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
sfr char y; // puts y in SFR space