21.7 ARM or CODE32 directive

The ARM directive instructs the assembler to interpret subsequent instructions as A32 instructions, using either the UAL or the pre-UAL Arm® assembler language syntax. CODE32 is a synonym for ARM.


Not supported for AArch64 state.




In files that contain code using different instruction sets, the ARM directive must precede any A32 code.

If necessary, this directive also inserts up to three bytes of padding to align to the next word boundary.

This directive does not assemble to any instructions. It also does not change the state. It only instructs armasm to assemble A32 instructions as appropriate, and inserts padding if necessary.


This example shows how you can use ARM and THUMB directives to switch state and assemble both A32 and T32 instructions in a single area.

        AREA ToT32, CODE, READONLY      ; Name this block of code
        ENTRY                           ; Mark first instruction to execute
        ARM                             ; Subsequent instructions are A32 
        ADR     r0, into_t32 + 1        ; Processor starts in A32 state 
        BX      r0                      ; Inline switch to T32 state
        THUMB                           ; Subsequent instructions are T32
        MOVS    r0, #10                 ; New-style T32 instructions
Non-ConfidentialPDF file icon PDF versionDUI0801J
Copyright © 2014–2017, 2019 Arm Limited or its affiliates. All rights reserved.