Category:ARM Assembly: Difference between revisions
m
→Data Addressing using LDR and STR: typo fix
Puppydrum64 (talk | contribs) |
Puppydrum64 (talk | contribs) m (→Data Addressing using LDR and STR: typo fix) |
||
Line 83:
Here, the offset is performed ''before'' the storage operation. What if you want to offset afterwards? That would be useful for reading in a data stream. Good news - you can do that simply by having the offset value or register '''outside''' the brackets. This is called "post-increment" or "post-indexing." Unlike pre-indexing, these changes to the pointer are not temporary.
<lang ARM Assembly>LDR R0,[R1],#4 ;load the 32-bit value stored at memory location R1 into R0, THEN add 4 to
; instruction is finished.</lang>
|