anchor.diff:    (+ low (ash high 8)))
   
   (defun negative-p (value is-word)
  -  (or (if is-word (>= value #x8000) (>= value #x80)) (< value 0)))
  +  (let ((sign-and (if is-word #x8000 #x80)))
  +    (= (logand sign-and value) sign-and)))
   
   (defun twos-complement (value is-word)
     (if (negative-p value is-word)
  
positive.code: 
  (defparameter *ram* (make-array (* 64 1024) :initial-element 0 :element-type '(unsigned-byte 8)) "Primary segment")
  (defparameter *stack* (make-array (* 64 1024) :initial-element 0 :element-type '(unsigned-byte 8)) "Stack segment")
  (defparameter *flags* '(:cf 0 :sf 0 :zf 0) "Flags")
  (defparameter *registers* '(:ax 0 :bx 0 :cx 0 :dx 0 :bp 0 :sp #x100 :si 0 :di 0) "Registers")
  (defparameter *ip* 0 "Instruction pointer")
  (defparameter *has-carried* nil "Whether the last wraparound changed the value")
  
negative.code: (defmacro add-without-carry (src dest is-word &optional mod-bits r/m-bits)
    `(disasm-instr (list "add" :src ,src :dest ,dest)
       (with-in-place-mod ,dest ,mod-bits ,r/m-bits
         (let ((src-value ,src))
  	 (set-zf-on-op (set-sf-on-op (set-of-on-op (set-cf-on-add (incf ,dest src-value)) src-value ,is-word) ,is-word))))))
  
  (defmacro add-with-carry (src dest is-word &optional mod-bits r/m-bits)
    `(disasm-instr (list "adc" :src ,src :dest ,dest)
       (with-in-place-mod ,dest ,mod-bits ,r/m-bits
         (let ((src-plus-cf (+ ,src (flag :cf))))
  	 (set-zf-on-op (set-sf-on-op (set-of-on-op (set-cf-on-add (incf ,dest src-plus-cf)) src-plus-cf ,is-word) ,is-word))))))
  
  (defmacro sub-without-borrow (src dest is-word &optional mod-bits r/m-bits)
    `(disasm-instr (list "sub" :src ,src :dest ,dest)
       (with-in-place-mod ,dest ,mod-bits ,r/m-bits
         (let ((src-value ,src))
  	 (set-zf-on-op (set-sf-on-op (set-of-on-op (set-cf-on-sub (+ (decf ,dest src-value) src-value) src-value) src-value ,is-word) ,is-word))))))
  
  (defmacro sub-with-borrow (src dest is-word &optional mod-bits r/m-bits)
    `(disasm-instr (list "sbb" :src ,src :dest ,dest)
       (with-in-place-mod ,dest ,mod-bits ,r/m-bits
         (let ((src-plus-cf (+ ,src (flag :cf))))
  	 (set-zf-on-op (set-sf-on-op (set-of-on-op (set-cf-on-sub (+ (decf ,dest src-plus-cf) src-plus-cf) src-plus-cf) src-plus-cf ,is-word) ,is-word))))))
  
  (defmacro cmp-operation (src dest is-word &optional mod-bits r/m-bits)
    `(disasm-instr (list "cmp" :src ,src :dest ,dest)
       (let ((src-value ,src))
         (set-zf-on-op (set-sf-on-op (set-of-on-op (set-cf-on-sub ,dest src-value) src-value ,is-word) ,is-word)))))
  
  (defmacro and-operation (src dest is-word &optional mod-bits r/m-bits)
    `(disasm-instr (list "and" :src ,src :dest ,dest)
       (with-in-place-mod ,dest ,mod-bits ,r/m-bits
         (set-zf-on-op (set-sf-on-op (setf ,dest (logand ,src ,dest)) ,is-word))
         (setf (flag-p :cf) nil)
         (setf (flag-p :of) nil))))
  
  (defmacro or-operation (src dest is-word &optional mod-bits r/m-bits)
    `(disasm-instr (list "or" :src ,src :dest ,dest)
       (with-in-place-mod ,dest ,mod-bits ,r/m-bits
         (set-zf-on-op (set-sf-on-op (setf ,dest (logior ,src ,dest)) ,is-word))
         (setf (flag-p :cf) nil)
         (setf (flag-p :of) nil)))
  
  (defmacro xor-operation (src dest is-word &optional mod-bits r/m-bits)
    `(disasm-instr (list "xor" :src ,src :dest ,dest)
       (with-in-place-mod ,dest ,mod-bits ,r/m-bits
         (set-zf-on-op (set-sf-on-op (setf ,dest (logxor ,src ,dest)) ,is-word))
         (setf (flag-p :cf) nil)
         (setf (flag-p :of) nil))))
  
  (defmacro parse-group1-byte (opcode operation mod-bits r/m-bits)
    `(case (mod ,opcode 4)
  