Exemple #1
0
        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));
        }
Exemple #2
0
        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));
        }