anchor.diff:       (#xf9 4 3 absolute-y)
        (#xfd 4 3 absolute-x))
     (flet ((flip-bit (position x) (logxor (expt 2 position) x)))
  -    (let* ((val (funcall mode cpu))
  +    (let* ((val (getter mode style cpu))
              (result (- (cpu-ar cpu) val (flip-bit 0 (status-bit :carry cpu)))))
         (set-flags-if cpu :zero (zerop (wrap-byte result))
                       :overflow (overflow-p result (cpu-ar cpu) (flip-bit 7 val))
  
positive.code: ;; https://github.com/mnaberez/py65/blob/master/src/py65/devices/mpu6502.py
  ;; http://nesdev.parodius.com/6502.txt
  
  ;;;; DESIGN:
  ;; Why methods and a case instead of functions inline in the case?
  ;; Well, now we can use :around methods and the MOP to be awesome/crazy.
  ;; Plus who wants one big case statement for a CPU? Ugh. Abstract!
  ;; Performance is less interesting than cool features and crazy hacks.
  ;; Optimize later! See Frodo redpill + ICU64 for an example of what's possible.
  ;; Worth using sb-sprof sampling profiler to find low hanging fruit.
  
  ; TODO: Add support for Decimal mode. (not supported on NES)
  (defopcode adc (:docs "Add to Accumulator with Carry")
      ((#x61 6 2 indirect-x)
       (#x65 3 2 zero-page)
       (#x69 2 2 immediate)
  
negative.code:      (#x95 4 2 zero-page-x)
       (#x99 5 3 absolute-y)
       (#x9d 5 3 absolute-x))
    (setter mode (cpu-ar cpu) cpu))
  
  (defasm stx (:docs "Store X register" :raw t)
      ((#x86 3 2 zero-page)
       (#x8e 4 3 absolute)
       (#x96 4 2 zero-page-y))
    (setter mode (cpu-xr cpu) cpu))
  
  (defasm sty (:docs "Store Y register" :raw t)
      ((#x84 3 2 zero-page)
       (#x8c 4 3 absolute)
       (#x94 4 2 zero-page-x))
    (setter mode (cpu-yr cpu) cpu))
  
  (defasm tax (:docs "Transfer Accumulator to X register")
      ((#xaa 2 1 implied))
    (let ((result (setf (cpu-xr cpu) (cpu-ar cpu))))
      (set-flags-nz cpu result)))
  
  (defasm tay (:docs "Transfer Accumulator to Y register")
      ((#xa8 2 1 implied))
    (let ((result (setf (cpu-yr cpu) (cpu-ar cpu))))
      (set-flags-nz cpu result)))
  
  (defasm tsx (:docs "Transfer Stack Pointer to X register")
      ((#xba 2 1 implied))
    (let ((result (setf (cpu-xr cpu) (cpu-sp cpu))))
      (set-flags-nz cpu result)))
  
  (defasm txa (:docs "Transfer X register to Accumulator")
      ((#x8a 2 1 implied))
    (let ((result (setf (cpu-ar cpu) (cpu-xr cpu))))
      (set-flags-nz cpu result)))
  
  (defasm txs (:docs "Transfer X register to Stack Pointer")
      ((#x9a 2 1 implied))
    (setf (cpu-sp cpu) (cpu-xr cpu)))
  
  (defasm tya (:docs "Transfer Y register to Accumulator")
      ((#x98 2 1 implied))
    (let ((result (setf (cpu-ar cpu) (cpu-yr cpu))))
      (set-flags-nz cpu result)))
  