Class: Tataru::Instructions::CompareInstruction
- Inherits:
-
ImmediateModeInstruction
- Object
- Tataru::Instruction
- ImmediateModeInstruction
- Tataru::Instructions::CompareInstruction
- Defined in:
- lib/tataru/instructions/compare_instruction.rb
Overview
compares whats in temp result to param
Instance Attribute Summary
Attributes inherited from Tataru::Instruction
Instance Method Summary collapse
Methods inherited from ImmediateModeInstruction
Methods inherited from Tataru::Instruction
Constructor Details
This class inherits a constructor from Tataru::Instructions::ImmediateModeInstruction
Instance Method Details
#run ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/tataru/instructions/compare_instruction.rb', line 7 def run memory.hash[:temp][:result] = if memory.hash[:temp][:result] == @param 1 else 0 end end |