Inheritance: Reko.Core.ProcessorArchitecture
Example #1
0
 public Pdp11Assembler(Pdp11Architecture arch, Address addrBase, IEmitter emitter)
 {
     this.arch = arch;
     this.BaseAddress = addrBase ?? Address.Ptr16(0x100);
     this.emitter = emitter;
     this.Equates = new Dictionary<string, object>();
     this.symtab = new SymbolTable();
 }
Example #2
0
        public override Program Load(Address addrLoad)
        {
            var arch = new Pdp11Architecture();

            return new Program(
                new SegmentMap(addrLoad,
                new ImageSegment(".text",
                        new MemoryArea(addrLoad, RawImage),
                        AccessMode.ReadWriteExecute)),
                arch,
                new RT11Platform(Services, arch));
        }
Example #3
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();
 }
Example #4
0
        public Program Assemble(Address addrBase, TextReader reader)
        {
            arch = new Pdp11Architecture();
            Assembler = new Pdp11Assembler(arch, addrBase, emitter);
            lexer = new Lexer(reader);

            // Assemblers are strongly line-oriented.

            while (lexer.Peek().Type != TokenType.EOF)
            {
                ProcessLine();
            }

            //asm.ReportUnresolvedSymbols();
            StartAddress = addrBase;
            return Assembler.GetImage();
        }
Example #5
0
        public override Program Load(Address addrLoad)
        {
            var arch = new Pdp11Architecture();
            arch.Name = "pdp11";

            var rdr = new LeImageReader(RawImage);
            byte b;
            while (rdr.TryPeekByte(0, out b) && b == 0)
            {
                rdr.Offset += 1;
            }

            var segMap = ReadDataBlocks(rdr);

            var platform = new RT11Platform(Services, arch);
            var program = new Program
            {
                Architecture = arch,
                Platform = platform,
                SegmentMap = segMap
            };
           
            return program;
        }
Example #6
0
 public Pdp11ProcessorState(Pdp11ProcessorState that) : base(that)
 {
     this.arch  = that.arch;
     this.regs  = (ushort[])that.regs.Clone();
     this.valid = (bool[])that.valid.Clone();
 }
Example #7
0
 public Pdp11ProcessorState(Pdp11Architecture arch)
 {
     this.arch  = arch;
     this.regs  = new ushort[22];
     this.valid = new bool[22];
 }
Example #8
0
 public OperandParser(Pdp11Architecture arch, Lexer lexer, Pdp11Assembler asm)
 {
     this.arch = arch;
     this.lexer = lexer;
     this.asm = asm;
 }
Example #9
0
 public Pdp11ProcessorState(Pdp11ProcessorState that)
 {
     this.arch = that.arch;
     this.regs = (ushort[])that.regs.Clone();
     this.valid = (bool[])that.valid.Clone();
 }
Example #10
0
 public RT11Platform(IServiceProvider services, Pdp11Architecture arch) 
     : base(services, arch, "RT-11")
 {
     this.services = services;
     this.arch = arch;
 }
Example #11
0
 public Pdp11Rewriter(Pdp11Architecture arch, IEnumerable <Pdp11Instruction> instrs, Frame frame)
 {
     this.arch   = arch;
     this.instrs = instrs.GetEnumerator();
     this.frame  = frame;
 }
Example #12
0
 private Pdp11Rewriter(Pdp11Architecture arch)
 {
     this.arch = arch;
 }
Example #13
0
 public Pdp11ProcessorState(Pdp11Architecture arch)
 {
     this.arch = arch;
 }
Example #14
0
 public Pdp11ProcessorState(Pdp11Architecture arch)
 {
     this.arch = arch;
 }
Example #15
0
 public Pdp11Disassembler(EndianImageReader rdr, Pdp11Architecture arch)
 {
     this.rdr  = rdr;
     this.arch = arch;
     this.ops  = new List <MachineOperand>(2);
 }
Example #16
0
 public Pdp11Disassembler(EndianImageReader rdr, Pdp11Architecture arch)
 {
     this.rdr  = rdr;
     this.arch = arch;
 }
Example #17
0
 public Pdp11ProcessorState(Pdp11Architecture arch)
 {
     this.arch = arch;
     this.regs = new ushort[8];
     this.valid = new bool[8];
 }