         @emptyReadCycles = operation.emptyReadCycles
         @emptyWriteCycles = operation.emptyWriteCycles
 
-        instruction addressingMode()
+        address = addressingMode.call this
+        instruction.call this, address
 
     readOperation: ->
         @operationsTable[@$readNextProgramByte()]

    # Addition / subtraction instructions
    ###########################################################

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

    SBC: (address) =>
        @$addValueToAccumulator (@$readByte address) ^ 0xFF # With internal 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 # With internal carry incremment makes negative operand

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

    SRE: (address) =>
        @$storeValueIntoAccumulator @accumulator ^ @LSR address

    RLA: (address) =>
        @$storeValueIntoAccumulator @accumulator & @ROL address

    XAA: (address) => # Also known as ANE
        @$storeValueIntoAccumulator @registerX & @AND address

    RRA: (address) =>
        @$addValueToAccumulator @ROR address

    AXS: (address) => # Also known as SBX
        @registerX = @compareRegisterAndMemory @accumulator & @registerX, address

    ANC: (address) =>
        @$rotateLeft @AND(address), false # rotateLeft computes carry

    ALR: (address) =>
        @AND address
        @LSR()

    ARR: (address) =>
        @AND address
        @ROR()
        @carryFlag = (@accumulator >>> 6) & 1
        @overflowFlag = ((@accumulator >>> 5) & 1) ^ @carryFlag

    TAS: (address) => # Also known as SHS
        @stackPointer = @accumulator & @registerX
        @SHA address


    # No operation instruction
    ###########################################################

    NOP: ->

    ###########################################################
    # Clear flag instructions
    ###########################################################

    CLC: ->
        @carryFlag = 0

    CLI: ->
        @interruptDisable = 0

    CLD: ->
        @decimalMode = 0

    CLV: ->
        @overflowFlag = 0

    ###########################################################
    # Set flag instructions
    ###########################################################

    SEC: ->
        @carryFlag = 1

    SEI: ->
        @interruptDisable = 1

    SED: ->
        @decimalMode = 1

    ###########################################################
    # Memory write instructions
    ###########################################################

    STA: (address) ->
        @$writeByte address, @accumulator

    STX: (address) ->
        @$writeByte address, @registerX

    SAX: (address) ->
        @$writeByte address, @accumulator & @registerX

    STY: (address) ->
        @$writeByte address, @registerY

    SHA: (address) -> # Also known as AHX
        @$storeHighAddressIntoMemory address, @accumulator & @registerX

    SHX: (address) -> # Also known as SXA
        @$storeHighAddressIntoMemory address, @registerX

    SHY: (address) -> # Also known as SYA
        @$storeHighAddressIntoMemory address, @registerY

    ###########################################################
    # Memory read instructions
    ###########################################################

    LDA: (address) ->
        @$storeValueIntoAccumulator @$readByte address

    LDX: (address) ->
        @$storeValueIntoRegisterX @$readByte address

    LDY: (address) ->
        @$storeValueIntoRegisterY @$readByte address

    LAX: (address) ->
        value = @$readByte address
        @$storeValueIntoAccumulator value
        @$storeValueIntoRegisterX value

    LAS: (address) ->
        @stackPointer &= @$readByte address
        @$storeValueIntoAccumulator @stackPointer
        @$storeValueIntoRegisterX @stackPointer
