rubyx/lib/asm/label_object.rb
2014-04-23 11:14:25 +03:00

22 lines
320 B
Ruby

module Asm
class LabelObject
def initialize
@address = nil
end
attr_writer :address
def address
if (@address.nil?)
raise 'Tried to use label object that has not been set'
end
@address
end
def assemble(io, as)
self.address = io.tell
end
end
end