rubyx/lib/register/instructions/operator_instruction.rb
Torsten Ruger 9ab3de234d some helper functions
for when i started the assembler div10
in the end i did the div10 in some, so no need
2015-11-13 20:47:08 +02:00

22 lines
460 B
Ruby

module Register
class OperatorInstruction < Instruction
def initialize source , operator , left , right
super(source)
@operator = operator
@left = left
@right = right
end
attr_reader :operator, :left , :right
def to_s
"OperatorInstruction: #{left} #{operator} #{right}"
end
def self.op source , operator , left , right
OperatorInstruction.new source , operator , left , right
end
end
end