anchor.diff:  ;; CREATING THE COMMANDS
   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   
  -(def-nxt-command get-firmware-version #x01 #x88)
  -(def-nxt-command get-device-info      #x01 #x9b)
  -(def-nxt-command find-first           #x01 #x86 file-name (string 2 21))
  -(def-nxt-command find-next            #x01 #x87 handle    (ubyte 2))
  -(def-nxt-command nxt-close                #x01 #x84 handle     (ubyte 2))
  +
  +
  +
   
   
   ;; (def-nxt-command get-input-values     #x00 #x07 port       (ubyte 2))
  
positive.code: 	       (string `(read-string-from-reply data ,(second spec) ,(third spec)))
  	       (uword `(read-uword-from-reply data ,(second spec)))
  	       (ulong `(read-ulong-from-reply data ,(second spec)))
  	       (t (error "Unrecognized type ~S in specification" (type-of-spec spec)))))))))
  
  
  ;; open read command
  (def-reply-package #x80 handle (ubyte 3)
  		        file-size (ulong 4))
  ;; oen write command
  (def-reply-package #x81 handle (ubyte 3))
  ;; read command
  ;(def-reply-package #x82 handle (byte 3)
  ;		        amount-read (uword 4)
  ;			data (data 6))
  ;; write command
  (def-reply-package #x83 handle (ubyte 3)
  		   amount-written-to-flash (uword 4))
  ;; close command
  (def-reply-package #x84 handle (ubyte 3))
  ;; delete command
  (def-reply-package #x85 file-name (string 3 22))
  ;; find-first
  (def-reply-package #x86 handle (ubyte 3)
  		        file-name (string 4 23)
  			file-size (ulong 24))
  ;; find-next
  (def-reply-package #x87 handle (ubyte 3)
  		        file-name (string 4 23)
  			file-size (ulong 24))
  ;; Get firmware version
  (def-reply-package #x88 protocol-version-minor (ubyte 3)
  		        protocol-version-major (ubyte 4)
                          firmware-version-minor (ubyte 5)
                          firmware-version-major (ubyte 6))
  
  ;; Get device info
  (def-reply-package #x9b 
      nxt-name (string 3 17)
      bluetooth-signal-strength (ulong 25)
  
negative.code:        :until (eql char 0)
         :do
         (write-char (code-char char) s))))
  
  (defun read-data-from-reply (vector start amount)
    "Reads `amount' nr of bytes from the vector at start"
    (make-array amount :displaced-to vector :displaced-index-offset start))
  
  (defun write-uword-to-command (vector value location)
    (setf (aref vector location) (ldb (byte 8 0) value))
  