public Program Assemble(Address addr, TextReader rdr) { addrBase = addr; lexer = new Lexer(rdr); asm = new X86Assembler(services, new MsdosPlatform(services, arch), addrBase, entryPoints); asm.Platform = Platform; // Assemblers are strongly line-oriented. while (lexer.PeekToken() != Token.EOFile) { try { ProcessLine(); } catch (Exception ex) { Debug.Print("Error on line {0}: {1}", lexer.LineNumber, ex.Message); throw; } } asm.ReportUnresolvedSymbols(); addrStart = addrBase; return asm.GetImage(); }
public OperandParser(Lexer lexer, SymbolTable symtab, Address addrBase, PrimitiveType defaultWordWidth, PrimitiveType defaultAddressWidth) { this.lexer = lexer; this.symtab = symtab; this.addrBase = addrBase; this.defaultWordWidth = defaultWordWidth; this.defaultAddressWidth = defaultAddressWidth; this.segOverride = RegisterStorage.None; }
internal OperandParser CreateOperandParser(Lexer lexer) { return new OperandParser(lexer, symtab, addrBase, SegmentDataWidth, SegmentAddressWidth); }
public Program Assemble(Address addr, TextReader rdr) { addrBase = addr; lexer = new Lexer(rdr); asm = new X86Assembler(arch, addrBase, entryPoints); asm.Platform = Platform; // Assemblers are strongly line-oriented. while (lexer.PeekToken() != Token.EOFile) { ProcessLine(); } asm.ReportUnresolvedSymbols(); addrStart = addrBase; return asm.GetImage(); }