Writing ARM and Thumb Assembly Language

Converting to Thumb

There is no post-indexed addressing mode for Thumb LDR and STR instructions. Because of this, you must use an ADD instruction to increment the address register after the LDR and STR instructions. For example:

LDRB

r2,

[r1]

; load register

2

ADD

r1,

#1

;

increment the

address in

 

 

 

;

register 1.

 

2-38

Copyright © 2000, 2001 ARM Limited. All rights reserved.

ARM DUI 0068B

Page 50
Image 50
ARM VERSION 1.2 manual Load register