ARM VERSION 1.2 User Manual

Page 50

Advertising
background image

Writing ARM and Thumb Assembly Language

2-38

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

ARM DUI 0068B

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.

Advertising