Class: Relyze::TCG::TCGInstruction

Inherits:
Object
  • Object
show all
Defined in:
C:/Program Files/Relyze/lib/relyze/core/tcg.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rva, slot, mnemonic, operands) ⇒ TCGInstruction

Returns a new instance of TCGInstruction



56
57
58
59
60
61
# File 'C:/Program Files/Relyze/lib/relyze/core/tcg.rb', line 56

def initialize( rva, slot, mnemonic, operands )
    @rva      = rva
    @slot     = slot
    @mnemonic = mnemonic
    @operands = operands
end

Instance Attribute Details

#mnemonicObject

Returns the value of attribute mnemonic



54
55
56
# File 'C:/Program Files/Relyze/lib/relyze/core/tcg.rb', line 54

def mnemonic
  @mnemonic
end

#operandsObject

Returns the value of attribute operands



54
55
56
# File 'C:/Program Files/Relyze/lib/relyze/core/tcg.rb', line 54

def operands
  @operands
end

#rvaObject

Returns the value of attribute rva



54
55
56
# File 'C:/Program Files/Relyze/lib/relyze/core/tcg.rb', line 54

def rva
  @rva
end

#slotObject

Returns the value of attribute slot



54
55
56
# File 'C:/Program Files/Relyze/lib/relyze/core/tcg.rb', line 54

def slot
  @slot
end

Instance Method Details

#to_sObject



63
64
65
66
67
68
69
70
71
72
# File 'C:/Program Files/Relyze/lib/relyze/core/tcg.rb', line 63

def to_s
    txt = @mnemonic.to_s
    @operands.each do | operand |
        if( operand != @operands.first )
            txt << ','
        end
        txt << ' ' << operand.to_s
    end
    return txt
end
ruby-2.6.5).