Sha256: 3a8ba07d43b2c9dc0cebfa607580b05cf9bf25ad340cd649a031cd2a3fc0e6c1
Contents?: true
Size: 642 Bytes
Versions: 6
Compression:
Stored size: 642 Bytes
Contents
#!/usr/bin/env ruby # This file is part of Metasm, the Ruby assembly manipulation suite # Copyright (C) 2006-2009 Yoann GUILLOT # # Licence is LGPL, see LICENCE in the top-level directory # # here we assemble a dummy MIPS PE # TODO autodetect header.machine from cpu, find something to put in # the MZ header, make a real mips sample program # require 'metasm' cpu = Metasm::MIPS.new(:little) prog = Metasm::PE.assemble(cpu, <<EOS) .text .entrypoint lui r4, 0x42 jal toto add r4, r1, r2 jr r31 nop toto: jr r31 ;ldc1 fp12, 28(r4) nop .import 'foobar' 'baz' EOS prog.header.machine='R4000' data = prog.encode_file 'mipspe.exe'
Version data entries
6 entries across 6 versions & 1 rubygems