I am using the Cx51 compiler.
I declared a array of pointers to characters as
char code *weekday_names[ ] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
Thinking it would go into the CODE memory space - it did not, and ended up in DATA space, causing an address space overflow.
I changed it to
code char *weekday_names[ ] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
and then it was placed into the CODE space.
Can someone explain the difference between these two ?
Thanks