public RetroDevStudio.Parser.CompileConfig CheckParams(string[] Args, out string AdditionalDefines, out bool ShowNoWarnings, out List <string> WarningsToIgnore)
        {
            RetroDevStudio.Parser.CompileConfig config = null;
            AdditionalDefines = null;
            ShowNoWarnings    = false;
            WarningsToIgnore  = new List <string>();

            if (Args.Length == 0)
            {
                WriteHelp();
                return(config);
            }

            if (!_Args.CheckParameters(Args))
            {
                WriteHelp();
                return(config);
            }

            if ((_Args.IsParameterSet("V")) ||
                (_Args.IsParameterSet("-VERSION")))
            {
                Version version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;

                Console.WriteLine($"C64Ass Assembler V{version}");
                return(null);
            }

            // last arg is filename?
            if (_Args.UnknownArgumentCount() < 1)
            {
                // last arg should be file name!
                WriteHelp();
                return(config);
            }

            config           = new RetroDevStudio.Parser.CompileConfig();
            config.InputFile = _Args.UnknownArgument(_Args.UnknownArgumentCount() - 1);

            if (_Args.IsParameterSet("O"))
            {
                config.OutputFile = _Args.Parameter("O");
            }
            if (_Args.IsParameterSet("OUTFILE"))
            {
                config.OutputFile = _Args.Parameter("OUTFILE");
            }
            if (_Args.IsParameterSet("L"))
            {
                config.LabelDumpFile = _Args.Parameter("L");
            }
            if (_Args.IsParameterSet("-LABELDUMP"))
            {
                config.LabelDumpFile = _Args.Parameter("LABELDUMP");
            }
            if (_Args.IsParameterSet("LIB"))
            {
                config.LibraryFiles = _Args.Parameter("LIB").Split(',').ToList();
            }
            if (_Args.IsParameterSet("LIBRARY"))
            {
                config.LibraryFiles = _Args.Parameter("LIBRARY").Split(',').ToList();
            }
            if (_Args.IsParameterSet("N"))
            {
                ShowNoWarnings = true;
            }
            if (_Args.IsParameterSet("-NOWARNINGS"))
            {
                ShowNoWarnings = true;
            }
            if (_Args.IsParameterSet("I"))
            {
                ParseWarnings(WarningsToIgnore, _Args.Parameter("I"));
            }
            if (_Args.IsParameterSet("-IGNORE"))
            {
                ParseWarnings(WarningsToIgnore, _Args.Parameter("-IGNORE"));
            }
            config.AutoTruncateLiteralValues = _Args.IsParameterSet("-AUTOTRUNCATELITERALS");

            for (int i = 0; i < _Args.UnknownArgumentCount() - 1; ++i)
            {
                var curArg = _Args.UnknownArgument(i).ToUpper();
                if ((curArg == "-D") ||
                    (curArg == "--DEFINE"))
                {
                    if (i + 1 >= _Args.UnknownArgumentCount() - 1)
                    {
                        // no argument for define
                        WriteHelp();
                        return(null);
                    }
                    AdditionalDefines += _Args.UnknownArgument(i + 1) + "\r\n";
                    ++i;
                }
                else
                {
                    Console.WriteLine("Unsupported argument: " + _Args.UnknownArgument(i));
                    WriteHelp();
                    return(null);
                }
            }

            if ((_Args.IsParameterSet("F")) ||
                (_Args.IsParameterSet("-FORMAT")))
            {
                string outputFormat = _Args.IsParameterSet("F") ? _Args.Parameter("F") : _Args.Parameter("-FORMAT");

                if (string.Compare(outputFormat, "PLAIN", true) == 0)
                {
                    config.TargetType = RetroDevStudio.Types.CompileTargetType.PLAIN;
                }
                else if (string.Compare(outputFormat, "CBM", true) == 0)
                {
                    config.TargetType = RetroDevStudio.Types.CompileTargetType.PRG;
                }
                else if (string.Compare(outputFormat, "D64", true) == 0)
                {
                    config.TargetType = RetroDevStudio.Types.CompileTargetType.D64;
                }
            }

            if (_Args.IsParameterSet("-SETPC"))
            {
                int startPC = GR.Convert.ToI32(_Args.Parameter("-SETPC"));
                if ((startPC >= 0) &&
                    (startPC < 65536))
                {
                    config.StartAddress = startPC;
                }
            }
            return(config);
        }