13.07.2015 Views

Cortex-M0+ Devices Generic User Guide - Keil

Cortex-M0+ Devices Generic User Guide - Keil

Cortex-M0+ Devices Generic User Guide - Keil

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The <strong>Cortex</strong>-<strong>M0+</strong> Instruction Set3.7.6 MRSMove the contents of a special register to a general-purpose register.SyntaxMRS Rd, spec_regwhere:Rdspec_regIs the general-purpose destination register.Is one of the special-purpose registers: APSR, IPSR, EPSR, IEPSR, IAPSR, EAPSR, PSR,MSP, PSP, PRIMASK, or CONTROL.OperationMRS stores the contents of a special-purpose register to a general-purpose register. The MRSinstruction can be combined with the MSR instruction to produce read-modify-write sequences,that are suitable for modifying a specific flag in the PSR.See MSR on page 3-43.RestrictionsIn this instruction, Rd must not be SP or PC.If the current mode of execution is not privileged, then the values of all registers other than theAPSR read as zero.Condition flagsThis instruction does not change the flags.ExamplesMRSR0, PRIMASK ; Read PRIMASK value and write it to R0ARM DUI 0662A Copyright © 2012 ARM. All rights reserved. 3-42ID041812Non-Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!