public void run() { Console.WriteLine("0.0.1V use with caution..."); while (!exit) { Console.Write("RMCMD>"); string[] t = (Console.ReadLine()).Split(' '); if (File.Exists(t[0])) { if (t.Length > 1) { if (t[1] == "d") { cpu.setDebug(true); } else { cpu.setDebug(false); } } else { cpu.setDebug(false); } cpu.resetVM(); ProgramReader tmp = new ProgramReader(t[0], 16 * 16); cpu.getMemory().newPaging(tmp.getMemory()); VirtualMachine vm = new VirtualMachine(cpu, cpu.getDebug()); vm.run(); } else if (t[0] == "exit") { exit = true; } else if (t[0] == "cls" || t[0] == "clear") { Console.Clear(); } else if (t[0] == "pm") { cpu.memory.printMemory(); } else if (t[0] == "alloc" && t.Length > 1) { cpu.memory.allocateBlock(Convert.ToInt32(t[1])); } else { Console.WriteLine("File/Command \"" + t[0] + "\" not found!"); } } }