static void Main(string[] args) { Options myOptions = new Options(); myOptions.Parse(args); if (myOptions.GetExec() && myOptions.GetLoad()) { Computer myComputer = new Computer(myOptions); myComputer.endRun += new Computer.EventHandler(delegate { }); myComputer.putChar += new Computer.EventHandler(delegate { }); myComputer.abort = false; myComputer.Run(); Environment.Exit(0); } else if (myOptions.GetTest()) { TestMemory.RunTests(); TestLoader.RunTests(myOptions); TestComputer.RunTests(myOptions); TestCPU.RunTests(myOptions); TestRegisters.RunTests(myOptions); Environment.Exit(0); } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new ARMSimForm(myOptions)); }
static void Main(string[] args) { Options myOptions = new Options(); myOptions.Parse(args); if (myOptions.GetTest()) { TestRAM.RunTests(); TestLoader.RunTests(myOptions); Environment.Exit(0); } RAMsim myRam = new RAMsim(myOptions.GetMemSize()); Loader myLoader = new Loader(myOptions, myRam); myLoader.Load(); }