How can ARM's MOV instruction work with a large number as the second operand?

前端 未结 7 2005
陌清茗
陌清茗 2020-12-28 17:23

I just begin to study ARM assembly language, and am not clear about how to use MOV to transfer an immediate number into a register.

From both the ARM reference manual

7条回答
  •  无人及你
    2020-12-28 17:59

    If you want to move 0xffffffff to a register you can always do:

    MOV R0, #-1
    

    because 0xffffffff is the twos-complement representation of -1

提交回复
热议问题