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

using a NUMBER (const) declaring in a asm file in a C file

Hello,

- I am doing some transformation of a ASM project with including some C procedure.

- I have a const declaring in the asm file like this

//declaration.A51

PUBLIC NUMBER (Tempo)

Number Tempo Equ 10

- I use this const in other asm file like this:

//main.a51

EXTRN NUMBER (Tempo)

mov a,#Tempo

- no problem with this code, I want to use this const in a C file joint to my project like this :

extern const tempo;

variable1 = tempo;

I don't have any problem with compilation (no error and no warning) but this is not the good value giving to the variable1.

variable1 is not 10 but 80? why?

Thanks for your help.

0