예제 #1
0
 public override Decoder Instr(Opcode opcode, string format)
 {
     var mutators = new List<Mutator>();
     for (int i = 0; i < format.Length; ++i)
     {
         switch (format[i])
         {
         case 'r':
             {
                 ++i;
                 int n = Disassembler.ReadDecimal(format, ref i);
                 mutators.Add(Disassembler.Reg(n));
             }
             break;
         default:
             throw new NotImplementedException($"{format[i]}");
         }
     }
     return new ThreadedDecoder(opcode, mutators.ToArray());
 }