Keil Logo

Optional hash with immediate constants

4.20 Optional hash with immediate constants

You do not have to specify a hash before an immediate constant in any instruction syntax.

This applies to Thumb and VFP instructions. For example, the following are valid instructions:
    BKPT 100
    MOVT R1, 256
    
By default, the assembler warns if you do not specify a hash:
WARNING: A1865W: '#' not seen before constant expression.
You can suppressed this with --diag_suppress=1865.
If you use the assembly code with another assembler, you are advised to use the # before all immediates. The disassembler always shows the # for clarity.
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.