private static int opResult(string op) { var runner = new ElfCodeRunner( program: "ElfcodeInterpreter.ec", programMode: ElfCodeRunner.InputMode.Resource, input: op + " 0 0 0", inputMode: ElfCodeRunner.InputMode.String, numRegisters: 29); runner.DontBreak = true; return(runner.Run()); }
public static void Main(string[] args) { TestOperators(); Console.WriteLine(); var runner = new ElfCodeRunner( program: "ElfcodeInterpreter.ec", programMode: ElfCodeRunner.InputMode.Resource, input: @"#ip 3 setr 123 321 21 addr 456 6 54", inputMode: ElfCodeRunner.InputMode.String, numRegisters: 29); var exit = runner.Run(); Console.WriteLine("program exited with ip " + exit); Console.ReadLine(); }