     # No operation instruction
     ###########################################################
 
-    NOP: =>
+    NOP: ->
 
     ###########################################################
     # Clear flag instructions
     ###########################################################
 
-    CLC: =>
+    CLC: ->
         @carryFlag = 0
 
-    CLI: =>
+    CLI: ->
         @interruptDisable = 0
 
-    CLD: =>
+    CLD: ->
         @decimalMode = 0
 
-    CLV: =>
+    CLV: ->
         @overflowFlag = 0
 
     ###########################################################
     # Set flag instructions
     ###########################################################
 
-    SEC: =>
+    SEC: ->
         @carryFlag = 1
 
-    SEI: =>
+    SEI: ->
         @interruptDisable = 1
 
-    SED: =>
+    SED: ->
         @decimalMode = 1
 
     ###########################################################
     # Memory write instructions
     ###########################################################
 
-    STA: (address) =>
+    STA: (address) ->
         @$writeByte address, @accumulator
 
-    STX: (address) =>
+    STX: (address) ->
         @$writeByte address, @registerX
 
-    SAX: (address) =>
+    SAX: (address) ->
         @$writeByte address, @accumulator & @registerX
 
-    STY: (address) =>
+    STY: (address) ->
         @$writeByte address, @registerY
 
-    SHA: (address) => # Also known as AHX
+    SHA: (address) -> # Also known as AHX
         @$storeHighAddressIntoMemory address, @accumulator & @registerX
 
-    SHX: (address) => # Also known as SXA
+    SHX: (address) -> # Also known as SXA
         @$storeHighAddressIntoMemory address, @registerX
 
-    SHY: (address) => # Also known as SYA
+    SHY: (address) -> # Also known as SYA
         @$storeHighAddressIntoMemory address, @registerY
 
     ###########################################################
     # Memory read instructions
     ###########################################################
 
-    LDA: (address) =>
+    LDA: (address) ->
         @$storeValueIntoAccumulator @$readByte address
 
-    LDX: (address) =>
+    LDX: (address) ->
         @$storeValueIntoRegisterX @$readByte address
 
-    LDY: (address) =>
+    LDY: (address) ->
         @$storeValueIntoRegisterY @$readByte address
 
-    LAX: (address) =>
+    LAX: (address) ->
         value = @$readByte address
         @$storeValueIntoAccumulator value
         @$storeValueIntoRegisterX value
 
-    LAS: (address) =>
+    LAS: (address) ->
         @stackPointer &= @$readByte address
         @$storeValueIntoAccumulator @stackPointer
         @$storeValueIntoRegisterX @stackPointer

    # Interrupt control instructions
    ###########################################################

    BRK: =>
        @$moveProgramCounter 1 # BRK is 2 byte instruction
        @$pushWord @programCounter
        @$pushByte @$getStatus() | 0x10 # It pushes status with bit 4 on (break command flag)
        @interruptDisable = 1
        @programCounter = @$readWord 0xFFFE

    RTI: =>
        @$setStatus @$popByte()
        @programCounter = @$popWord()


    # Increment instructions
    ###########################################################

    INC: (address) ->
        @$storeValueIntoMemory address, ((@$readByte address) + 1) & 0xFF

    INX: ->
        @$storeValueIntoRegisterX (@registerX + 1) & 0xFF

    INY: ->
        @$storeValueIntoRegisterY (@registerY + 1) & 0xFF

    ###########################################################
    # Decrement instructions
    ###########################################################

    DEC: (address) ->
        @$storeValueIntoMemory address, ((@$readByte address) - 1) & 0xFF

    DEX: ->
        @$storeValueIntoRegisterX (@registerX - 1) & 0xFF

    DEY: ->
        @$storeValueIntoRegisterY (@registerY - 1) & 0xFF

    ###########################################################
    # Comparison instructions
    ###########################################################

    CMP: (address) ->
        @$compareRegisterAndMemory @accumulator, address

    CPX: (address) ->
        @$compareRegisterAndMemory @registerX, address

    CPY: (address) ->
        @$compareRegisterAndMemory @registerY, address

    ###########################################################
    # Branching instructions
    ###########################################################

    BCC: (address) ->
        @$branchIf not @carryFlag, address

    BCS: (address) ->
        @$branchIf @carryFlag, address

    BNE: (address) ->
        @$branchIf not @zeroFlag, address

    BEQ: (address) ->
        @$branchIf @zeroFlag, address

    BVC: (address) ->
        @$branchIf not @overflowFlag, address

    BVS: (address) ->
        @$branchIf @overflowFlag,  address

    BPL: (address) ->
        @$branchIf not @negativeFlag, address

    BMI: (address) ->
        @$branchIf @negativeFlag, address

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

    JMP: (address) ->
        @programCounter = address

    JSR: (address) ->
        @$pushWord (@programCounter - 1) & 0xFFFF # The pushed address must be the end of the current instruction
        @programCounter = address

    RTS: ->
        @programCounter = (@$popWord() + 1) & 0xFFFF # We decremented the address when pushing it during JSR
        @tick()

