Mikroelektronika MIKROE-442 Datenbogen
mikroBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
171
Memory Type Specifiers
The mikroBasic PRO for dsPIC30/33 and PIC24 supports usage of all memory areas.
Each variable may be explicitly assigned to a specific memory space by including a memory type specifier in the
declaration, or implicitly assigned.
The following memory type specifiers 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 specifier is used when storing variable to the Data RAM.
Example
Example
‘ puts data_buffer in data ram
dim data_buffer as char data
rx
Description This memory specifier allows variable to be stored in the working registers space
(WREG0-WREG15).
Example
‘ puts y in the working registers space
dim y as char rx
sfr
Description This memory specifier allows user to access special function registers. It also
instructs compiler to maintain same identifier in source and assembly.
Example
dim y as char sfr ‘ puts y in SFR space