Steve Church

assigning constant data into code space

Discussion created by Steve Church on Aug 28, 2008
Latest reply on Aug 28, 2008 by CompilerGuru
I am porting an application over from the Keil C51 compiler. I am storing some constants in code space and the C51 code is

 void say(unsigned char word, unsigned char offset)
    unsigned long word_address;

    // word address high byte table
    code unsigned char addresstablehi[] = { 0x00,0x00,0x00,0x00,0x01,0x01,0x04,0x07 ,0x08 } ;
How do I perform this in CW.
The address table values are calculated by another program which produces a text file in the correct format so that I can cut and paste into the compiler, so I would hope the CW code would be similar.