hello everyone! I have a problem. I use the code below in C file to generate a ".SRC" file.
#pragma asm MOV R12,CP ; Get the Context Pointer (CP) MOV R9 ,DPP3 ; Get Data Page Pointer 3 (DPP3) MOV R10,DPP2 ; Get Data Page Pointer 2 (DPP2) MOV R11,DPP0 ; Get Data Page Pointer 0 (DPP0) #pragma endasm
but it generate the SRC code like this:
MOV R12,(*((uword volatile *)0xFE10)) ; Get the Context Pointer ((*((uword volatile *) 0xFE10))) MOV R9 ,(*((uword volatile *) 0xFE06)) MOV R10,(*((uword volatile *) 0xFE04)) MOV R11,(*((uword volatile *) 0xFE00))
.
and error: 1.syntax error
2.operand type mismatch
HOW TO SOLVE IT?
Looks like you have macros declared for the register names. Try using lowercase register names (e.g. 'mov r12,cp'), maybe you'll be able to avoid macro expansion this way.
Regards, - mike