 
     getStatus: ->
         status = 0
-        status &= Bit0 if @carryFlag
-        status &= Bit1 if @zeroFlag
-        status &= Bit2 if @interruptDisable
-        status &= Bit3 if @decimalMode
-        status &= Bit4 if @breakCommand
-        status &= Bit6 if @overflowFlag
-        status &= Bit7 if @negativeFlag
+        status |= Bit0 if @carryFlag
+        status |= Bit1 if @zeroFlag
+        status |= Bit2 if @interruptDisable
+        status |= Bit3 if @decimalMode
+        status |= Bit4 if @breakCommand
+        status |= Bit6 if @overflowFlag
+        status |= Bit7 if @negativeFlag
         status
 
     setStatus: (status) ->


    tick: ->
        @cycle++
        @ppu.tick() for [1...3]
        @apu.tick()
        undefined


            result = (@readByte address) + 1
            @computeZeroFlag result
            @computeNegativeFlag result
            @writeByte address, result & 0xFF

        @registerInstruction Instruction.INX, ->
            @registerX = (@registerX + 1) & 0xFF
            @computeZeroFlag @registerX
            @computeNegativeFlag @registerX

        @registerInstruction Instruction.INY, ->
            @registerY = (@registerY + 1) & 0xFF
            @computeZeroFlag @registerY
            @computeNegativeFlag @registerY

