Keil Logo

Identifying versions of armasm in source code

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 DUI0379H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  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.