Exemplo n.º 1
0
def main():
    # Init the 80x86/x64 instructions sets DB.
    db = x86db.InstructionsDB()
    x86InstructionsSet = x86sets.Instructions(db.SetInstruction)
    # Generate all tables of id's and pointers with the instructions themselves.
    mnemonicsIds, lists = x86generator.CreateTables(db)
    # Rewrite C instructions tables.
    WriteInstsC(lists)
    # Rewrite mnemonics of the C source code.
    WriteMnemonicsC(mnemonicsIds)
    # Rewrite mnemonics for the Python module.
    WriteMnemonicsPython(mnemonicsIds)
    # Rewrite mnemonics for the Java binding example code.
    WriteMnemonicsJava(mnemonicsIds)
Exemplo n.º 2
0
def main():
	# Init the 80x86/x64 instructions sets DB.
	db = x86db.InstructionsDB()
	x86InstructionsSet = x86sets.Instructions(db.SetInstruction)

	# Open file for output.
	f = open("output.txt", "w")

	f.write("/*\n * GENERATED BY disOps at %s\n */\n\n" % time.asctime())

	# Generate all tables of id's and pointers with the instructions themselves.
	lists = CreateTables(db)
	# Write them to the file also.
	f.write(lists)
	f.close()

	DumpMnemonics()

	print "The file output.txt was written successfully"