Exemple #1
0
 public void Execute(InitialProcessData iPD)
 {
     iPD.Upload(MRT.Registers);
     do
     {
         int c = MRT.Registers[12];
         MRT.Cache.Stream.Seek(c);
         b  = Instruct.Pop(MRT.Cache.Stream);
         c += b.NCLength();
         MRT.Registers[12] = c;
         UAL.BasicInstructions[b.Function](b.Desdestination, b.Source);
     } while (b.Function != 0);
 }
Exemple #2
0
        public void Execute(int instructionsPointer, int dataPointer, int stackPointer)
        {
            MRT.Registers["cs"] = instructionsPointer;
            MRT.Registers["sp"] = dataPointer;
            MRT.Registers["ss"] = stackPointer;
            Instruct b;

            do
            {
                int c = MRT.Registers[12];
                MRT.Cache.Stream.Seek(instructionsPointer + c);
                b  = Instruct.Pop(MRT.Cache.Stream);
                c += b.NCLength();
                MRT.Registers[12] = c;
                UAL.BasicInstructions[b.Function](b.Desdestination, b.Source);
            } while (b.Function != 0);
        }
Exemple #3
0
        private static void ExtractMethode(StreamWriter c, MethodInfo method, ref string s)
        {
            var ee = new StreamReader(c);
            var a  = new StringBuilder(method.MethodSize);

            ee.Seek(method.Offset);
            a.Append(s + "\r\n----------------" + method + "-----------------");
            var end = method.MethodSize + method.Offset;

            do
            {
                var      s1 = "\r\n" + ee.Offset.ToString("D4") + " :";
                Instruct g  = Instruct.Pop(ee);
                a.Append(s1 + g);
            } while (ee.Offset < end);
            a.Append("\r\n----------------" + "************************" + "-----------------");
            s = a.ToString();
        }
Exemple #4
0
        public static void _Test()
        {
            while (true)
            {
                __test();

                var parse = new BasicParse {
                    Pile = new Pile(Prg_Example)
                };
                var parent = new Tree(parse.Pile, null, Kind.Program);
                var glob   = CurrentScop.Initialize("globe");
                Update(parse);
                var s = new Space(parse);
                if (s.Parse(parent))
                {
                    var byteCode = new ByteCodeMapper(glob);
                    var load     = new LoadClasses(byteCode);
                    load.Add(parent[0]);
                    load.Compile();
                    var inst = load.Optimum.Instructs;
                    var sw   = new IO.Stream.StreamWriter(true);
                    for (int i = 0; i < inst.Count; i++)
                    {
                        inst[i].Push(sw);
                    }
                    var tt = inst[0].Length;
                    var sr = new IO.Stream.StreamReader(sw);
                    for (int i = 0; i < inst.Count; i++)
                    {
                        var x     = Instruct.Pop(sr);
                        var isieq = x.Equals(inst[i]);
                        if (!isieq)
                        {
                        }
                    }
                }
            }
        }