Forum Discussion
Altera_Forum
Honored Contributor
19 years agovariable reference in assembly
Hello! I would like to know how to get the location of an external variable in asm code so that I have access to reading or writing to that variable. For eg. extern int x; asm ( ...
Altera_Forum
Honored Contributor
19 years agooops! I should have combed through the instruction set more closely. I suppose the instruction "movia" comes in handy as follows
extern int x; asm ( " movia r2, x \n\t" "..." )