I know that
ldrb r1, [r0]
will read a single byte from the address pointed by r0. However, I still don't know how to read r0 + 1 byte, then r0 + 2, r0 + 3 and so on. will
ldrb r1, [r0, #1]
do what I want? And is that the same as this?
add r0, r0, #1
ldrb r1, [r0]
My aim was to implement the rev instruction as a function, and what I was doing was
lrdb r4, [r0]
lrdb r5, [r0, #1]
lrdb r6, [r0, #2]
lrdb r7, [r0, #3]
str r7, [r0]
str r6, [r0, #1]
str r5, [r0, #2]
str r4, [r0, #3]
However, only r7 read a byte from the number, all other registers read 0. What am I doing wrong?