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
Well, that's no argument, since a) interrupt service routines can't be written in the "C" that provides the applicable definition of these terms (i.e. the ISO C standard), and b) even if they could, there's no conforming way to get access to a const object that would allow the ISR to write to an object the main code can't. Whichever way you try (pointer casts, trick unions): you always cross an "undefined behaviour beyond this line".