예제 #1
0
 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();
 }
예제 #2
0
        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());
        }
예제 #3
0
        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());
        }
예제 #4
0
        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()));
        }
예제 #5
0
 protected override IEnumerable<RtlInstructionCluster> GetInstructionStream(Frame frame, IRewriterHost host)
 {
     var dasm = new Pdp11Disassembler(arch.CreateImageReader(image, 0), arch);
     return new Pdp11Rewriter(arch, dasm, frame);
 }
예제 #6
0
        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()));
        }