Class: RMasm::Align

Inherits:
Stacker show all
Defined in:
lib/rmasm/align.rb

Overview

VALID SECTION ALIGNMENT VALID_ALIGNMENTS = [1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192]

Instance Attribute Summary

Attributes inherited from Stacker

#stack

Instance Method Summary collapse

Methods inherited from Stacker

#pop, #push, #value, #value=

Constructor Details

#initialize(*args) ⇒ Align

Initialize alignment. The Align can be intialized with a stack : Align.new(1,2,4,8)



35
36
37
# File 'lib/rmasm/align.rb', line 35

def initialize(*args)
  super 1, *args
end

Instance Method Details

#to_sObject

Friendly to string



40
41
42
# File 'lib/rmasm/align.rb', line 40

def to_s()
  "Alignment, value = #{value} bytes, stack = [#{stack * ' , '}]"
end