Assembler Reference

3.6.6Register-relative and program-relative expressions

A register-relative expression evaluates to a named register plus or minus a numeric constant (see MAP on page 7-15).

A program-relative expression evaluates to the program counter (pc), plus or minus a numeric constant. It is normally a label combined with a numeric expression.

Example

 

LDR

r4,=data+4*n

; n is an assembly-time variable

 

; code

 

 

 

MOV

pc,lr

 

data

DCD

value0

 

 

; n-1 DCD directives

 

 

DCD

valuen

; data+4*n points here

;more DCD directives

3.6.7Logical expressions

Logical expressions consist of combinations of logical literals ({TRUE} or {FALSE}), logical variables, Boolean operators, relations, and parentheses (see Boolean operators on page 3-31).

Relations consist of combinations of variables, literals, constants, or expressions with appropriate relational operators (see Relational operators on page 3-30).

3.6.8Logical literals

There are only two logical literals:

{TRUE}

{FALSE}.

ARM DUI 0068B

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

3-23

Page 101
Image 101
ARM VERSION 1.2 manual Register-relative and program-relative expressions, Logical expressions, Logical literals