Sha256: 660b5b45b1bf3b95b64e70325edfccff218c3c089d52a2e62d58e07a6c66535d

Contents?: true

Size: 515 Bytes

Versions: 6

Compression:

Stored size: 515 Bytes

Contents

#    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 build a simple a.out executable
#

require 'metasm'

Metasm::AOut.assemble(Metasm::Ia32.new, <<EOS).encode_file('m-a.out')
.text
.entrypoint
mov eax, 4
mov ebx, 1

.data
str db "kikoo\\n"
strend:

.text
mov ecx, str
mov edx, strend - str
int 80h		// linux sys_write

mov eax, 1
mov ebx, 42
int 80h		// linux sys_exit
ret
EOS

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
metasm-1.0.5 samples/a.out.rb
metasm-1.0.4 samples/a.out.rb
metasm-1.0.3 samples/a.out.rb
metasm-1.0.2 samples/a.out.rb
metasm-1.0.1 samples/a.out.rb
metasm-1.0.0 samples/a.out.rb