예제 #1
0
        public List <ObservableCommand> LoadFile(string[] hLines)
        {
            // Reset out components
            ArmCore.Reset();
            Memory.Initialise();

            // Parse the program code
            var parser = new Parser();

            parser.ParseFile(hLines);

            // Compile and Link
            var linker      = new Linker(Memory, parser);
            var commandList = linker.CompileAndLink();

            ArmCore.SetEntryPoint(linker.EntryPoint);

            // Return commandlist to our ViewModel
            return(commandList);
        }
예제 #2
0
        // Only necessary for unit tests
        public void TestCommand([NotNull] string commandLine)
        {
            var command = Parser.ParseLine(commandLine);

            ArmCore.TestCommand(command);
        }