anchor.diff:              z <- (value &&& 0xFF) = 0
               n <- (value &&& 0x80) <> 0
   
  -        let ReadMemory address =
  -            memory.Read(address)
  -
  -        let WriteMemory address value =
  +        let ReadMemoryInternal address =
  +            memory.Read address
  +
  +        let ReadMemory address operation =
  +            if rdy then
  +                ReadMemoryInternal address |> operation
  +            rdy
  +
  +        let WriteMemory address value operation =
               memory.Write(address, value)
  -            value
  -
  -        let ReadMemoryPcIncrement () =
  -            let result = ReadMemory pc
  -            pc <- pc + 1
  -            result
  -
  -        let ReadMemoryS () =
  -            ReadMemory (0x100 ||| s)
  -
  -        let WriteMemoryS value =
  -            value |> WriteMemory (0x100 ||| s) |> ignore
  -
  -        let DecrementS () =
  -            s <- (s - 1 &&& 0xFF)
  -
  -        let IncrementS () =
  -            s <- (s + 1 &&& 0xFF)
  -
  -        let Push value =
  -            value |> WriteMemoryS
  -            DecrementS()
  -
  -        let Pull () =
  -            IncrementS()
  -            ReadMemoryS()
  +            value |> operation
  +            true
  +
  +        let ReadMemoryPcIncrement operation =
  +            ReadMemory pc (fun mem ->
  +                pc <- pc + 1
  +                mem |> operation)
  +
  +        let ReadMemoryS operation =
  +            ReadMemory (0x100 ||| s) operation
  +
  +        let WriteMemoryS value operation =
  +            WriteMemory (0x100 ||| s) value operation
  +
  +        let Push value operation =
  +            WriteMemoryS value (fun mem ->
  +                mem |> operation
  +                s <- (s - 1 &&& 0xFF))
  +
  +        let Pull operation =
  +            ReadMemoryS (fun mem ->
  +                mem |> operation
  +                s <- (s + 1 &&& 0xFF))
   
           let GetP () =
               0x20 |||
  
positive.code:             // 105 (VOP_IRQ)
              [| Uop.FetchDummy; Uop.FetchDummy; Uop.PushPch; Uop.PushPcl; Uop.PushPIrq; Uop.FetchPclVector; Uop.FetchPchVector; Uop.EndSuppressInterrupt |];
              // 106 (VOP_RESET)
              [| Uop.FetchDummy; Uop.FetchDummy; Uop.PushDummy; Uop.PushDummy; Uop.PushPReset; Uop.FetchPclVector; Uop.FetchPchVector; Uop.EndSuppressInterrupt |];
              // 107 (VOP_Fetch1_NoInterrupt)
              [| Uop.Fetch1Real |];
          |]
  
negative.code:                             mi <- 0
                              ExecuteOneRetry()
                  else
                      Fetch1Real() |> ignore
              )
  
          let Fetch2 () =
              ReadMemoryPcIncrement <| fun value -> opcode2 <- value
  
          let Fetch3 () =
              ReadMemoryPcIncrement <| fun value -> opcode3 <- value
  
          let PushPch () =
              Push (GetPch()) ignore
  
          let PushPcl () =
              Push (GetPcl()) ignore
  
          let PushPInterrupt newB newEa =
              b <- newB
              Push (GetP()) <| (fun value ->
                  i <- true
                  ea <- newEa)
  
          let PushPBrk () =
              PushPInterrupt true brkVector
  
          let PushPIrq () =
              PushPInterrupt false irqVector
              
          let PushPNmi () =
              PushPInterrupt false nmiVector
  
          let PushPReset () =
              PushPInterrupt false resetVector
  
          let PushDummy () =
              IfReady <| s <- (s - 1) &&& 0xFF
  
          let FetchPclVector () =
              IfReady <| (
                  if nmi && ((ea = brkVector && b) || (ea = irqVector && (not b))) then
                      nmi <- false
                      ea <- nmiVector
                  aluTemp <- ReadMemoryInternal ea)
              
          let FetchPchVector () =
              IfReady <| (
                  aluTemp <- aluTemp ||| (ReadMemoryInternal(ea) <<< 8)
                  pc <- aluTemp)
  
          let ImpIny () =
              FetchDummy <| (
                  y <- y + 1
                  NZ y)
  
          let ImpDey () =
              FetchDummy <| (
                  y <- y - 1
                  NZ y)
              
          let ImpInx () =
              FetchDummy <| (
                  x <- x + 1
                  NZ x)
  
          let ImpDex () =
              FetchDummy <| (
                  x <- x - 1
                  NZ x)
  
          let ImpTsx () =
              FetchDummy <| (
                  x <- s
                  NZ x)
  
          let ImpTxs () =
              FetchDummy <| (
                  s <- x)
  
          let ImpTax () =
              FetchDummy <| (
                  x <- a
                  NZ x)
  
          let ImpTay () =
              FetchDummy <| (
                  y <- a
                  NZ x)
              
          let ImpTya () =
              FetchDummy <| (
                  a <- y
                  NZ a)
          
          let ImpTxa () =
              FetchDummy <| (
                  a <- x
                  NZ a)
  
          let ImpSei () = FetchDummy <| iFlagPending <- true
          let ImpCli () = FetchDummy <| iFlagPending <- false
          let ImpSec () = FetchDummy <| c <- true
          let ImpClc () = FetchDummy <| c <- false
          let ImpClv () = FetchDummy <| v <- false
  
          let ImpSed () =
              FetchDummy <| (
                  d <- true
                  isDecimalMode <- config.HasDecimalMode)
  
          let ImpCld () =
              FetchDummy <| (
                  d <- false
                  isDecimalMode <- false)
  
          let AbsWrite value = WriteMemory ((opcode3 <<< 8) ||| opcode2) value
          let AbsWriteSta () = AbsWrite a
          let AbsWriteStx () = AbsWrite x
          let AbsWriteSty () = AbsWrite y
          let AbsWriteSax () = AbsWrite (x &&& a)
  
          let ZpWrite value = WriteMemory opcode2 value
          let ZpWriteSta () = ZpWrite a
          let ZpWriteStx () = ZpWrite x
          let ZpWriteSty () = ZpWrite y
          let ZpWriteSax () = ZpWrite (x &&& a)
  
          let IndIdxStage3 () =
              ReadMemory opcode2 (fun mem ->
                  ea <- mem)
  
          let IndIdxStage4 () =
              IfReady <| (
                  aluTemp <- ea + y
                  ea <- (((opcode2 + 1) &&& 0xFF) <<< 8) ||| (aluTemp &&& 0xFF) |> ReadMemoryInternal)
  
          let IndIdxWriteStage5 () =
              IfReady <| (
                  ReadMemoryInternal ea |> ignore
                  ea <- ea + (aluTemp &&& 0xFF00))
  
          let IndIdxReadStage5 () =
              IfReady <| (
                  if aluTemp >= 0x100 then
                      mi <- mi + 1
                      ExecuteOneRetry()
                  else
                      ReadMemoryInternal ea |> ignore
                      ea <- (ea + 0x100) &&& 0xFFFF)
  
          let IndIdxRmwStage5 () =
              IfReady <| (
                  if aluTemp >= 0x100 then
                      ea <- (ea + 0x100) &&& 0xFFFF
                  ReadMemoryInternal ea |> ignore)
  
          let IndIdxWriteStage6 value = WriteMemory ea value ignore
          let IndIdxWriteStage6Sta () = IndIdxWriteStage6 a
          let IndIdxWriteStage6Sha () = IndIdxWriteStage6 (a &&& x &&& 7)
  
          let IndIdxReadStage6 operation = ReadMemory ea operation
          let IndIdxReadStage6Lda () = IndIdxReadStage6 <| Lda
          let IndIdxReadStage6Cmp () = IndIdxReadStage6 <| Cmp a
          let IndIdxReadStage6And () = IndIdxReadStage6 <| And
          let IndIdxReadStage6Eor () = IndIdxReadStage6 <| Eor
          let IndIdxReadStage6Lax () = IndIdxReadStage6 <| Lax
          let IndIdxReadStage6Adc () = IndIdxReadStage6 <| Adc
          let IndIdxReadStage6Sbc () = IndIdxReadStage6 <| Sbc
          let IndIdxReadStage6Ora () = IndIdxReadStage6 <| Ora
  
          let IndIdxRmwStage6 () = ReadMemory ea (fun mem -> aluTemp <- mem)
  
          let IndIdxRmwStage7 operation = WriteMemory ea aluTemp operation
          let IndIdxRmwStage7Slo () = IndIdxRmwStage7 <| Slo
          let IndIdxRmwStage7Sre () = IndIdxRmwStage7 <| Sre
          let IndIdxRmwStage7Rra () = IndIdxRmwStage7 <| Rra
          let IndIdxRmwStage7Isc () = IndIdxRmwStage7 <| Isc
          let IndIdxRmwStage7Dcp () = IndIdxRmwStage7 <| Dcp
          let IndIdxRmwStage7Rla () = IndIdxRmwStage7 <| Rla
  
          let IndIdxRmwStage8 () = WriteMemory ea aluTemp ignore
  
          let RelBranchStage2 branchTaken =
              ReadMemoryPcIncrement (fun mem ->
                  opcode2 <- mem
                  if branchTaken then
                      opcode <- vopRelativeStuff
                      mi <- -1)
              
          let RelBranchStage2Bvs () = RelBranchStage2 v
          let RelBranchStage2Bvc () = RelBranchStage2 (not v)
          let RelBranchStage2Bmi () = RelBranchStage2 n
          let RelBranchStage2Bpl () = RelBranchStage2 (not n)
          let RelBranchStage2Bcs () = RelBranchStage2 c
          let RelBranchStage2Bcc () = RelBranchStage2 (not c)
          let RelBranchStage2Beq () = RelBranchStage2 z
          let RelBranchStage2Bne () = RelBranchStage2 (not z)
  
          let RelBranchStage3 () =
              FetchDummy <| (
                  aluTemp <- (pc &&& 0xFF) + opcode2
                  pc <- (pc &&& 0xFF00) ||| (aluTemp &&& 0xFF)
                  if aluTemp >= 0x100 then
  