Ejemplo n.º 1
0
 public Pdp11Assembler(Pdp11Architecture arch, Address addrBase, IEmitter emitter)
 {
     this.arch = arch;
     this.BaseAddress = addrBase;
     this.emitter = emitter;
     this.Equates = new Dictionary<string, object>();
     this.symtab = new SymbolTable();
 }
Ejemplo n.º 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 LoadedImage(Address.Ptr16(0x200), bytes);
     var rdr = new LeImageReader(image, 0);
     var arch = new Pdp11Architecture();
     var dasm = new Pdp11Disassembler(rdr, arch);
     return dasm.First();
 }
Ejemplo n.º 3
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();
        }
Ejemplo n.º 4
0
 public Pdp11ProcessorState(Pdp11Architecture arch)
 {
     this.arch = arch;
 }
Ejemplo n.º 5
0
 public OperandParser(Pdp11Architecture arch, Lexer lexer, Pdp11Assembler asm)
 {
     this.arch = arch;
     this.lexer = lexer;
     this.asm = asm;
 }