Example #1
0
 private void NotifyInstructionWillExecute(ushort rawInstruction, Instruction instruction)
 {
     if (this.InstructionWillExecute != null)
     {
         this.InstructionWillExecute(rawInstruction, instruction);
     }
 }
Example #2
0
        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());
        }