Rasmus L. Nygaard

Access variables in a C program from inline asm

Discussion created by Rasmus L. Nygaard on Jun 8, 2006
Latest reply on Jun 8, 2006 by Rasmus L. Nygaard
How do I access variables in a C program from inline asm. Now I access the variable by writing direct to the RAMadress from asm.
 
What do I write instead of XXX when I want to increment the testvar?
 
void main()
{
   char testvar;
 
   asm
   {
      inc XXX
   }
}
 
Best regards
Rasmus L. Nygaard, Denmark

Outcomes