Class: RMasm::Word
- Defined in:
- lib/rmasm/primitive.rb
Overview
Represents a word (16 bits)
Constant Summary collapse
- MIN =
-32768
- MAX =
65535
Instance Attribute Summary
Attributes inherited from Primitive
Class Method Summary collapse
Methods inherited from Primitive
Methods inherited from DataType
Class Method Details
.from_str(str) ⇒ Object
107 108 109 |
# File 'lib/rmasm/primitive.rb', line 107 def self.from_str(str) str.unpack("v*") end |
.range ⇒ Object
101 102 103 |
# File 'lib/rmasm/primitive.rb', line 101 def self.range return MIN..MAX end |
.sizeof ⇒ Object
104 105 106 |
# File 'lib/rmasm/primitive.rb', line 104 def self.sizeof 2 end |
.to_s ⇒ Object
110 111 112 |
# File 'lib/rmasm/primitive.rb', line 110 def self.to_s "word" end |