Class: RMasm::DWord

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

Overview

Represents a dword (32 bits)

Constant Summary collapse

MIN =
-2147483648
MAX =
4294967295

Instance Attribute Summary

Attributes inherited from Primitive

#value

Class Method Summary collapse

Methods inherited from Primitive

valid?

Methods inherited from DataType

read, valid?, write

Class Method Details

.from_str(str) ⇒ Object



129
130
131
# File 'lib/rmasm/primitive.rb', line 129

def self.from_str(str)
  str.unpack("V*")
end

.rangeObject



123
124
125
# File 'lib/rmasm/primitive.rb', line 123

def self.range
  return MIN..MAX
end

.sizeofObject



126
127
128
# File 'lib/rmasm/primitive.rb', line 126

def self.sizeof
  4
end

.to_sObject



132
133
134
# File 'lib/rmasm/primitive.rb', line 132

def self.to_s
  "dword"
end