Beispiel #1
0
 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);
     }
 }
Beispiel #2
0
 static void Main(string[] args)
 {
     try
     {
         var controller = new AssemblyController(args, SetCpu, SelectFormatProvider);
         controller.Assemble();
     }
     catch (Exception ex)
     {
         Console.Error.WriteLine(ex.Message);
     }
 }