Assembler User GuidePreface Overview of the Assembler Overview of the ARM Architecture Structure of Assembly Language Modules Writing ARM Assembly Language Condition Codes Using the Assembler Symbols, Literals, Expressions, and Operators Symbol naming rules Variables Numeric constants Assembly time substitution of variables Register-relative and PC-relative expressions Labels Labels for PC-relative addresses Labels for register-relative addresses Labels for absolute addresses Numeric local labels Syntax of numeric local labels String expressions String literals Numeric expressions Syntax of numeric literals Syntax of floating-point literals Logical expressions Logical literals Unary operators Binary operators Multiplicative operators String manipulation operators Shift operators Addition, subtraction, and logical operators Relational operators Boolean operators Operator precedence Difference between operator precedence in assembly VFP Programming Assembler Command-line Options ARM and Thumb Instructions VFP Instructions Directives Reference Via File Syntax
You can declare numeric, logical, or string variables using assembler directives.
The value of a variable can be changed as assembly proceeds. Variables are local to the assembler. This means that in the generated code or data, every instance of the variable has a fixed value.
The type of a variable cannot be changed. Variables are one of the following types:
The range of possible values of a numeric variable is the same as the range of possible values of a numeric constant or numeric expression.
The possible values of a logical variable are
The range of possible values of a string variable is the same as the range of values of a string expression.
a SETA 100 L1 MOV R1, #(a*5) ; In the object file, this is MOV R1, #500 a SETA 200 ; Value of 'a' is 200 only after this point. ; The previous instruction is always MOV R1, #500 … BNE L1 ; When the processor branches to L1, it executes ; MOV R1, #500
of your data.