anchor.diff:  ;;; Flag effects
   
   (defun set-cf-on-add (value)
  -  (setf (flag-p :cf) *has-overflowed*)
  +  (setf (flag-p :cf) *has-carried*)
     value)
   
   (defun set-cf-on-sub (value1 value2)
  
positive.code:       (- (1+ (logxor value (if is-word #xffff #xff))))
        value))
  
  (defun wrap-overflow (value is-word)
    "Wrap around an overflowed value."
    (let ((overflow (if is-word (>= value #x10000) (>= value #x100))))
      (setf *has-overflowed* overflow)
      (if overflow
  	(if is-word (mod value #x10000) (mod value #x100))
  	value)))
  
  
negative.code:     (getf *registers* reg)))
  
  (defun set-reg (reg value)
    (setf (getf *registers* reg) (wrap-carry value t)))
  
  (defsetf register set-reg)
  
  