how to store memory address in a register??

Hi All
I am trying to store a memory address in a register. Basically what I want is to store a memory address in a register say R0 and start a stack on the memory address. Then I wish to push some of the registers on the stack ( which is pointed by R0)
It seemed pretty straight forward in other architectures, but I am struggling in ARM.Here is some of the methods that I have tried
StackMem = 0x2ee150

MOV R0,#StackMem
LDR R0,=StackMem
STMFD R0,{R1-R3}

none of these work. Can anyone tell me what is the correct way to do this?

it will be great help!!!

Parents Reply Children
No data
More questions in this forum