/// <summary> /// Initializes a new instance of the <see cref="T:System.Object" /> class. /// </summary> /// <param name="memorySections">Memory map for disassembly</param> /// <param name="memoryContents">The contents of the memory to disassemble</param> /// <param name="disasmFlags">Optional flags to be used with the disassembly</param> public Z80Disassembler(IEnumerable <MemorySection> memorySections, byte[] memoryContents, SpectrumSpecificDisassemblyFlags disasmFlags = 0) { MemorySections = memorySections; MemoryContents = memoryContents; DisassemblyFlags = disasmFlags; }
public DisassemblyDecorationData() { Labels = new Dictionary <ushort, string>(); Comments = new Dictionary <ushort, string>(); PrefixComments = new Dictionary <ushort, string>(); Literals = new Dictionary <ushort, List <string> >(); LiteralReplacements = new Dictionary <ushort, string>(); MemorySections = new List <MemorySection>(); DisassemblyFlags = 0; }
public static void Test(SpectrumSpecificDisassemblyFlags flags, string[] expected, params byte[] opCodes) { var map = new MemoryMap { new MemorySection(0x0000, (ushort)(opCodes.Length - 1)) }; var disassembler = new Z80Disassembler(map, opCodes, flags); var output = disassembler.Disassemble(); output.OutputItems.Count.ShouldBe(expected.Length); for (var i = 0; i < expected.Length; i++) { output.OutputItems[i].Instruction.ToLower().ShouldBe(expected[i]); } }
public DisassemblyAnnotation() { InitReadOnlyProps(); MemoryMap = new MemoryMap(); DisassemblyFlags = 0; }
/// <summary> /// Sets the disassembly flag to the specified value /// </summary> /// <param name="flag">Disassembly flag</param> public void SetDisassemblyFlag(SpectrumSpecificDisassemblyFlags flag) { DisassemblyFlags = flag; }