|Function||Move data into register|
MOV will move data into the specified register.
If the S bit is set (MOVS), the N and Z flags are set according to the value moved (after shifting, if shifter used), and the C flag is set by the shifter.
MOV is useful for transferring the contents of registers, setting registers prior to specific operations, perform a shift without requiring more complicated maths (LSL #x to multiply by 2x), update PC to return after a subroutine (the infamous
MOV PC, LR).
Use MVN to place negative values into registers.
MOV<suffix> <dest>, <op 1>
dest = op_1
MOV R0, R0 ; equivalent to a NOP MOV R0, R0, LSL#3 ; R0 = R0 * 8
The instruction bit pattern is as follows:
|31 - 28||27||26||25||24 - 21||20||19 - 16||15 - 12||11 - 0|
|condition||0||0||I||1 1 0 1||S||SBZ||dest||op/shift|