You copied the Doc URL to your clipboard.

3.7.7. MSR

Move the contents of a general-purpose register into the specified special register.

Syntax

MSRspec_reg, Rn

where:

Rn

Is the general-purpose source register.

spec_reg

Is the special-purpose destination register: APSR, IPSR, EPSR, IEPSR, IAPSR, EAPSR, PSR, MSP, PSP, PRIMASK, or CONTROL.

Operation

MSR updates one of the special registers with the value from the register specified by Rn.

See MRS.

Restrictions

In this instruction, Rn must not be SP and must not be PC.

If the current mode of execution is not privileged, then all attempts to modify any register other than the APSR are ignored.

Condition flags

This instruction updates the flags explicitly based on the value in Rn.

Examples

MSR  CONTROL, R1 ; Read R1 value and write it to the CONTROL register 

Was this page helpful? Yes No