示例#1
0
        private void LoadMicrocode(string microcodeSourceFile)
        {
            Console.WriteLine("Loading microcode definition...");

            this.microcodeCompiler = MicrocodeCompiler.Compile(microcodeSourceFile);

            Console.WriteLine("Microcode loaded!");
            Console.WriteLine();
        }
        public static MicrocodeCompiler Compile(string fileName)
        {
            string targetFileName = fileName.Split('.', StringSplitOptions.RemoveEmptyEntries).First() + ".bin";
            string source         = File.ReadAllText(fileName);

            _compiler = new MicrocodeCompiler(source, targetFileName);
            _compiler.Compile();

            return(_compiler);
        }