Beispiel #1
0
 /**
  * @brief Resets everything on the simulator.
  */
 public void Reset()
 {
     if (currentlyProcessing)
     {
         Debug.Log("Cannot perform execute as CPU is currently processing");
     }
     else
     {
         //Reset CU
         currentInstruction         = null;
         currentCommandDisplay.text = "\0";
         //Empty memory
         memory.EmptyMemory();
         //Reset registers
         PC.Reset();
         MAR.Reset();
         MDR.Reset();
         IR.Reset();
         GPA.Reset();
         GPB.Reset();
         //Reset the ALU
         ALU.Reset();
         //Reset the clock
         clock.Reset();
         //Set up the first instruction in the CU.
         SetCurrentInstructionFromCU(0);
         ConsoleControl.CONSOLE.LogMessage("CPU Reset");
     }
 }