private MachineInstruction RunTest(params ushort [] words) { var bytes = new byte[words.Length * 2]; LeImageWriter writer = new LeImageWriter(bytes); foreach (ushort word in words) { writer.WriteLeUInt16(word); } var image = new LoadedImage(Address.Ptr16(0x200), bytes); var rdr = new LeImageReader(image, 0); var arch = new Pdp11Architecture(); var dasm = new Pdp11Disassembler(rdr, arch); return dasm.First(); }
private MachineInstruction RunTest(params ushort[] words) { var bytes = new byte[words.Length * 2]; LeImageWriter writer = new LeImageWriter(bytes); foreach (ushort word in words) { writer.WriteLeUInt16(word); } var image = new MemoryArea(Address.Ptr16(0x200), bytes); var rdr = new LeImageReader(image, 0); var arch = new Pdp11Architecture(new ServiceContainer(), "pdp11"); var dasm = new Pdp11Disassembler(rdr, arch); return(dasm.First()); }
private MachineInstruction[] DisassembleWords(params ushort[] words) { var bytes = new byte[words.Length * 2]; LeImageWriter writer = new LeImageWriter(bytes); foreach (ushort word in words) { writer.WriteLeUInt16(word); } var image = new MemoryArea(Address.Ptr16(0x200), bytes); var rdr = new LeImageReader(image, 0); var arch = new Pdp11Architecture(); var dasm = new Pdp11Disassembler(rdr, arch); return(dasm.ToArray()); }
protected override IEnumerable <RtlInstructionCluster> GetRtlStream(MemoryArea mem, IStorageBinder binder, IRewriterHost host) { var dasm = new Pdp11Disassembler(arch.CreateImageReader(mem, 0), arch); return(new Pdp11Rewriter(arch, dasm, binder, base.CreateHost())); }
protected override IEnumerable<RtlInstructionCluster> GetInstructionStream(Frame frame, IRewriterHost host) { var dasm = new Pdp11Disassembler(arch.CreateImageReader(image, 0), arch); return new Pdp11Rewriter(arch, dasm, frame); }
protected override IEnumerable <RtlInstructionCluster> GetInstructionStream(Frame frame, IRewriterHost host) { var dasm = new Pdp11Disassembler(arch.CreateImageReader(image, 0), arch); return(new Pdp11Rewriter(arch, dasm, frame, base.CreateHost())); }