6.5 Identifying versions of armasm in source code

The assembler defines the built-in variable ARMASM_VERSION to hold the version number of the assembler.

You can use it as follows:
    IF ( {ARMASM_VERSION} / 1000000) >= 5
      ; using armasm in ARM Compiler 5 or above
      ; using armasm in ARM Compiler 4.1 or earlier
The assembler also defines the built-in variable |ads$version| for legacy code. This variable did not exist before ADS and RVCT. If you have to build versions of your code using legacy development tools, you can test for the built-in variable |ads$version|. If this variable is not defined, then the assembler is part of a legacy development toolchain. Use code similar to the following:
    IF :DEF: |ads$version|
      ; code for RealView or ADS
      ; code for SDT (a legacy development toolchain)
Related reference
6.4 Built-in variables and constants
Non-ConfidentialPDF file icon PDF versionARM DUI0379G
Copyright © 2007, 2008, 2011, 2012, 2014, 2015 ARM. All rights reserved.