anchor.diff:  ;;; Constant mappings
   
   (defun bits->word-reg (bits)
  +  "Map a bit pattern to a word register."
     (elt +bits-to-register+ bits))
   
   (defun bits->byte-reg (bits)
  +  "Map a bit pattern to a byte register."
     (elt +bits-to-byte-register+ bits))
   
   (defun bits->segment (bits)
  +  "Map a bit pattern to a segment register."
     (elt +bits-to-segment+ bits))
   
   (defmacro default-seg-to (default &optional (current *current-segment*))
  +  "Set a default segment if no override is given."
     `(if (null ,current) ,default ,current))
   
   (defun address-for-r/m (mod-bits r/m-bits)
  +  "Determine the registers needed to calculate an indirect address."
     (disasm-instr
         (if (and (= mod-bits #b00) (= r/m-bits #b110))
   	  (list :disp (peek-at-word) :segment (default-seg-to :ds))
  
positive.code: 	  (logand (register word) #x00ff)))))
  
  (defsetf byte-register (reg) (value)
    `(let* ((register-to-word (getf +byte-register-to-word+ ,reg)) (word (first register-to-word)) (wrapped-value (wrap-carry ,value nil)))
       (if (second register-to-word)
  	 (setf (register word) (+ (ash wrapped-value 8) (logand (register word) #x00ff)))
  
negative.code:     (bit-vector->integer flags)))
  
  (defsetf flags-register (&optional (is-word t)) (value)
    "Write the flags as the FLAGS register."
    `(progn
       (setf (flag-p :cf) (logbitp 0 ,value))
       (setf (flag-p :pf) (logbitp 2 ,value))
  