an instruction: opcode name + arguments
arguments (cpu-specific objects)
reference to the cpu which issued this instruction (used for rendering)
name of the associated opcode
hash of prefixes (unused in simple cpus)
# File metasm/main.rb, line 188 def initialize(cpu, opname=nil, args=[], pfx=nil, backtrace=nil) @cpu = cpu @opname = opname @args = args @prefix = pfx if pfx @backtrace = backtrace end
duplicates the argument list and prefix hash
# File metasm/main.rb, line 197 def dup Instruction.new(@cpu, (@opname.dup if opname), @args.dup, (@prefix.dup if prefix), (@backtrace.dup if backtrace)) end
# File metasm/render.rb, line 37 def render @cpu.render_instruction(self) end