3.2.2. Changing the assembler mode

The ARM assembler can assemble both Thumb code and ARM code. By default, it assembles ARM code unless it is invoked with the -16 option.

Because all Thumb-capable ARM processors start in ARM state, you must use the BX instruction to branch and exchange to Thumb state, and then use the CODE16 directive to instruct the assembler to assemble Thumb instructions. Use the corresponding CODE32 directive to instruct the assembler to return to assembling ARM instructions.

Refer to the ADS Assembler Guide for more information on these directives.

Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI 0056D
Non-Confidential