public static void StartVM(VMOptions o) { Processor p = new Processor(); p.LibraryHandler.LoadLibraries(Directory.GetFiles("Libs/", "*Lib.dll"), true); byte[] program = File.ReadAllBytes(o.File); p.LoadProgram(program); p.Run(); }
static void Main(string[] args) { FileVerificator.EnsureFolders(); if (args.Contains("-c")) { CompilationOptions c = new CompilationOptions(); c.Files = GetFiles(args); StartCompiler(c); } else { VMOptions o = new VMOptions { File = args[0] }; StartVM(o); } }