Moving Data within the Processor
Instruction MOV
Function Move register into register
Syntax (pre-UAL) MOV <Rd>, <Rm>
CPY <Rd>, <Rm>
Note Rm and Rn can be high or low registers.
CPY is a pre-UAL synonym for MOV (register).
Instruction MOVS/ADDS
Function Move register into register
Syntax (UAL) MOVS <Rd>, <Rm>
ADDS <Rd>, <Rm>, #0
Syntax (pre-UAL) MOVS <Rd>, <Rm>
Note Rm and Rn are both low registers.
APSR.Z, APSR.N, and APSR.C (for ADDS) update.
ADDS <Rd>, <Rm>, #0
Syntax (pre-UAL) MOVS <Rd>, <Rm>
Note Rm and Rn are both low registers.
APSR.Z, APSR.N, and APSR.C (for ADDS) update.
Instruction MOV
Function Move immediate data (sign extended) into register
Syntax (UAL) MOVS <Rd>, #immed8
Syntax (pre-UAL) MOV <Rd>, #immed8
Note Immediate data range 0 to รพ255.
APSR.Z and APSR.N update.
Instruction MRS
Function Move Special Register into register
Note Example:
MRS R0, CONTROL ; Read CONTROL register into R0
MRS R9, PRIMASK ; Read PRIMASK register into R9
MRS R3, XPSR ; Read xPSR register into R3
Instruction MSR
Function Move register into Special Register
Note Example:
MSR CONTROL, R0 ; Write R0 into CONTROL register
MSR PRIMASK, R9 ; Write R9 into PRIMASK register
No comments:
Post a Comment