Alex Rivera | Logout

What does the hash (#) value associated with the ARM LDR instruction mean?

Asked 2011-05-23T13:33:45.910
13

I'm trying to debug a crash I am experiencing in my application. The stack trace is pointing to an LDR instruction with the following format (thanks disassembler):

LDR R3, [R0,#4]

My question is in regards to the source component. What does the #4 in the second parameter mean? I'm assuming it is some kind of offset, but I haven't found documentation supporting that for the LDR instruction.

Edit
Report

1 Answer

12

It loads R3 from the address in R0 + 4 bytes. So, yes, it is a byte offset. See this explanation of the addressing modes.

answered 2011-05-23T13:38:16.020

Your Answer