public void Add(BinLabel label) { try { dict.Add(label.Name, label); } catch (Exception e) { throw new Exception(label.Name + "\n" + e); } }
public void Resolve(List <BinElement> list, byte[] data) { BinLabel label = (BinLabel)list.Find(e => e is BinLabel l && labelName == l.Name); if (label == null) { throw new Exception("Label could not be found: " + labelName); } int reference = (label.Address) - (this.refAddress + 4); byte[] buf = BitConverter.GetBytes(reference); Buffer.BlockCopy(buf, 0, data, this.refAddress, 4); }
public void Add(BinLabel label) { dict.Add(label.Name, label); }