Hello all,
below is a small snippet of the c file with the assembly code embedde in it.
Can anyone let us know how to use the C variables in the inline assemby.
void main()
{
short temp1, temp2, var;
temp1 = 10;
temp2 = 20;
asm(" .global _temp1");
asm(" .global _temp2");
asm(" .global _Var1");
asm(" MPY .M1 _temp1, _temp2, _Var1");
printf("%d is the product \n", var1);
}
assembler throws and error informing that the operands are not legal registers
anything without the C variables like the bleow is working fine..
MPY .M1 A4,A6,A9
thanks and regards