Package org.jnode.jnasm.preprocessor

Examples of org.jnode.jnasm.preprocessor.Preprocessor


    public static void main(String[] argv) throws Exception {
        InputStream in = System.in;
        if (argv.length > 0) {
            in = new FileInputStream(argv[0]);
        }
        Preprocessor preprocessor = Preprocessor.newInstance(in);
        preprocessor.defineSymbol("BITS32", "");
        preprocessor.setFileResolver(new FileResolver(null));
        StringWriter sw = new StringWriter();
        preprocessor.print(sw);
        sw.flush();
        sw.close();
        StringReader sr = new StringReader(sw.toString());
        Assembler assembler = Assembler.newInstance(sr);
        FileOutputStream out = new FileOutputStream("out");
View Full Code Here


        out.close();
    }

    public static void assembler(NativeStream asm, AsmSourceInfo sourceInfo, Map<String, String> symbols)
        throws Exception {
        Preprocessor preprocessor = Preprocessor.newInstance(sourceInfo, symbols);
        StringWriter sw = new StringWriter();
        preprocessor.print(sw);
        sw.flush();
        sw.close();
        StringReader sr = new StringReader(sw.toString());
        Assembler assembler = Assembler.newInstance(sr);
        assembler.performTwoPasses(sr, asm);
View Full Code Here

TOP

Related Classes of org.jnode.jnasm.preprocessor.Preprocessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.