ARM or CODE32 directive
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
NoteNot 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
to switch state and assemble both A32 and T32 instructions in a
AREA ToT32, CODE, READONLY ; Name this block of code ENTRY ; Mark first instruction to execute ARM ; Subsequent instructions are A32 start ADR r0, into_t32 + 1 ; Processor starts in A32 state BX r0 ; Inline switch to T32 state THUMB ; Subsequent instructions are T32 into_t32 MOVS r0, #10 ; New-style T32 instructions