public Instruction Resolve(BitArray rawInstruction) { if (_instructionFactory != null) { return(_instructionFactory.Create()); } foreach (var resolverConfig in _opSizes) { var sample = rawInstruction.CopySlice(_offset, (int)resolverConfig.Key); if (resolverConfig.Value.TryGetValue(sample.ToUnsignedInt(), out var resolver)) { var result = resolver.Resolve(rawInstruction); if (result != null) { return(result); } } } return(null); }
public string Format(BitArray data, uint position) { return(Strategy.Format(data.CopySlice(Offset, Size), position)); }