Esempio n. 1
0
        }//SetCPUMode

        /// <summary>
        /// Restore the cpu back to its original mode before the interrupt occurred.
        /// Retrieve the cpsr back from the spsr table based on the current cpu mode and restore cpsr.
        /// Based on the mode in the cpsr, switch the cpu back to that mode.
        /// </summary>
        public void RestoreCPUMode()
        {
            //retrieve the original cpsr back from the spsr table
            uint cpsr = _spsr[(int)mCPUMode.Mode];

            Flags = cpsr;

            //switch the cpu back to the original mode from the mode bits in the cpsr
            mCPUMode = CPUMode.bitsTocpuMode(cpsr);
        } //SetCPUModeReturn