A Ruby interface to YASM.
YASM is a complete rewrite of the NASM assembler, YASM currently supports the x86 and AMD64 instruction sets, accepts NASM and GAS assembler syntaxes, outputs binary, ELF32, ELF64, 32 and 64-bit Mach-O, RDOFF2, COFF, Win32, and Win64 object formats, and generates source debugging information in STABS, DWARF 2, and CodeView 8 formats.
- Supports all of the
yasmcommand-line options.
Assemble a binary file:
YASM::Command.run(syntax: :gas,file: 'hello_world.S',output: 'hello_world.o')Assemble amd64 assembly, in GAS syntax, into an ELF64 file with debugging information:
YASM::Command.rundo |yasm|
yasm.target=:amd64yasm.syntax=:gasyasm.file='hello_world.S'yasm.output='hello_world.o'yasm.output_format=:elf64yasm.debug_format=:stabsend- yasm >= 0.8.0
- command_mapper ~> 0.1
$ gem install ruby-yasm- Debian / Ubuntu:
$ sudo apt install yasm- RedHat / Fedora:
$ sudo dnf install yasm- Homebrew:
$ brew install yasmSee {file:LICENSE.txt} for license information.