static void Main(string[] args) { try { var controller = new AssemblyController(args); AssemblerBase cpuAssembler; if (Assembler.Options.CPU.Equals("z80")) { Assembler.BinaryFormatProvider = new Z80FormatProvider(); cpuAssembler = new Z80Asm(); } else { if (Assembler.Options.Format.Equals("d64")) { Assembler.BinaryFormatProvider = new D64FormatProvider(); } else { Assembler.BinaryFormatProvider = new M6502FormatProvider(); } cpuAssembler = new Asm6502(); } controller.AddAssembler(cpuAssembler); controller.Assemble(); } catch (Exception ex) { Console.Error.WriteLine(ex.Message); } }
static void Main(string[] args) { try { var controller = new AssemblyController(args, SetCpu, SelectFormatProvider); controller.Assemble(); } catch (Exception ex) { Console.Error.WriteLine(ex.Message); } }