This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

define a constant to an absolute address

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


Thanks for any help!

Parents
  • 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.

Reply
  • 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.

Children