Esempio n. 1
0
 private void Start()
 {
     if (Data.IsProgramInitialized())
     {
         FileRegister.IsReadOnly = true;
         StepTimer.Start();
     }
 }
Esempio n. 2
0
 private void Button_Step_Click(object sender, RoutedEventArgs e)
 {
     if (Data.IsProgramInitialized())
     {
         ProgramStep();
         UpdateUI();
         CheckOutOfProgramRange();
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Step function. Executes current command of loaded program and increases PC
 /// </summary>
 /// <returns>false if within program bounds, true if PC left program bounds</returns>
 public static void PCStep()
 {
     if (Data.IsProgramInitialized())
     {
         if (!Data.IsSleeping())
         {
             if (Data.GetPC() < Data.GetProgram().Count)
             {
                 Data.Command com = Data.GetProgram()[Data.GetPC()];
                 Data.IncPC();
                 InstructionProcessor.Execute(Data.InstructionLookup(com), com);
             }
             else //PC has left program area
             {
                 Data.IncPC();
             }
         }
         SkipCycle();
     }
 }