class Rubyfuu::OSXAssembly32
Public Instance Methods
comma()
click to toggle source
# File lib/rubyfuu/osx_assembly32.rb, line 12 def comma write 'push $0x1' write 'push %edi' write 'push $0x1' write 'mov $3, %eax' write 'subl $4, %esp' write 'int $0x80' write 'addl $16, %esp' end
link(source_path, outfile)
click to toggle source
# File lib/rubyfuu/osx_assembly32.rb, line 34 def link(source_path, outfile) tempfile = Tempfile.new(["out", ".o"]) tempfile.close system "as -arch i386 -o #{tempfile.path} #{source_path} && ld -e _main -macosx_version_min 10.7.0 -o #{outfile} #{tempfile.path}" tempfile.unlink end
period()
click to toggle source
# File lib/rubyfuu/osx_assembly32.rb, line 23 def period write 'push $1' write 'push %edi' write 'push $1' write 'mov $4, %eax' write 'subl $4, %esp' write 'int $0x80' write 'addl $16, %esp' end