Class: SCASM::Data

Inherits:
Statement show all
Defined in:
lib/scasm/statement.rb

Instance Attribute Summary

Attributes inherited from Statement

#addr

Instance Method Summary collapse

Methods inherited from Statement

#length

Constructor Details

#initialize(words) ⇒ Data

Returns a new instance of Data.



56
57
58
# File 'lib/scasm/statement.rb', line 56

def initialize words
  @words = words
end

Instance Method Details

#assemble(io) ⇒ Object



60
61
62
# File 'lib/scasm/statement.rb', line 60

def assemble io
  io.write @words.pack('v*')
end

#to_sObject



64
65
66
# File 'lib/scasm/statement.rb', line 64

def to_s
  "data #{@words * ', '}"
end