I have a table that defines symbols appearance on a 5x7 dot display. Something like:
extern UINT8 symbols[][5] = { {0x0,0x0,0x0,0x0,0x0}, {0x0,0x0,0x5F,0x0,0x0}, {0x0,0x7,0x0,0x7,0x0}, {0x14,0x7F,0x14,0x7F,0x14}, // etc. The leading part of the table matches ASCII table, followed by a set of special symbols, e.g. an arrow, or a check-mark. To reference those I have a list of macros:
#define SYMBOL_LEFT_ARROW 120 // 120 is the entry in the table #define SYMBOL_RIGHT_ARROW (SYMBOL_LEFT_ARROW+1) #define SYMBOL_UP_ARROW (SYMBOL_RIGHT_ARROW+1) Now I need to say something like (won't compile):
const char * const message = "Next" + SYMBOL_RIGHT_ARROW; Question: How do I turn SYMBOL_RIGHT_ARROW into "\x79", or whole string into "Next\x79" AT COMPILE TIME so I can have the string in R/O section?
Freescale HC08 C-compiler.