     ###########################################################
 
     getIndexedAddressByte: (base, offset) ->
-        @emptyReadCycle = yes
+        @emptyReadCycle = yes # Included here instead of in operations table just for simplification.
         (base + offset) & 0xFF
 
     getIndexedAddressWord : (base, offset) ->
-        @emptyReadCycle = yes if (base & 0xFF00) != ((base + offset) & 0xFF00) # Page crossed
+        @emptyReadCycle = yes if @isPageCrossed base, offset
         (base + offset) & 0xFFFF
 
+    isPageCrossed: (base, offset) ->
+        (base & 0xFF00) != ((base + offset) & 0xFF00)
+
     getSignedByte: (value) ->
-        if value < 0x80 then value else value - 0xFF
+        if value >= 0x80 then value - 0x100 else value
 
     ###########################################################
     # No operation instruction

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

    relativeMode: =>
        offset = @getSignedByte @readNextProgramByte()
        @getIndexedAddressWord @programCounter, offset

    ###########################################################
    # Indirect addressing modes

        @readWord @readNextProgramWord()

    indirectXMode: =>
        @readWord @zeroPageXMode()

    indirectYMode: =>
        base = @readWord @readNextProgramByte()
