Inheritance: Reko.Core.ProcessorArchitecture
Esempio n. 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();
 }
Esempio n. 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));
        }
Esempio n. 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();
 }
Esempio n. 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();
        }
Esempio n. 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;
        }
Esempio n. 6
0
 public Pdp11ProcessorState(Pdp11ProcessorState that) : base(that)
 {
     this.arch  = that.arch;
     this.regs  = (ushort[])that.regs.Clone();
     this.valid = (bool[])that.valid.Clone();
 }
Esempio n. 7
0
 public Pdp11ProcessorState(Pdp11Architecture arch)
 {
     this.arch  = arch;
     this.regs  = new ushort[22];
     this.valid = new bool[22];
 }
Esempio n. 8
0
 public OperandParser(Pdp11Architecture arch, Lexer lexer, Pdp11Assembler asm)
 {
     this.arch = arch;
     this.lexer = lexer;
     this.asm = asm;
 }
Esempio n. 9
0
 public Pdp11ProcessorState(Pdp11ProcessorState that)
 {
     this.arch = that.arch;
     this.regs = (ushort[])that.regs.Clone();
     this.valid = (bool[])that.valid.Clone();
 }
Esempio n. 10
0
 public RT11Platform(IServiceProvider services, Pdp11Architecture arch) 
     : base(services, arch, "RT-11")
 {
     this.services = services;
     this.arch = arch;
 }
Esempio n. 11
0
 public Pdp11Rewriter(Pdp11Architecture arch, IEnumerable <Pdp11Instruction> instrs, Frame frame)
 {
     this.arch   = arch;
     this.instrs = instrs.GetEnumerator();
     this.frame  = frame;
 }
Esempio n. 12
0
 private Pdp11Rewriter(Pdp11Architecture arch)
 {
     this.arch = arch;
 }
Esempio n. 13
0
 public Pdp11ProcessorState(Pdp11Architecture arch)
 {
     this.arch = arch;
 }
Esempio n. 14
0
 public Pdp11ProcessorState(Pdp11Architecture arch)
 {
     this.arch = arch;
 }
Esempio n. 15
0
 public Pdp11Disassembler(EndianImageReader rdr, Pdp11Architecture arch)
 {
     this.rdr  = rdr;
     this.arch = arch;
     this.ops  = new List <MachineOperand>(2);
 }
Esempio n. 16
0
 public Pdp11Disassembler(EndianImageReader rdr, Pdp11Architecture arch)
 {
     this.rdr  = rdr;
     this.arch = arch;
 }
Esempio n. 17
0
 public Pdp11ProcessorState(Pdp11Architecture arch)
 {
     this.arch = arch;
     this.regs = new ushort[8];
     this.valid = new bool[8];
 }