private void NotifyInstructionWillExecute(ushort rawInstruction, Instruction instruction) { if (this.InstructionWillExecute != null) { this.InstructionWillExecute(rawInstruction, instruction); } }
private static void InstructionDidExecute(ushort rawInstruction, Instruction instruction) { const int MaxInstructionsToDisplay = 11; if (ExecutedInstructions.Count > MaxInstructionsToDisplay) { ExecutedInstructions.Clear(); ExecutedInstructions.Add(new KeyValuePair<ushort, Instruction>(rawInstruction, instruction)); DisplayExecutedInstructions(); } int line = ExecutedInstructions.Count + 1; ConsoleEx.WriteAt(17, line, string.Format(HexFormatString, rawInstruction)); ConsoleEx.WriteAt(24, line, instruction.ToString()); }