public bool Step() { char[] stepCommand = VirtualMemory.GetValue(GetICRegisterValue()); char[] nextCommand = VirtualMemory.GetValue(GetICRegisterValue() + 1); string stringCommand = new string(stepCommand); string stringNext = new string(nextCommand); Console.WriteLine("STEP: " + stringCommand + " (NEXT: " + stringNext + ")"); bool commandResult = CommandInterpretator.ParseCommand(stepCommand); if (Test()) { if (!Interrupt()) { FileManager.CloseAll(); return(false); } } if (ChangedIC) { ChangedIC = false; } else { IncICRegisterValue(1); } if (UseMaxStep && CurrentStep++ >= Utility.MAX_STEPS) { return(StopProgram()); } return(commandResult); }
private static void Main() { var interpretator = new CommandInterpretator(); var input = Console.ReadLine(); while (input != "END") { interpretator.ParseCommand(input); input = Console.ReadLine(); } }