See the appropriate sections in
C18 Users Guide (see pointer in reply #45):
2.3 Storage Classes
2.4 Storage Qualifiers
Quote:
2.4.3 ram/rom Qualifiers
Because the PICmicro microcontrollers use separate program memory and data
memory address busses in their design, MPLAB C18 requires extensions to distinguish between data located in program memory and data located in data memory. The ANSI/ISO C standard allows for code and data to be in separate address spaces, but this is not sufficient to locate data in the code space as well. To this purpose, MPLAB C18 introduces the rom and ram qualifiers. The rom qualifier denotes that the object is located in program memory, whereas the ram qualifier denotes that the object is located in data memory.
Pointers can point to either data memory (ram pointers) or program memory (rom pointers). Pointers are assumed to be ram pointers unless declared as rom. The size of a pointer is dependent on the type of the pointer and is documented in Table 2-4. ...
|
Reading both sections of the user guide should provide a better understanding of storage declaration options available.
I'm assuming this is in MPLab. The same thing can be done in EasyC either using the "User Code" option. See EasyC discussion in
EasyC Wish List thread.
Regards,
DCBrown