class Operand
Operand is any kind of operand used in a command or instruction, eg: registers, memory addresses, labels, immediates, etc.
Attributes
bits[RW]
machine[RW]
Public Class Methods
new(bits = nil, machine = nil)
click to toggle source
TODO: fix all initialize methods from here down to have cleaner args
# File lib/wilson.rb, line 809 def initialize bits = nil, machine = nil @bits = bits @machine = machine end
on(machine)
click to toggle source
# File lib/wilson.rb, line 802 def self.on machine x = self.new x.machine = machine x end
Public Instance Methods
instructionFromMessage(msg, *args, &b)
click to toggle source
# File lib/wilson.rb, line 818 def instructionFromMessage msg, *args, &b Instruction.on_message machine, [msg, self, *args] + (b ? [b] : []) end
method_missing(msg, *args, &b)
click to toggle source
Calls superclass method
# File lib/wilson.rb, line 814 def method_missing msg, *args, &b super unless self.instructionFromMessage(msg, *args, &b).assemble end
operand?()
click to toggle source
# File lib/wilson.rb, line 822 def operand? true end