Class: RMasm::Char

Inherits:
Primitive show all
Defined in:
lib/rmasm/primitive.rb

Overview

Represents a char (8-16 bits) according to default encoding TODO MODIFY THIS TO HANDLE ENCODING PROPERLY

Constant Summary collapse

MIN =
-128
MAX =
255

Instance Attribute Summary

Attributes inherited from Primitive

#value

Class Method Summary collapse

Methods inherited from Primitive

from_str, valid?

Methods inherited from DataType

read, valid?

Class Method Details

.rangeObject



54
55
56
# File 'lib/rmasm/primitive.rb', line 54

def self.range
  MIN..MAX
end

.sizeofObject



57
58
59
# File 'lib/rmasm/primitive.rb', line 57

def self.sizeof
  1
end

.write(io, value) ⇒ Object



60
61
62
# File 'lib/rmasm/primitive.rb', line 60

def self.write(io,value)
  io.write_db(value)
end