Writing ARM and Thumb Assembly Language

LDR

r2, =0xFFFFFFFF

; => MVN R2, #0

MOV

pc, lr

 

LTORG

 

; Literal Pool 1 contains

 

 

; literal Ox55555555

func2

 

 

LDR

r3, =0x55555555

; => LDR R3, [PC, #offset to

 

 

; Literal Pool 1]

; LDR r4, =0x66666666

; If this is uncommented it

 

 

; fails, because Literal Pool 2

 

 

; is out of reach

MOV

pc, lr

 

LargeTable

 

 

SPACE

4200

; Starting at the current location,

 

 

; clears a 4200 byte area of memory

 

 

; to zero

END

 

; Literal Pool 2 is empty

 

 

 

2.6.3Loading floating-point constants

You can load any single-precision or double-precision floating-point constant in a single instruction, using the FLD pseudo-instructions.

Refer to FLD pseudo-instructionon page 6-38 for details.

ARM DUI 0068B

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

2-29

Page 41
Image 41
ARM VERSION 1.2 manual Loading floating-point constants