While writing a code in ARMSIM, I want to label a particular memory location(say) 0x2000 as PATH and use it in the ARM assembly code in MOV, LDR,STR instructions. Please let me know if this is possible.
1 Answer
You can use this type of method also,
var1 DCD 0x00 var2 DCD 0x00 LDR R0,=var1 ; Address of var1 LDR R1,[R0] ; read var1 in to R1 LDR R0,=var2 ; base address of MyAsmVar LDR R2,[R0] ; Address of var2 Reference: http://www.keil.com/forum/18423/declaring-variables-in-cortex-m3-assembly-language/
EQU(or whichever similar directive provided by ARMSIM)..equ PATH, 0x2000.0x2000.