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

C51 Compiler, 8051 Utilities manuals' examples syntax for 'code' conflict

User's guide, 01.97, C compiler C51 on page 63 'explicitly defined memory types' recommends a syntax.

The Utilities guide, 04.95, page 119, has a different syntax in files c_mess0.c, c_mess1.c.

the utilities guide contradicts the recommendation in the user's guide.

Yet the 'preferred' method in the C51 compiler will NOT work. You must use the 'obsolete' method of the Utilities guide.

(1) Please explain.

(2) What is correct syntax for:
const unsigned char code *MyArray[NumberFruits] = {"apple,"banana","cherry"};

Parents
  • (1) I have the 09.2000.9 CD also. (I didn't realize that the Utilities guide is now included with the assembler PDF. I was looking for a special utilities PDF.)

    Unfortunately, the example in the utilities section refers to c_mess[01].c but does not list the the source code (as the outdated 04.95 did).

    (2) Your explanation and example of using the keyword 'code' answers my question.

    I didn't realize that there could be more than one instance of the keyword 'code'. I concluded (wrongly) from the 'Explicitly Declared Memory Types' (page 71) that the latter form was preferred over the first and that there could be only one instance of the memory location keyword 'code'.

    Thanks a lot.

Reply
  • (1) I have the 09.2000.9 CD also. (I didn't realize that the Utilities guide is now included with the assembler PDF. I was looking for a special utilities PDF.)

    Unfortunately, the example in the utilities section refers to c_mess[01].c but does not list the the source code (as the outdated 04.95 did).

    (2) Your explanation and example of using the keyword 'code' answers my question.

    I didn't realize that there could be more than one instance of the keyword 'code'. I concluded (wrongly) from the 'Explicitly Declared Memory Types' (page 71) that the latter form was preferred over the first and that there could be only one instance of the memory location keyword 'code'.

    Thanks a lot.

Children