anchor.diff:    (reverse-little-endian (elt segment loc) (elt segment (1+ loc))))
   
   (defun write-word-to-ram (loc word &optional (segment *ram*))
  +  "Write a word to a RAM segment."
     (setf (elt segment loc) (logand word #x00ff))
     (setf (elt segment (1+ loc)) (ash (logand word #xff00) -8)))
   
  
positive.code:   value1)
  
  (defun set-sf-on-op (value is-word)
    (setf (flag-p :sf) (if is-word (>= (/ value #x8000) 1) (>= (/ value #x80) 1)))
    value)
  
  (defun set-zf-on-op (value)
  
negative.code:   (+ low (ash high 8)))
  
  (defun wrap-overflow (value is-word)
    "Wrap around an overflowed value."
    (if is-word (mod value #x10000) (mod value #x100)))
  
  ;;; Instruction loader
  
  (defun load-instructions-into-ram (instrs)
    (setf (register :ip) 0)
    (setf (subseq *ram* 0 #x7fff) instrs)
    (length instrs))
  
  (defun next-instruction ()
    (incf (register :ip))
  