rubyx/lib/asm/data_object.rb

21 lines
320 B
Ruby
Raw Normal View History

module Asm
class DataObject
def initialize(data)
@data = data
end
2014-04-22 13:39:47 +02:00
def position
throw "Not set" unless @address
@address
end
2014-04-22 13:39:47 +02:00
def at address
@address = address
end
def length
@data.length
end
def assemble(io, as)
io << @data
end
end
end