Package org.jnode.assembler.x86

Examples of org.jnode.assembler.x86.X86BinaryAssembler.writeTo()


        } else {
            testCode64(os);
        }

        FileOutputStream fos = new FileOutputStream("test.bin");
        os.writeTo(fos);
        fos.close();
    }

    private static void testCode64(X86Assembler os) throws UnresolvedObjectRefException {
        os.writeCDQE();
View Full Code Here


        if (binary) {
            X86BinaryAssembler os = new X86BinaryAssembler(cpuId, X86Constants.Mode.CODE32, 0);
            generateCode(os, className);
            FileOutputStream fos = new FileOutputStream("test.bin");
            os.writeTo(fos);
            fos.close();
        } else {
            X86TextAssembler tos =
                new X86TextAssembler(new OutputStreamWriter(System.out), cpuId, X86Constants.Mode.CODE32);
            generateCode(tos, className);
View Full Code Here

        if (binary) {
            X86BinaryAssembler os = new X86BinaryAssembler(cpuId, X86Constants.Mode.CODE32, 0);
            generateCode(os, className);

            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            os.writeTo(baos);
            baos.close();
            byte[] b = baos.toByteArray();

            FileOutputStream fos = new FileOutputStream("test.bin");
            fos.write(b);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.