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
    ELSE
      ; using armasm in ARM Compiler 4.1 or earlier
    ENDIF

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
    ELSE
      ; code for SDT (a legacy development toolchain)
    ENDIF
Non-ConfidentialPDF file icon PDF versionARM DUI0473M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.