This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

put const variables into code-segment

Hi.

I want to put a (large) table of constant values into the code-segment, because I'm very low on RAM but have plenty of program-ROM.

The C51-manual on page 88 says "Constant variables may also be stored in program memory".

How is this possible?

Thanks, Patrick

Parents
  • "The C51-manual on page 88 says 'Constant variables may also be stored in program memory'".

    Which edition of the manual do you have?
    In my 09.2001 edition, the above is on p90, and the very next paragraph says,

    "Program memory may be accessed using the code memory type specifier..."

    So this must be a case for RTWM - Read The Whole Manual! ;-)

Reply
  • "The C51-manual on page 88 says 'Constant variables may also be stored in program memory'".

    Which edition of the manual do you have?
    In my 09.2001 edition, the above is on p90, and the very next paragraph says,

    "Program memory may be accessed using the code memory type specifier..."

    So this must be a case for RTWM - Read The Whole Manual! ;-)

Children
No data