Page 1 of 1

assembly mov command

Posted: 21 Aug 2015 18:25
by mikonforever
Hello,
The compiler (3.6.0) generate invalid expression (34 348 Assembler instruction 'mov A, Temp1' was not found ) for "mov A, Temp1"

char fonksiyon(char Temp)
{
char temp1;
temp1=Temp;
asm {
push Acc (no error)
mov A,#0 (no error)
mov A, Temp1 (error)
..
..
pop Acc
}
any advise, there is a "mov" command in 8051 but why compiler generate error ?

Re: assembly mov command

Posted: 24 Aug 2015 11:51
by Aleksandar.Mitrovic
Hi,

Can you please write is like this:

Code: Select all

mov A, _temp1+0
For more information please refer to the compiler 8051 Help->ASM Declaration.

Also you can just type temp1=Temp; compile it and run in asm mode (View->Assembly), you will see something like this:

Code: Select all

MOV _temp1+0, _temp+0
Best regards,
Aleksandar

Re: assembly mov command

Posted: 24 Aug 2015 19:37
by aCkO
You should use variable's assembly name. It should be:

Code: Select all

mov A, fonksiyon_temp1_L0
Regards