class PEdump::NE::Bundle

The entry-table data is organized by bundle, each of which begins with a 2-byte header. The first byte of the header specifies the number of entries in the bundle ( 0 = end of the table). The second byte specifies whether the corresponding segment is movable or fixed.

0xFF = the segment is movable.
0xFE = the entry does not refer to a segment but refers to a constant defined within the module.
else it is a segment index.

Constants

FixedEntry
MovableEntry

Public Class Methods

read(io) click to toggle source
Calls superclass method
# File lib/pedump/ne.rb, line 351
def self.read io
  super.tap do |bundle|
    return nil if bundle.num_entries == 0
    if bundle.num_entries == 0
      @@eob ||= 0
      @@eob += 1
      return nil if @@eob == 2
    end
    bundle.entries = bundle.seg_idx == 0 ? [] :
      if bundle.movable?
        bundle.num_entries.times.map{ MovableEntry.read(io) }
      else
        bundle.num_entries.times.map{ FixedEntry.read(io) }
      end
  end
end

Public Instance Methods

movable?() click to toggle source
# File lib/pedump/ne.rb, line 347
def movable?
  seg_idx == 0xff
end