| |||
| Home > Interworking ARM and Thumb > Assembly language interworking > 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.