Technical Support

GENERAL: CONST ARRAY IN ROM

QUESTION

I have a const byte array. I want to access it out of code memory space. The compiler sets up two segments; one in ROM and one in data space. Then during initialization it copies all the data from ROM into the data space. I want to set up a single segment in ROM. How can I do that?

ANSWER

Put CODE in front of the array declaration, in addition to CONST. Your declaration should something like the following:

code const array [];

Last Reviewed: Wednesday, May 24, 2000


Did this article provide the answer you needed?
 
Yes
No
Not Sure