How to define the following constant to an absolute address at 0x1000?
unsigned char code index[] = { 0x3, 0x5, 0x6 } ; //a constant mem in a file
The assembler provides the facility for locating objects at absolute addresses and optionally making those addresses public so your C program can use them by name. There is a template.a51 file in the c51/asm/ directory that provides much of the framework for you. You would use the "DB" (define byte) assembler directive to initialize code memory with 8-bit values. It's all described in your A51 and C51 manuals.
Or use the Linker to fix the address - that is, after all, the Linker's job!