anchor.diff:        :bc nil
         :bps bps))))
   
  -(defun check-boot-jmp (boot-jmp)
  -  (let ((n0 (aref boot-jmp 0))
  -        (n2 (aref boot-jmp 2)))
  -    (if (or (and (= n0 #xEB)
  -                 (= n2 #x90))
  -            (= n0 #xE9))
  -        boot-jmp
  -        (error "Bad boot-jmp : ~a .
  -Valid forms are : #(#xEB x #x90) and #(#xE9 x x).
  -X is for some 1 byte number." boot-jmp))))
  -
  -(defun check-bytes-per-sector (bytes-per-sector)
  -  "Ensure that bytes-per-sector is valid."
  -  (loop :for n :in '(512 1024 2048 4096)
  -     :do (when (= n bytes-per-sector)
  -           (return bytes-per-sector))
  -     :finally (error "Bad bytes-per-sector : ~a .
  -Valid bytes-per-sector are 512, 1024, 2048 and 4096" bytes-per-sector)))
  -
  -(defun check-sectors-per-cluster (sectors-per-cluster bytes-per-sector)
  -  (loop :for n :in '(1 2 4 8 16 32 64 128)
  -     :do (when (= n sectors-per-cluster)
  -           (return sectors-per-cluster))
  -     :finally (error "Bad sectors-per-cluster : ~a .
  -Valid bytes-per-sector are 1,2,4,8,16,32,64,128" sectors-per-cluster))
  -  (when (> (* sectors-per-cluster bytes-per-sector)
  -           32768)
  -    (error "Error sectors-per-cluster * bytes-per-sector > 32KiB .
  -sectors-per-cluster= ~a bytes-per-sector= ~a" sectors-per-cluster bytes-per-sector))
  -  sectors-per-cluster)
  -
  -(defun check-media-type (media-type)
  -  (loop :for n :in '(#xF0 #xF8 #xF9 #xFA #xFB #xFC #xFD #xFE #xFF)
  -     :do (when (= n media-type)
  -           (return media-type))
  -     :finally (error "Bad media-type : ~a .
  -Valid media-type ara #xF0 #xF8 #xF9 #xFA #xFB #xFC #xFD #xFE #xFF" media-type)))
  -
  -(defun check-fat-type-label32 (fat-type-label)
  -  (if (string= "FAT32   " fat-type-label)
  -      fat-type-label
  -      (error "Bad fat-type-label : ~a .
  -Valid media-type ara 'FAT32   ' " fat-type-label)))
  -
  -(defun check-bps (bps)
  -  (unless (= bps +bootable-partition-signature+)
  -    (error "Bad bps : ~a .
  -Valid bps are ~a" bps +bootable-partition-signature+))
  -  bps)
  -
  -(defstruct fat32
  -  (boot-jmp nil)
  -  (oem-name nil :type string)
  -  (bytes-per-sector nil :type (unsigned-byte 16))
  -  (sectors-per-cluster nil :type (unsigned-byte 8))
  -  (reserved-sector-count nil :type (unsigned-byte 16))
  -  (table-count nil :type (unsigned-byte 8))
  -  (root-entry-count nil :type (unsigned-byte 16))
  -  (total-sectors16 nil :type (unsigned-byte 16))
  -  (media-type nil :type (unsigned-byte 8))
  -  (table-size-16 nil :type (unsigned-byte 16))
  -  (sectors-per-track nil :type (unsigned-byte 16))
  -  (head-side-count nil :type (unsigned-byte 16))
  -  (hidden-sector-count nil :type (unsigned-byte 32))
  -  (total-sectors32 nil :type (unsigned-byte 32))
  -  ;;fat32
  -  (table-size-32 nil :type (unsigned-byte 32))
  -  (extended-flags nil)
  -  (fat-version nil)
  -  (root-cluster nil :type (unsigned-byte 32))
  -  (fat-info nil :type (unsigned-byte 16))
  -  (backup-BS-sector nil :type (unsigned-byte 16))
  -  (reserved-0 nil)
  -  (drive-number nil :type (unsigned-byte 8))
  -  (reserved-1 nil)
  -  (boot-signature nil :type (unsigned-byte 8))
  -  (volume-id nil :type (unsigned-byte 32))
  -  (volume-label nil :type string)
  -  (fat-type-label nil :type string)
  -  (bc nil) ; 90 420
  -  (bps nil :type (unsigned-byte 32)))
  +(defstruct fs-info
  +  (lead-signature nil :type (unsigned-byte 32))
  +  (reserved-0 nil) ; 4 480
  +  (structure-signature nil :type (unsigned-byte 32))
  +  (last-free-cluster nil :type (unsigned-byte 32))
  +  (next-free-cluster nil :type (unsigned-byte 32))
  +  (reserved-1 nil) ; 496 12
  +  (trail-signature nil :type (unsigned-byte 32)))
   
   (defconstant +lead-signature+ #x41615252)
   (defconstant +structure-signature+ #x61417272)
   (defconstant +trail-signature+ #xAA550000)
  +
  +(defun check-lead-signature (lead-signature)
  +  (if (= lead-signature +lead-signature+)
  +      lead-signature
  +      (error "Bad lead-signature : ~a .
  +Valid lead-signature is ~a" lead-signature +lead-signature+)))
  +
  +(defun check-structure-signature (structure-signature)
  +  (if (= structure-signature +structure-signature+)
  +      structure-signature
  +      (error "Bad structure-signature : ~a .
  +Valid structure-signature is ~a" structure-signature +structure-signature+)))
  +
  +(defun check-trail-signature (trail-signature)
  +  (if (= trail-signature +trail-signature+)
  +      trail-signature
  +      (error "Bad trail-signature : ~a .
  +Valid trail-signature is ~a" trail-signature +trail-signature+)))
   
   (defun read-fat32-info-structure (sector)
     (let ((lead-signature (sys.int::ub32ref/le sector 0))
  
positive.code:   (+ (fat32-reserved-sector-count fat32)
       (* (fat32-table-count fat32)
          (fat32-table-size-32 fat32))
       (root-dir-sectors fat32)))
  
  (defun first-root-dir-sector (fat32)
    (- (first-data-sector fat32)
       (root-dir-sectors fat32)))
  
  (defun first-sector-of-cluster (fat32 cluster)
    (+ (* (- cluster 2)
  
negative.code:             (ldb (byte 4 5) n)
              (ldb (byte 7 9) n))))
  
  (defun root-dir-sectors ()
    0)
  
  (defun data-sectors (fat32)
    (- (fat32-total-sectors32 fat32)
       (+ (fat32-reserved-sector-count fat32)
          (* (fat32-table-count fat32)
             (fat32-table-size-32 fat32))
          (root-dir-sectors))))
  
  (defun total-clusters (fat32)
    (floor
  