Keil Logo

+ Assembler Operator

Arguments
+ operand
operand + operand


Description

The plus sign ('+') is used as the unary plus operator and as the addition operator.

The unary plus operator is used to assign a positive value to the specified operand. This operator does effectively nothing to alter the value of the operand.

The addition operator is used to add the values of two operands which may be absolute or relocatable. The type of the resulting expression is determined by the operand types as shown in the following table:

Operand Types Resulting Expression Type
absolute + absolute absolute
absolute + relocatable relocatable
relocatable + absolute relocatable
relocatable + relocatable Error: Not allowed.

Note

  • As a general rule, relocatable expressions must evaluate to a relocatable symbol plus or minus an optional constant value (displacement).
See Also

-

Example
labx:   MOV     R1, #1234+5678
        MOV     R2, labx+10h
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.