     CPY: (address) =>
         @compareRegisterAndMemory @registerY, address
 
-    compareRegisterAndMemory: (register, address) ->
-        @compareRegisterAndOperand register, @readByte address
-
-    compareRegisterAndOperand: (register, operand) ->
-        result = register - operand
-        @carryFlag = result >= 0 # Unsigned comparison (bit 8 is actually the result sign).
-        @updateZeroAndNegativeFlag result # Not a signed comparison
-
     ###########################################################
     # Branching instructions
     ###########################################################

    ###########################################################

    ADC: (address) =>
        operand = @readByte address
        @addValueToAccumulator operand

    SBC: (address) =>
        operand = @readByte address
        @addValueToAccumulator operand ^ 0xFF # Together with carry incremment makes negative operand.

    addValueToAccumulator: (operand) ->
        result = @accumulator + operand


    BMI: (address) =>
        @branchIf @negativeFlag is on, address

    ###########################################################
    # Jump / subroutine instructions
