public MIPSTest()
        {
            var file = File.ReadAllText("/home/shr/codes/courses/Orga/final/mips_sim/code.mips");

            vm.LoadInstructions(file);
            vm.SetReg(31, -100);
        }
Exemple #2
0
        static void Main(string[] args)
        {
            VirturalMachine vm = new VirturalMachine();

            var file = File.ReadAllText("/home/shr/codes/courses/Orga/final/mips_sim/code.mips");
            var a    = ASM.ASM.InstsToCoe(Parser.Parser.Parse(file).insts);

            File.WriteAllText("/home/shr/codes/courses/Orga/final/mips_sim/code.coe", a);
            vm.LoadInstructions(file);
            while (vm.Exec())
            {
                ;
            }
            Console.WriteLine("Hello World!");
        }