         @requestedInterrupt = null
 
     resetMemory: ->
-        @writeByte address, 0xFF for address in [0...0x0800]
-        @writeByte 0x0008, 0xF7
-        @writeByte 0x0009, 0xEF
-        @writeByte 0x000A, 0xDF
-        @writeByte 0x000F, 0xBF
-        @writeByte 0x4017, 0x00
-        @writeByte 0x4015, 0x00
-        @writeByte address, 0x00 for address in [0x4000...0x4010]
+        @memory.write address, 0xFF for address in [0...0x0800]
+        @memory.write 0x0008, 0xF7
+        @memory.write 0x0009, 0xEF
+        @memory.write 0x000A, 0xDF
+        @memory.write 0x000F, 0xBF
+        @memory.write 0x4017, 0x00
+        @memory.write 0x4015, 0x00
+        @memory.write address, 0x00 for address in [0x4000...0x4010]
 
     ###########################################################
     # Execution step

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

    resolveReadCycles: ->
        tick()
        if @emptyReadCycle
            @emptyReadCycle = no
            @tick()

    resolveWriteCycles: ->
        tick()
        if @emptyWriteCycle
            @emptyWriteCycle = no
            @tick()

        @pushByte @accumulator

    PHP: =>
        @pushByte @getStatus() | Bit4 | Bit5 # Pushes status with bit 4 (break command flag) and bit 5 on.

    ###########################################################
    # Stack pop instructions
