public AsmService() { _asmReader = new AsmReader(@"s:\source\repos\Robotron_2084\Disassemblies\Robotron (Apple).asm"); _addressByLabel = _asmReader.AddressByLabelDictionary(); _labelByAddress = _asmReader.LabelByAddressDictionary(); _asmLineByAddress = _asmReader.AsmLineByAddressDictionary(); }
public string GetAsmLineByAddress(int address) { try { return(_reader.AsmLineByAddressDictionary()[address].Line); } catch { return($"#unknown address {address}"); } }
public void ScrollToAddress(int address, ScrollMode scrollMode = ScrollMode.Default) { AsmLine asmLine; if (!AsmReader.AsmLineByAddressDictionary().TryGetValue(address, out asmLine)) { return; } AsmListBoxItem scrollItem = _itemsByAsmLine[asmLine]; ScrollToItem(scrollItem, scrollMode); }