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

How to use a register variable defined in another file?

Hello,

I am using C166 with xc161cj. I defined a register variable in file1.a66 like,
RegDataSec SECTION DATA at F700h
ax: dsw 1
RegDataSec ENDS


In file2.a66, I am trying to specify this variable like,
extern ax : WORD

But it won't work, which means compiler doesn't treat it as a register variable. I cannot write a instruction like,
mov ax, #1234

So, how can I specify a register variable?

Thanks.

David

0