Class: RMasm::Byte
- Defined in:
- lib/rmasm/primitive.rb
Overview
Represents a byte (8 bits)
Constant Summary collapse
- MIN =
-128
- MAX =
255
Instance Attribute Summary
Attributes inherited from Primitive
Class Method Summary collapse
- .from_str(str) ⇒ Object
- .range ⇒ Object
- .read(io) ⇒ Object
- .sizeof ⇒ Object
- .to_s ⇒ Object
-
.write(io, value) ⇒ Object
io.read_db().
Methods inherited from Primitive
Methods inherited from DataType
Class Method Details
.from_str(str) ⇒ Object
79 80 81 |
# File 'lib/rmasm/primitive.rb', line 79 def self.from_str(str) str.unpack('c*') end |
.read(io) ⇒ Object
82 83 84 |
# File 'lib/rmasm/primitive.rb', line 82 def self.read(io) # io.read_db() end |
.sizeof ⇒ Object
76 77 78 |
# File 'lib/rmasm/primitive.rb', line 76 def self.sizeof 1 end |
.to_s ⇒ Object
88 89 90 |
# File 'lib/rmasm/primitive.rb', line 88 def self.to_s "byte" end |
.write(io, value) ⇒ Object
io.read_db()
85 86 87 |
# File 'lib/rmasm/primitive.rb', line 85 def self.write(io,value) io.write_db(value) end |