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

CSEG AT 0x400 karray: DS (8*16)

I reserve memory space in starup.a51 file as follow
{

CSEG AT KARRAYDATADDR ;0x017c
karray:

DS (8*16)
} And then,when I use asm Compiler directly in a c file as follow
{

#pragma asm

MOV R1,#HIGH (karray)

MOV R1,#LOW (karray)

#pragma endasm
}

I receive the following error message:
.\obj\cprm.src(4095): error A14: BAD RELOCATABLE EXPRESSION

I find that the src file(cprm.src) have replace the expression as follow
{

; MOV R1,#HIGH (karray)

MOV R1,# (karray>>8)

; MOV R1,#LOW (karray)

MOV R1,# (karray)
}

What is going on and how can I fix it?