Maybe this is a simple question, but I just couldn't figure it out. Can someone tell me how to place a constant variable into the specific ROM area? I would like to be able to set a constant value at a particualr ROM area and use a pointer to get it whenever I need it. Cheers, Tang
Exactly what I am looking for. CHEERS!!
Please see my latest posting re this issue. It differs slightly from your example. Specifically: User's guide, 01.97, C compiler C51 on page 63 'explicitly defined memory types' recommends a syntax. The Utilities guide, 04.95, page 119, has a different syntax in files c_mess0.c, c_mess1.c. the utilities guide contradicts the recommendation in the user's guide. Yet the 'preferred' method in the C51 compiler will NOT work. You must use the 'obsolete' method of the Utilities guide. (1) Please explain. (2) What is correct syntax for: const unsigned char code *MyArray[NumberFruits] = {"apple,"banana","cherry"};