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

same constant in assembler and C

I have a product where most is in C, but for speed reasons abt 2% is in assembler. A few constants are thus defined in 2 places

<constants.h>
#define VALUE 5

<constants.inc>
VALUE EQU 5

This is a maintenance nightmare, is there a method to make a change of the value in one place suffice.

Parents
  • If you're using uVision, go to the 'Books' tab in the Project window.

    The PDF files are all on the free CD, and get installed into the Keil\C51\Hlp folder on installation:

    C51.pdf - C51 manual
    A51.pdf - A51 manual
    GS51.pdf - Getting Started guide (the nearest there is to a uVision Manual).

Reply
  • If you're using uVision, go to the 'Books' tab in the Project window.

    The PDF files are all on the free CD, and get installed into the Keil\C51\Hlp folder on installation:

    C51.pdf - C51 manual
    A51.pdf - A51 manual
    GS51.pdf - Getting Started guide (the nearest there is to a uVision Manual).

Children
No data