class YASM::Program
@deprecated Please use {Command} instead.
Public Class Methods
assemble(options={},&block)
click to toggle source
Finds the ‘yasm` program and assembles a file.
@param [Hash{Symbol => Object}] options
Additional options for yasm.
@yield [program]
If a block is given, it will be passed a program object used to specify options for yasm.
@yieldparam [Program] program
The yasm program object.
@return [Boolean]
Specifies whether the command exited normally.
@example
Program.assemble( :parser => :gas, :output => 'code.o', :file => 'code.S' )
@example
Program.assemble do |yasm| yasm.target! :x86 yasm.syntax = :gas yasm.file = 'code.S' yasm.output = 'code.o' end
@see assemble
# File lib/yasm/program.rb, line 43 def self.assemble(options={},&block) new(options,&block).assemble() end
Public Instance Methods
assemble(options={}) { |self| ... }
click to toggle source
Assembles an assembly file.
@param [Hash{Symbol => Object}] options
Additional options for yasm.
@yield [program]
If a block is given, it will be passed a program object used to specify options for yasm.
@yieldparam [Program] program
The yasm program object.
@return [Boolean]
Specifies whether the command exited normally.
@example
Program.assemble( :parser => :gas, :output => 'code.o', :file => 'code.S' )
@example
Program.assemble do |yasm| yasm.target! :x86 yasm.syntax = :gas yasm.file = 'code.S' yasm.output = 'code.o' end
# File lib/yasm/program.rb, line 79 def assemble(options={}) options.each do |name,value| self[name] = value end yield self if block_given? run_command() end
target!(name)
click to toggle source
@deprecated Please use {#target=} instead.
# File lib/yasm/program.rb, line 92 def target!(name) self.target = name return true end