static void virtualSystem_ClockCycleScheduled(object sender, ClockCycleScheduledEventArgs e) { if (e.Cpu.ProgramCounter < programMemory.Size) { Word instruction = programMemory[e.Cpu.ProgramCounter]; string binRepresentation = instruction.ToString(); Console.WriteLine("Executing: {1,4:X} | {2} {3} @ {0,-3}", e.Cpu.ProgramCounter, instruction.UnsignedValue, binRepresentation.Substring(0, 8), binRepresentation.Substring(8, 8)); } else { Console.WriteLine("Executing: [Out of memory bounds] @ {0,-3}", e.Cpu.ProgramCounter); } }
private void onClockCycleScheduled(object sender, ClockCycleScheduledEventArgs e) { NotifyPropertyChanged(nameof(Steps)); }