public bool DumpAssemblerLine( MemoryArea mem, IProcessorArchitecture arch, MachineInstruction instr, InstrWriter writer, MachineInstructionRendererOptions options) { var instrAddress = instr.Address; Address addrBegin = instrAddress; if (ShowAddresses) { writer.WriteFormat("{0} ", addrBegin); } if (ShowCodeBytes) { WriteOpcodes(mem, arch, instrAddress, instrAddress + instr.Length, writer); if (instr.Length * 3 < 16) { writer.WriteString(new string(' ', 16 - (instr.Length * 3))); } } writer.WriteString("\t"); instr.Render(writer, options); writer.WriteLine(); return(true); }
public void WriteByteRange(MemoryArea image, Address begin, Address addrEnd, InstrWriter writer) { EndianImageReader rdr = arch.CreateImageReader(image, begin); while (rdr.Address < addrEnd) { writer.WriteString(string.Format("{0:X2} ", rdr.ReadByte())); } }
public bool DumpAssemblerLine(MemoryArea mem, MachineInstruction instr, InstrWriter writer) { Address addrBegin = instr.Address; if (ShowAddresses) { writer.WriteFormat("{0} ", addrBegin); } if (ShowCodeBytes) { WriteByteRange(mem, instr.Address, instr.Address + instr.Length, writer); if (instr.Length * 3 < 16) { writer.WriteString(new string(' ', 16 - (instr.Length * 3))); } } writer.WriteString("\t"); writer.Address = addrBegin; writer.Address = instr.Address; instr.Render(writer, MachineInstructionWriterOptions.None); writer.WriteLine(); return(true); }