You copied the Doc URL to your clipboard.

Load 32-bit values to a register using MOV32

Both A32 and T32 instruction sets include:

  • A MOV instruction that can load any value in the range 0x00000000 to 0x0000FFFF into a register.

  • A MOVT instruction that can load any value in the range 0x0000 to 0xFFFF into the most significant half of a register, without altering the contents of the least significant half.

You can use these two instructions to construct any 32-bit immediate value in a register. Alternatively, you can use the MOV32 pseudo-instruction. armasm generates the MOV, MOVT instruction pair for you.

You can also use the MOV32 pseudo-instruction to load addresses into registers by using a label or any PC-relative expression in place of an immediate value. armasm puts a relocation directive into the object file for the linker to resolve the address at link-time.

See also