Copyright © 2000, 2001 ARM Limited. All rights reserved.ARM DUI 0068BARM® Developer SuiteVersion 1.2Assembler Guide
Preface x Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B
Assembler Reference 3-22 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.6.5 Floating-point literalsFloating-point literals ca
Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-233.6.6 Register-relative and program-relative expression
Assembler Reference 3-24 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.6.9 Operator precedenceThe assembler includes an exte
Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-25The highest precedence operators are at the top of the
Assembler Reference 3-26 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.6.10 Unary operatorsUnary operators have the highest
Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-27Example of use of :SB_OFFSET_19_12: and :SB_OFFSET_11_
Assembler Reference 3-28 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.6.11 Binary operatorsBinary operators are written bet
Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-29Shift operatorsShift operators act on numeric expressio
Assembler Reference 3-30 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BRelational operatorsTable 3-9 shows the relational oper
Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-31Boolean operatorsThese are the operators with the lowes
ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 1-1Chapter 1 IntroductionThis chapter introduces the assemblers provided with A
Assembler Reference 3-32 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B
ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-1Chapter 4 ARM Instruction ReferenceThis chapter describes the ARM instructio
ARM Instruction Reference 4-2 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BTable 4-1 Location of ARM instructionsMnemonic Bri
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-3MULMultiply page 4-40 2MVNMove not page 4-32 AllOR
ARM Instruction Reference 4-4 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.1 Conditional executionAlmost all ARM instructio
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-5Some instructions update a subset of the flags. Th
ARM Instruction Reference 4-6 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.2 ARM memory access instructionsThis section con
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-74.2.1 LDR and STR, words and unsigned bytesLoad re
ARM Instruction Reference 4-8 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BFlexOffsetis a flexible offset applied to the valu
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-9Flexible offset syntaxBoth pre-indexed and post-in
Introduction 1-2 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B1.1 About the ARM Developer Suite assemblersARM Developer Suite
ARM Instruction Reference 4-10 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BAddress alignment for word transfersIn most circu
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-11Saving from r15In general, avoid saving from r15
ARM Instruction Reference 4-12 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.2.2 LDR and STR, halfwords and signed bytesLoad
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-13labelis a program-relative expression. See Regist
ARM Instruction Reference 4-14 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BRmis a register containing a value to be used as
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-154.2.3 LDR and STR, doublewordsLoad two consecutiv
ARM Instruction Reference 4-16 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BZero offsetThe value in Rn is used as the address
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-17If your system has a system coprocessor, you can
ARM Instruction Reference 4-18 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.2.4 LDM and STMLoad and store multiple register
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-19Non word-aligned addressesThese instructions igno
ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-1Chapter 2 Writing ARM and Thumb Assembly LanguageThis chapter provides an in
ARM Instruction Reference 4-20 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.2.5 PLDCache preload.SyntaxPLD [Rn{, FlexOffset
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-21UsageUse PLD to hint to the memory system that th
ARM Instruction Reference 4-22 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.2.6 SWPSwap data between registers and memory.U
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-234.3 ARM general data processing instructionsThis
ARM Instruction Reference 4-24 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.3.1 Flexible second operandMost ARM general dat
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-25ASRArithmetic shift right by n bits divides the v
ARM Instruction Reference 4-26 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BFigure 4-2 RRXThe carry flagThe carry flag is upd
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-274.3.2 ADD, SUB, RSB, ADC, SBC, and RSCAdd, subtra
ARM Instruction Reference 4-28 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BCondition flagsIf S is specified, these instructi
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-29 ADDS r4,r0,r2 ; adding the least signif
Writing ARM and Thumb Assembly Language 2-2 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.1 IntroductionThis chapter gives a
ARM Instruction Reference 4-30 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.3.3 AND, ORR, EOR, and BICLogical AND, OR, Excl
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-31Use of r15If you use r15 as Rn, the value used is
ARM Instruction Reference 4-32 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.3.4 MOV and MVNMove and Move Not.SyntaxMOV{cond
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-33Use of r15If you use r15 as Rn, the value used is
ARM Instruction Reference 4-34 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.3.5 CMP and CMNCompare and Compare Negative.Syn
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-35ArchitecturesThese instructions are available in
ARM Instruction Reference 4-36 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.3.6 TST and TEQTest and Test Equivalence.Syntax
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-37ArchitecturesThese instructions are available in
ARM Instruction Reference 4-38 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.3.7 CLZCount Leading Zeroes.SyntaxCLZ{cond} Rd,
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-394.4 ARM multiply instructionsThis section contain
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-32.2 Overview of the ARM architecture
ARM Instruction Reference 4-40 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.4.1 MUL and MLAMultiply and multiply-accumulate
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-41Examples MUL r10,r2,r5 MLA r10,r2,r
ARM Instruction Reference 4-42 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.4.2 UMULL, UMLAL, SMULL and SMLALUnsigned and s
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-43Condition flagsIf S is specified, these instructi
ARM Instruction Reference 4-44 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.4.3 SMULxySigned multiply (16-bit by 16-bit, 32
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-45Incorrect examples SMULBT r15,r2,r0 ; u
ARM Instruction Reference 4-46 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.4.4 SMLAxySigned multiply-accumulate (16-bit by
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-47ArchitecturesThis instruction is available in all
ARM Instruction Reference 4-48 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.4.5 SMULWySigned multiply (32-bit by 16-bit, to
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-494.4.6 SMLAWySigned multiply-accumulate (32-bit by
Writing ARM and Thumb Assembly Language 2-4 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.2.3 Processor modeARM processors s
ARM Instruction Reference 4-50 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BArchitecturesThis instruction is available in all
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-514.4.7 SMLALxySigned multiply-accumulate (16-bit b
ARM Instruction Reference 4-52 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BExamples SMLALTB r2,r3,r7,r1 SMLALBTVS
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-534.4.8 MIA, MIAPH, and MIAxyXScale coprocessor 0 i
ARM Instruction Reference 4-54 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BThe MIAxy instruction multiplies the signed integ
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-554.5 ARM saturating arithmetic instructionsThese o
ARM Instruction Reference 4-56 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BNote All values are treated as two’s complement s
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-574.6 ARM branch instructionsThis section contains
ARM Instruction Reference 4-58 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.6.1 B and BLBranch, and Branch with Link.Syntax
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-594.6.2 BXBranch, and optionally exchange instructi
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-5In User mode, r14 is used as a link
ARM Instruction Reference 4-60 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.6.3 BLXBranch with Link, and optionally exchang
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-61ArchitecturesThis instruction is available in all
ARM Instruction Reference 4-62 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.7 ARM coprocessor instructionsThis section does
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-634.7.1 CDP, CDP2Coprocessor data operations.Syntax
ARM Instruction Reference 4-64 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.7.2 MCR, MCR2, MCRRMove to coprocessor from ARM
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-654.7.3 MRC, MRC2Move to ARM register from coproces
ARM Instruction Reference 4-66 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.7.4 MRRCMove to two ARM registers from coproces
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-674.7.5 LDC, STCTransfer data between memory and co
ARM Instruction Reference 4-68 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BArchitecturesLDC and STC are available in ARM arc
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-694.7.6 LDC2, STC2Transfer data between memory and
Writing ARM and Thumb Assembly Language 2-6 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.2.5 ARM instruction set overviewAl
ARM Instruction Reference 4-70 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BArchitecturesLDC2 and STC2 are available in ARM a
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-714.8 Miscellaneous ARM instructionsThis section co
ARM Instruction Reference 4-72 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.8.1 SWISoftware interrupt.SyntaxSWI{cond} immed
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-734.8.2 MRSMove the contents of the CPSR or SPSR to
ARM Instruction Reference 4-74 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.8.3 MSRLoad specified fields of the CPSR or SPS
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-75Example MSR CPSR_f, r5
ARM Instruction Reference 4-76 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.8.4 BKPTBreakpoint.SyntaxBKPT immed_16where:imm
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-774.8.5 MAR, MRAXScale coprocessor 0 instructions.T
ARM Instruction Reference 4-78 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.9 ARM pseudo-instructionsThe ARM assembler supp
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-794.9.1 ADR ARM pseudo-instructionLoad a program-re
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-7Single register load and store instr
ARM Instruction Reference 4-80 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.9.2 ADRL ARM pseudo-instructionLoad a program-r
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-81If expr is program-relative, it must evaluate to
ARM Instruction Reference 4-82 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.9.3 LDR ARM pseudo-instructionLoad a register w
ARM Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 4-83UsageThe LDR pseudo-instruction is used for two m
ARM Instruction Reference 4-84 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B4.9.4 NOP ARM pseudo-instructionNOP generates the
ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-1Chapter 5 Thumb Instruction ReferenceThis chapter describes the Thumb instru
Thumb Instruction Reference 5-2 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BTable 5-1 Location of Thumb instructions and pse
Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-3RORRotate right page 5-24 4TSBCSubtract with car
Thumb Instruction Reference 5-4 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.1 Thumb memory access instructionsThis section
Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-55.1.1 LDR and STR, immediate offsetLoad Register
ii Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BARM Developer SuiteAssembler GuideCopyright © 2000, 2001 ARM Limited. All ri
Writing ARM and Thumb Assembly Language 2-8 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.2.6 ARM instruction capabilitiesTh
Thumb Instruction Reference 5-6 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BAddress alignment for word and halfword transfer
Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-75.1.2 LDR and STR, register offsetLoad Register
Thumb Instruction Reference 5-8 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BAddress alignment for word and halfword transfer
Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-95.1.3 LDR and STR, pc or sp relativeLoad Registe
Thumb Instruction Reference 5-10 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BIf your system does not have a system coprocess
Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-115.1.4 PUSH and POPPush low registers, and optio
Thumb Instruction Reference 5-12 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BPOP {reglist, pc}This instruction causes a bran
Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-135.1.5 LDMIA and STMIALoad and store multiple re
Thumb Instruction Reference 5-14 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BExamples LDMIA r3!, {r0,r4} LDMIA r5!
Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-155.2 Thumb arithmetic instructionsThis section c
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-92.2.7 Thumb instruction set overview
Thumb Instruction Reference 5-16 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.2.1 ADD and SUB, low registersAdd and subtrac
Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-17Note An ADD instruction with a negative value f
Thumb Instruction Reference 5-18 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.2.2 ADD, high or low registersAdd values in r
Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-195.2.3 ADD and SUB, spIncrement or decrement sp
Thumb Instruction Reference 5-20 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.2.4 ADD, pc or sp relativeAdd an immediate co
Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-215.2.5 ADC, SBC, and MULAdd with carry, Subtract
Thumb Instruction Reference 5-22 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.3 Thumb general data processing instructionsT
Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-235.3.1 AND, ORR, EOR, and BICBitwise logical ope
Thumb Instruction Reference 5-24 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.3.2 ASR, LSL, LSR, and RORShift and rotate op
Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-25Register-controlled shiftThese instructions tak
Writing ARM and Thumb Assembly Language 2-10 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BRefer to Chapter 5 Thumb Instructio
Thumb Instruction Reference 5-26 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.3.3 CMP and CMNCompare and Compare Negative.S
Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-27Examples CMP r2,#255 CMP r7,r12 ; hi
Thumb Instruction Reference 5-28 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.3.4 MOV, MVN, and NEGMove, Move NOT, and Nega
Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-29Condition flagsMOV Rd,#expr and MVN instruction
Thumb Instruction Reference 5-30 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.3.5 TSTTest bits.SyntaxTST Rn, Rmwhere:Rnis t
Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-315.4 Thumb branch instructionsThis section conta
Thumb Instruction Reference 5-32 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.4.1 BBranch. This is the only instruction in
Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-33Table 5-2 Condition codes for Thumb B instruct
Thumb Instruction Reference 5-34 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.4.2 BLLong branch with Link.SyntaxBL labelwhe
Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-355.4.3 BXBranch, and optionally exchange instruc
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-11Single register load and store inst
Thumb Instruction Reference 5-36 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.4.4 BLXBranch with Link, and optionally excha
Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-375.5 Thumb software interrupt and breakpoint ins
Thumb Instruction Reference 5-38 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.5.2 BKPTBreakpoint.SyntaxBKPT immed_8where:im
Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-395.6 Thumb pseudo-instructionsThe ARM assembler
Thumb Instruction Reference 5-40 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B5.6.1 ADR Thumb pseudo-instructionThe ADR pseud
Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-415.6.2 LDR Thumb pseudo-instructionThe LDR pseud
Thumb Instruction Reference 5-42 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B• To load a program-relative or external addres
Thumb Instruction Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 5-435.6.3 NOP Thumb pseudo-instructionNOP generates
Thumb Instruction Reference 5-44 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B
ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-1Chapter 6 Vector Floating-point ProgrammingThis chapter provides reference i
Writing ARM and Thumb Assembly Language 2-12 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.3 Structure of assembly language
Vector Floating-point Programming 6-2 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BTable 6-1 Location of descriptions of VFP
Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-3FNEGNegate page 6-16 Vector AllFNMACNegate
Vector Floating-point Programming 6-4 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.1 The vector floating-point coprocessorT
Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-56.2 Floating-point registersThe Vector Flo
Vector Floating-point Programming 6-6 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.2.2 VectorsA vector can use up to eight
Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-76.3 Vector and scalar operations You can u
Vector Floating-point Programming 6-8 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.4 VFP and condition codesYou can use a c
Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-9Note The type of the instruction that last
Vector Floating-point Programming 6-10 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.5 VFP system registersThree VFP system
Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-11bits[18:16] LEN is the number of register
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-13LabelsLabels are symbols that repre
Vector Floating-point Programming 6-12 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.5.2 FPEXC, the floating-point exception
Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-136.6 Flush-to-zero modeSome implementation
Vector Floating-point Programming 6-14 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.6.3 Operations not affected by flush-to
Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-156.7 VFP instructionsThis section contains
Vector Floating-point Programming 6-16 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.7.1 FABS, FCPY, and FNEGFloating-point
Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-17Examples FABSD d3, d5 FNEGSMI s15
Vector Floating-point Programming 6-18 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.7.2 FADD and FSUBFloating-point add and
Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-196.7.3 FCMPFloating-point compare.FCMP is
Vector Floating-point Programming 6-20 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.7.4 FCVTDSConvert single-precision floa
Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-216.7.5 FCVTSDConvert double-precision floa
Writing ARM and Thumb Assembly Language 2-14 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BConstantsConstants can be numeric,
Vector Floating-point Programming 6-22 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.7.6 FDIVFloating-point divide. FDIV can
Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-236.7.7 FLD and FSTFloating-point load and
Vector Floating-point Programming 6-24 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B FLDSNE s3, [r2, #72+count] FSTS
Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-256.7.8 FLDM and FSTMFloating-point load mu
Vector Floating-point Programming 6-26 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BUsageThe FLDM instruction loads several c
Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-276.7.9 FMAC, FNMAC, FMSC, and FNMSCFloatin
Vector Floating-point Programming 6-28 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B FNMSCSLE s6, s0, s26
Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-296.7.10 FMDRR and FMRRDTransfer contents b
Vector Floating-point Programming 6-30 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.7.11 FMDHR, FMDLR, FMRDH, and FMRDLTran
Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-316.7.12 FMRS and FMSRTransfer contents bet
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-152.3.2 An example ARM assembly langu
Vector Floating-point Programming 6-32 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.7.13 FMRRS and FMSRRTransfer contents b
Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-336.7.14 FMRX, FMXR, and FMSTATTransfer con
Vector Floating-point Programming 6-34 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.7.15 FMUL and FNMULFloating-point multi
Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-356.7.16 FSITO and FUITOConvert signed inte
Vector Floating-point Programming 6-36 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.7.17 FSQRTFloating-point square root in
Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-376.7.18 FTOSI and FTOUIConvert floating-po
Vector Floating-point Programming 6-38 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.8 VFP pseudo-instructionThere is one VF
Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-39Examples FLDD d1,=3.12E106 ;
Vector Floating-point Programming 6-40 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.9 VFP directives and vector notationThi
Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-416.9.1 VFPASSERT SCALARThe VFPASSERT SCALA
Writing ARM and Thumb Assembly Language 2-16 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BIn an ARM assembly language source
Vector Floating-point Programming 6-42 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B6.9.2 VFPASSERT VECTORThe VFPASSERT VECTO
Vector Floating-point Programming ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 6-43Example FMRX r10,FPSCR BIC r
Vector Floating-point Programming 6-44 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B
ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-1Chapter 7 Directives ReferenceThis chapter describes the directives that are
Directives Reference 7-2 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.1 Alphabetical list of directivesTable 7-1 Location o
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-37.2 Symbol definition directivesThis section describes
Directives Reference 7-4 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.2.1 GBLA, GBLL, and GBLSThe GBLA directive declares a
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-5ExamplesExample 7-1 declares a variable objectsize, set
Directives Reference 7-6 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.2.2 LCLA, LCLL, and LCLSThe LCLA directive declares a
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-77.2.3 SETA, SETL, and SETSThe SETA directive sets the v
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-172.3.3 Calling subroutinesTo call su
Directives Reference 7-8 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.2.4 RLISTThe RLIST (register list) directive gives a
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-97.2.5 CNThe CN directive defines a name for a coprocess
Directives Reference 7-10 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.2.6 CPThe CP directive defines a name for a specifie
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-117.2.7 DN and SNThe DN directive defines a name for a s
Directives Reference 7-12 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.2.8 FNThe FN directive defines a name for a specifie
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-137.3 Data definition directivesThis section describes t
Directives Reference 7-14 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.3.1 LTORGThe LTORG directive instructs the assembler
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-157.3.2 MAPThe MAP directive sets the origin of a storag
Directives Reference 7-16 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.3.3 FIELDThe FIELD directive describes space within
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-177.3.4 SPACEThe SPACE directive reserves a zeroed block
ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. iiiContentsARM Developer Suite Assembler GuidePrefaceAbout this book ...
Writing ARM and Thumb Assembly Language 2-18 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.3.4 An example Thumb assembly lan
Directives Reference 7-18 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.3.5 DCBThe DCB directive allocates one or more bytes
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-197.3.6 DCD and DCDUThe DCD directive allocates one or m
Directives Reference 7-20 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.3.7 DCDOThe DCDO directive allocates one or more wor
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-217.3.8 DCFD and DCFDUThe DCFD directive allocates memor
Directives Reference 7-22 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.3.9 DCFS and DCFSUThe DCFS directive allocates memor
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-237.3.10 DCIIn ARM code, the DCI directive allocates one
Directives Reference 7-24 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.3.11 DCQ and DCQUThe DCQ directive allocates one or
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-257.3.12 DCW and DCWUThe DCW directive allocates one or
Directives Reference 7-26 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.4 Assembly control directivesThis section describes
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-277.4.2 MACRO and MENDThe MACRO directive marks the star
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-192.4 Using the C preprocessorYou can
Directives Reference 7-28 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BUse | as the argument to use the default value of a pa
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-29Using a macro to produce assembly-time diagnostics:
Directives Reference 7-30 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.4.4 IF, ELSE, and ENDIFThe IF directive introduces a
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-31ExamplesExample 7-3 assembles the first set of instruc
Directives Reference 7-32 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.4.5 WHILE and WENDThe WHILE directive starts a seque
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-337.5 Frame description directivesThis section describes
Directives Reference 7-34 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.5.1 FRAME ADDRESSThe FRAME ADDRESS directive describ
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-357.5.2 FRAME POPUse the FRAME POP directive to inform t
Directives Reference 7-36 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.5.3 FRAME PUSHUse the FRAME PUSH directive to inform
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-37Examplep PROC ; Canonical frame address is sp + 0
Writing ARM and Thumb Assembly Language 2-20 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.5 Conditional executionIn ARM sta
Directives Reference 7-38 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.5.5 FRAME RESTOREUse the FRAME RESTORE directive to
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-397.5.6 FRAME SAVEThe FRAME SAVE directive describes the
Directives Reference 7-40 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.5.7 FRAME STATE REMEMBERThe FRAME STATE REMEMBER dir
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-417.5.8 FRAME STATE RESTOREThe FRAME STATE RESTORE direc
Directives Reference 7-42 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.5.9 FUNCTION or PROCThe FUNCTION directive marks the
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-437.5.10 ENDFUNC or ENDPThe ENDFUNC directive marks the
Directives Reference 7-44 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.6 Reporting directivesThis section describes the fol
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-457.6.2 INFOThe INFO directive supports diagnostic gener
Directives Reference 7-46 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.6.3 OPTThe OPT directive sets listing options from w
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-47By default the -list option produces a normal listing
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-212.5.2 Execution conditionsThe relat
Directives Reference 7-48 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.6.4 TTL and SUBTThe TTL directive inserts a title at
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-497.7 Miscellaneous directivesThis section describes the
Directives Reference 7-50 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.7.1 ALIGNThe ALIGN directive aligns the current loca
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-51Examples AREA cacheable, CODE, ALIGN=3rout1
Directives Reference 7-52 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.7.2 AREAThe AREA directive instructs the assembler t
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-53Identical ELF sections with the same name are overlaid
Directives Reference 7-54 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.7.3 CODE16 and CODE32The CODE16 directive instructs
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-557.7.4 ENDThe END directive informs the assembler that
Directives Reference 7-56 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.7.5 ENTRYThe ENTRY directive declares an entry point
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-577.7.6 EQUThe EQU directive gives a symbolic name to a
Writing ARM and Thumb Assembly Language 2-22 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.5.3 Using conditional execution i
Directives Reference 7-58 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.7.7 EXPORT or GLOBALThe EXPORT directive declares a
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-597.7.8 EXPORTASThe EXPORTAS directive allows you to exp
Directives Reference 7-60 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.7.9 EXTERNThe EXTERN directive provides the assemble
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-617.7.10 GET or INCLUDEThe GET directive includes a file
Directives Reference 7-62 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.7.11 GLOBALSee EXPORT or GLOBAL on page 7-58.7.7.12
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-637.7.13 INCBINThe INCBIN directive includes a file with
Directives Reference 7-64 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.7.15 KEEPThe KEEP directive instructs the assembler
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-657.7.16 NOFPThe NOFP directive disallows floating-point
Directives Reference 7-66 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.7.18 REQUIRE8 and PRESERVE8The REQUIRE8 directive sp
Directives Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 7-677.7.19 RNThe RN directive defines a register name for
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-23Because of the number of branches,
Directives Reference 7-68 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B7.7.20 ROUTThe ROUT directive marks the boundaries of
ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. Glossary-1GlossaryADS See ARM Developer Suite.ANSI American National Standards
Glossary Glossary-2 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BATPCS ARM and Thumb Procedure Call Standard defines how reg
Glossary ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. Glossary-3Interrupt A change in the normal processing sequence of an
Glossary Glossary-4 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BScope The accessibility of a function or variable at a part
ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. Index-1IndexThe items in this index are listed in alphabetical order, with symb
IndexIndex-2 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068Bnumeric expressions 3-20numeric literals 3-21numeric variables
IndexARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. Index-3GBLA 3-6, 3-13, 7-4, 7-46GBLL 3-6, 3-13, 7-4, 7-46GBLS 3-6, 3
IndexIndex-4 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BLDM instruction 2-39, 2-54, 3-3, 7-8Thumb 2-46LDRpseudo-instruc
IndexARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. Index-5Status flags 2-20STM instruction 2-39, 2-54, 3-3, 7-8Thumb 2-
Writing ARM and Thumb Assembly Language 2-24 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BConverting to ThumbBecause B is the
IndexIndex-6 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-252.6 Loading constants into register
Writing ARM and Thumb Assembly Language 2-26 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.6.1 Direct loading with MOV and M
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-27Direct loading with MOV in Thumb st
Contentsiv Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.2 Format of source lines ...
Writing ARM and Thumb Assembly Language 2-28 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BPlacing literal poolsThe assembler
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-29 LDR r2, =0xFFFFFFFF
Writing ARM and Thumb Assembly Language 2-30 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.7 Loading addresses into register
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-31Note The label used with ADR or ADR
Writing ARM and Thumb Assembly Language 2-32 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BImplementing a jump table with ADRE
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-33Example 2-7 ARM code jump table
Writing ARM and Thumb Assembly Language 2-34 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BConverting to ThumbExample 2-8 show
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-352.7.2 Loading addresses with LDR Rd
Writing ARM and Thumb Assembly Language 2-36 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-37An LDR Rd, =label example: string c
ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. vPrefaceThis preface introduces the documentation for the ARM Developer Suite (
Writing ARM and Thumb Assembly Language 2-38 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BConverting to ThumbThere is no post
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-392.8 Load and store multiple registe
Writing ARM and Thumb Assembly Language 2-40 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.8.1 ARM LDM and STM instructionsT
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-41UsageSee Implementing stacks with L
Writing ARM and Thumb Assembly Language 2-42 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.8.3 Implementing stacks with LDM
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-43Stacking registers for nested subro
Writing ARM and Thumb Assembly Language 2-44 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.8.4 Block copy with LDM and STMEx
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-45Example 2-12 AREA Blo
Writing ARM and Thumb Assembly Language 2-46 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.8.5 Thumb LDM and STM instruction
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-47Example 2-13 AREA Tblock,
Preface vi Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BAbout this bookThis book provides tutorial and reference information
Writing ARM and Thumb Assembly Language 2-48 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.9 Using macrosA macro definition
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-492.9.2 Unsigned integer division mac
Writing ARM and Thumb Assembly Language 2-50 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BThe macro checks that no two parame
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-512.10 Describing data structures wit
Writing ARM and Thumb Assembly Language 2-52 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.10.1 Relative mapsTo access data
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-532.10.2 Register-based mapsIn many c
Writing ARM and Thumb Assembly Language 2-54 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.10.3 Program-relative mapsYou can
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-552.10.4 Finding the end of the alloc
Writing ARM and Thumb Assembly Language 2-56 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.10.5 Forcing correct alignmentYou
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-57Example 2-21StartOfData EQU
Preface ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. viiTypographical conventionsThe following typographical conventions are
Writing ARM and Thumb Assembly Language 2-58 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.10.6 Using register-based MAP and
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-59Setting up a C-type structureThere
Writing ARM and Thumb Assembly Language 2-60 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BMaking faster access possibleTo gai
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-61Example 2-23 on page 2-60 contains
Writing ARM and Thumb Assembly Language 2-62 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068BIf you use the same technique for a
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-632.10.7 Using two register-based str
Writing ARM and Thumb Assembly Language 2-64 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.10.8 Avoiding problems with MAP a
Writing ARM and Thumb Assembly Language ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 2-65Example 2-27 on page 2-64 loads the
Writing ARM and Thumb Assembly Language 2-66 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B2.11 Using frame directivesYou must
ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-1Chapter 3 Assembler ReferenceThis chapter provides general reference materia
Preface viii Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B• ADS Linker and Utilities Guide (ARM DUI 0151)• CodeWarrior IDE Gu
Assembler Reference 3-2 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.1 Command syntaxThis section relates only to armasm. T
Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-3/ropispecifies that the content of inputfile is read-onl
Assembler Reference 3-4 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B-mdinstructs the assembler to write source file dependen
Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-5-helpinstructs the assembler to display a summary of the
Assembler Reference 3-6 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B-nocacheturns off source caching. By default the assembl
Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-7Note Avoiding large multiple register transfers increas
Assembler Reference 3-8 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.2 Format of source linesThe general form of source lin
Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-93.3 Predefined register and coprocessor namesAll registe
Assembler Reference 3-10 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.4 Built-in variablesTable 3-1 lists the built-in vari
Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-11|ads$version| must be all lower case. The other built-i
Preface ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. ixFeedbackARM Limited welcomes feedback on both ADS and the documentati
Assembler Reference 3-12 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.5 SymbolsYou can use symbols to represent variables,
Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-133.5.2 VariablesThe value of a variable can be changed a
Assembler Reference 3-14 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.5.4 Assembly time substitution of variablesYou can us
Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-153.5.5 LabelsLabels are symbols representing the address
Assembler Reference 3-16 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.5.6 Local labelsA local label is a number in the rang
Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-17If routname is specified in either a label or a referen
Assembler Reference 3-18 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.6 Expressions, literals, and operatorsThis section co
Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-193.6.1 String expressionsString expressions consist of c
Assembler Reference 3-20 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B3.6.3 Numeric expressionsNumeric expressions consist of
Assembler Reference ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-213.6.4 Numeric literalsNumeric literals can take any of
Commentaires sur ces manuels