Hi all
How transferring values of registers mentioned in assembly code to vars mentioned in C code in the same sketch .
The assembly code is embedded in the C code with asm: clause .
Hope I am clear .
Elico
Hi all
How transferring values of registers mentioned in assembly code to vars mentioned in C code in the same sketch .
The assembly code is embedded in the C code with asm: clause .
Hope I am clear .
Elico
Hope I am clear .
Without posting code, no.
very general code ..
main()
{
int abc ;
asm:
var1 = some rgister ;
end asm:
abc = var1 ;
}
int pinValues = PINSA;
That's C-code to read the register PINSA and store it in an integer called "pinsValue".
thanks
what if I need to deal with specific bits of that register value in the C code level ?
Elico
what if I need to deal with specific bits of that register value in the C code level ?
You have our permission to do that.
elico:
what if I need to deal with specific bits of that register value in the C code level ?
Either the same way you would in assembly, with bit masking or using the functions bitRead() and bitWrite(). (those are part of the Ardinuno libraries, and found on the language reference page)
Thanks
Elico