EasyManuals Logo

NXP Semiconductors LPC1768 User Manual

NXP Semiconductors LPC1768
841 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #662 background imageLoading...
Page #662 background image
UM10360 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2013. All rights reserved.
User manual Rev. 3 — 20 December 2013 662 of 841
NXP Semiconductors
UM10360
Chapter 34: Appendix: Cortex-M3 user guide
34.2.4.1 ADR
Load PC-relative address.
34.2.4.1.1 Syntax
ADR
{cond} Rd, label
where:
cond is an optional condition code, see Section 34.2.3.7 “
Conditional execution.
Rd is the destination register.
label is a PC-relative expression. See Section 34.2.3.6 “
PC-relative expressions.
34.2.4.1.2 Operation
ADR
determines the address by adding an immediate value to the PC, and writes the result
to the destination register.
ADR
produces position-independent code, because the address is PC-relative.
If you use
ADR
to generate a target address for a
BX
or
BLX
instruction, you must ensure that
bit[0] of the address you generate is set to1 for correct execution.
Values of label must be within the range of 4095 to +4095 from the address in the PC.
Remark: You might have to use the
.W
suffix to get the maximum offset range or to
generate addresses that are not word-aligned. See Section 34.2.3.8 “
Instruction width
selection.
34.2.4.1.3 Restrictions
Rd must not be SP and must not be PC.
34.2.4.1.4 Condition flags
This instruction does not change the flags.
34.2.4.1.5 Examples
ADR R1, TextMessage ; Write address value of a location labelled as
; TextMessage to R1

Table of Contents

Other manuals for NXP Semiconductors LPC1768

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the NXP Semiconductors LPC1768 and is the answer not in the manual?

NXP Semiconductors LPC1768 Specifications

General IconGeneral
BrandNXP Semiconductors
ModelLPC1768
CategoryMicrocontrollers
LanguageEnglish

Related product manuals