anchor.diff:                      mi <- -1
                   else
                       if interruptPending then
  -                        branchIrqHack <- true
  -            rdy
  +                        branchIrqHack <- true)
   
           let RelBranchStage4 () =
  -            if rdy then
  -                FetchDummy()
  -                pc <- (pc + (if aluTemp < 0 then -256 else 256)) &&& 0xFFFF
  -            rdy
  -
  -        let Nop () =
  -            if rdy then
  -                FetchDummy()
  -            rdy
  -
  -        let DecS () =
  -            if rdy then
  -                FetchDummy()
  -                DecrementS()
  -            rdy
  -
  -        let IncS () =
  -            if rdy then
  -                FetchDummy()
  -                IncrementS()
  -            rdy
  +            FetchDummy <| (
  +                pc <- (pc + (if aluTemp < 0 then -256 else 256)) &&& 0xFFFF)
  +
  +        let Nop () = FetchDummy
  +        let DecS () = FetchDummy <| s <- (s - 1) &&& 0xFF
  +        let IncS () = FetchDummy <| s <- (s + 1) &&& 0xFF
   
           let Jsr () =
  -            if rdy then
  -                pc <- (ReadMemory(pc) <<< 8) ||| opcode2
  -            rdy
  -
  -        let PullP () =
  -            if rdy then
  -                ReadMemoryS() |> SetP
  -                IncrementS()
  -            rdy
  +            ReadMemory pc (fun mem ->
  +                pc <- (mem <<< 8) ||| opcode2)
  +
  +        let PullP () = ReadMemoryS SetP
   
           let PullPcl () =
  -            if rdy then
  -                pc <- (pc &&& 0xFF00) ||| ReadMemoryS()
  -                IncrementS()
  -            rdy
  +            ReadMemoryS (fun mem -> 
  +                pc <- (pc &&& 0xFF00) ||| mem)
   
           let PullPchNoInc () =
  -            if rdy then
  -                pc <- (pc &&& 0x00FF) ||| (ReadMemoryS() <<< 8)
  -            rdy
  -
  -        let AbsReadLda () =
  -            if rdy then
  -                a <- ReadMemory((opcode3 <<< 8) ||| opcode2)
  -                NZ a
  -            rdy
  -
  -        let AbsReadLdy () =
  -            if rdy then
  -                y <- ReadMemory((opcode3 <<< 8) ||| opcode2)
  -                NZ y
  -            rdy
  -
  -        let AbsReadLdx () =
  -            if rdy then
  -                x <- ReadMemory((opcode3 <<< 8) ||| opcode2)
  -                NZ x
  -            rdy
  -
  -        let AbsReadBit () =
  -            if rdy then
  -                ReadMemory((opcode3 <<< 8) ||| opcode2) |> Bit
  -            rdy
  -
  -        let AbsReadLax () =
  -            if rdy then
  -                aluTemp <- ReadMemory((opcode3 <<< 8) ||| opcode2)
  -                a <- aluTemp
  -                x <- a
  -                NZ a
  -            rdy
  -
  -        let AbsReadAnd () =
  -            if rdy then
  -                ReadMemory((opcode3 <<< 8) ||| opcode2) |> And
  -            rdy
  -
  -        let AbsReadEor () =
  -            if rdy then
  -                ReadMemory((opcode3 <<< 8) ||| opcode2) |> Eor
  -            rdy
  -
  -        let AbsReadOra () =
  -            if rdy then
  -                ReadMemory((opcode3 <<< 8) ||| opcode2) |> Ora
  -            rdy
  -
  -        let AbsReadAdc () =
  -            if rdy then
  -                ReadMemory((opcode3 <<< 8) ||| opcode2) |> Adc
  -            rdy
  -
  -        let AbsReadCmp () =
  -            if rdy then
  -                ReadMemory((opcode3 <<< 8) ||| opcode2) |> Cmp a
  -            rdy
  -
  -        let AbsReadCpy () =
  -            if rdy then
  -                ReadMemory((opcode3 <<< 8) ||| opcode2) |> Cmp y
  -            rdy
  -
  -        let AbsReadNop () =
  -            if rdy then
  -                ReadMemory((opcode3 <<< 8) ||| opcode2) |> ignore
  -            rdy
  -
  -        let AbsReadCpx () =
  -            if rdy then
  -                ReadMemory((opcode3 <<< 8) ||| opcode2) |> Cmp x
  -            rdy
  -
  -        let AbsReadSbc () =
  -            if rdy then
  -                ReadMemory((opcode3 <<< 8) ||| opcode2) |> Sbc
  -            rdy
  +            IfReady <| pc <- (pc &&& 0x00FF) ||| (ReadMemoryInternal(0x0100 ||| s) <<< 8)
  +
  +        let AbsRead operation = ReadMemory ((opcode3 <<< 8) ||| opcode2) operation
  +        let AbsReadLda () = AbsRead <| SetNZA
  +        let AbsReadLdy () = AbsRead <| SetNZY
  +        let AbsReadLdx () = AbsRead <| SetNZX
  +        let AbsReadBit () = AbsRead <| Bit
  +        let AbsReadLax () = AbsRead <| Lax
  +        let AbsReadAnd () = AbsRead <| And
  +        let AbsReadEor () = AbsRead <| Eor
  +        let AbsReadOra () = AbsRead <| Ora
  +        let AbsReadAdc () = AbsRead <| Adc
  +        let AbsReadCmp () = AbsRead <| Cmp a
  +        let AbsReadCpy () = AbsRead <| Cmp y
  +        let AbsReadNop () = AbsRead <| ignore
  +        let AbsReadCpx () = AbsRead <| Cmp x
  +        let AbsReadSbc () = AbsRead <| Sbc
   
           let ZpIdxStage3X () =
               if rdy then
  
positive.code:             i <- (value &&& 0x04) <> 0
              z <- (value &&& 0x02) <> 0
              c <- (value &&& 0x01) <> 0
  
          let IfReady action =
              if rdy then
  
negative.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.FetchDummy; Uop.PushDummy; Uop.PushDummy; Uop.PushPReset; Uop.FetchPclVector; Uop.FetchPchVector; Uop.EndSuppressInterrupt |];
              // 107 (VOP_Fetch1_NoInterrupt)
              [| Uop.Fetch1Real |];
          |]
  