Sha256: 881e1013117efc1c21cd63e3ffa331008e296404e773560a0c40a53c666e3d83

Contents?: true

Size: 458 Bytes

Versions: 1

Compression:

Stored size: 458 Bytes

Contents

# frozen_string_literal: true

module Tataru
  module Instructions
    # compares whats in temp result to param
    class CompareInstruction < ImmediateModeInstruction
      def run
        memory.hash[:temp][:result] = if memory.hash[:temp][:result] == @param
                                        1
                                      else
                                        0
                                      end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tataru-0.2.0 lib/tataru/instructions/compare_instruction.rb