Strangely, I cannot find an explanation as to how str
works in assembly language.
I understand that the following...
str r1,[r2]
...will store whatever is in register 1, r1
, in the address of register 2, r2
. However, I would like an explanation as to how str
works when the square brackets are much more complicated. For example:
str r1,[r0,r3,lsl#2]
What is going on here? I want to know where the value of r1
will end up, and what will be its value. I can't test it, so I am going to take a guess as to what I think is going on.
r3
is logically shifted by 2. It is then added to r0
. Finally, r1
is added to r0
.
This is my guess, though even to me this does not sound correct. Can someone clarify this for me?