class Label

Label is a known point in the byte stream that we can jmp/loop back to.

Attributes

position[RW]

Public Class Methods

on_at(machine, position) click to toggle source
# File lib/wilson.rb, line 994
def self.on_at machine, position
  label = self.new
  label.machine = machine
  label.position = position
  label
end

Public Instance Methods

bits() click to toggle source
# File lib/wilson.rb, line 1001
def bits
  distance = machine.stream.size - position

  if distance < 256 then
    8
  elsif distance < 65536 then
    16
  else
    32
  end
end
label?() click to toggle source
# File lib/wilson.rb, line 1013
def label?
  true
end