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 C-variable from ASM

Hey guys I see there are numerous threads and support docs with mixing C + ASM. but I am still pulling hair out. I can get C to use a register I declared in asm
eg:

CODLO DATA 39D

by using

extern unsigned char CODLO;
in c

but I found that the address isn't reserved and that the memory location 39D is actually used by another variable delcared in c later in the program. So I am trying to get asm to use a variable I have declared in C...

so, I declare

unsigned char CODLO;

in C and in ASM i put

EXTERN DATA CODLO.

I get the compilation error:

smartcode.a51(2): error A48: DATA-ADDRESS EXPECTED

hope someone can help :)

Xarion

0