class Metasm::MSP430::Memref

Attributes

base[RW]
offset[RW]
postincr[RW]
size[RW]

Public Class Methods

new(base, offset = 0, size = nil, postincr = false) click to toggle source
# File metasm/cpu/msp430/main.rb, line 31
def initialize(base, offset = 0, size = nil, postincr = false)
        @base = base
        @offset = Expression[offset]
        @size = size
        @postincr = postincr
end

Public Instance Methods

render() click to toggle source
# File metasm/cpu/msp430/main.rb, line 46
def render
        b = @base
        b = @base.to_s + '++' if @base and @postincr
        p = Expression[b, :+, @offset].reduce
        Indirection[p, @size].render
end
symbolic(di=nil) click to toggle source
# File metasm/cpu/msp430/main.rb, line 38
def symbolic(di=nil)
        r = @base.symbolic if @base
        e = Expression[r, :+, @offset].reduce
        Indirection[e, (@size || 1), (di.address if di)]
end