 
     BMI: (address) =>
         @branchIf @negativeFlag is on, address
-
-    branchIf: (condition, address) ->
-        if condition
-            @programCounter = address
-            @tick()
 
     ###########################################################
     # Jump / subroutine instructions

        @overflowFlag = @isSignedOverflow @accumulator, operand, result
        @storeValueIntoAccumulator result & 0xFF

    ###########################################################
    # Shifting / rotation instructions
    ###########################################################

    ASL: (address) =>
        @rotateAccumulatorOrMemory address, @rotateLeft, false

    LSR: (address) =>
        @rotateAccumulatorOrMemory address, @rotateRight, false

    ROL: (address) =>
        @rotateAccumulatorOrMemory address, @rotateLeft, true

    ROR: (address) =>
        @rotateAccumulatorOrMemory address, @rotateRight, true

    rotateAccumulatorOrMemory: (address, rotation, transferCarry) ->
        if address?
            operand = @readByte address
            result = rotation operand, transferCarry
            @storeValueIntoMemory address, result
        else
            result = rotation @accumulator, transferCarry

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

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

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

    ###########################################################
    # Shifting / rotation instructions
    ###########################################################

    ASL: (address) =>
        @rotateAccumulatorOrMemory address, @rotateLeft, false

    LSR: (address) =>
        @rotateAccumulatorOrMemory address, @rotateRight, false

    ROL: (address) =>
        @rotateAccumulatorOrMemory address, @rotateLeft, true

    ROR: (address) =>
        @rotateAccumulatorOrMemory address, @rotateRight, true

    ###########################################################
    # Hybrid instructions
    ###########################################################

    DCP: (address) =>
        @compareRegisterAndOperand @accumulator, @DEC address

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

    SLO: (address) =>
        @storeValueIntoAccumulator @accumulator | @ASL address

    ###########################################################
    # Instruction helper functions
    ###########################################################

    storeValueIntoAccumulator: (value) ->
        @updateZeroAndNegativeFlag value
        @accumulator = value

    storeValueIntoRegisterX: (value) ->
        @updateZeroAndNegativeFlag value
        @registerX = value

    storeValueIntoRegisterY: (value) ->
        @updateZeroAndNegativeFlag value
        @registerY = value

    storeValueIntoMemory: (address, value) ->
        @updateZeroAndNegativeFlag value
        @writeByte address, value

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