	format BINARY as "TXT"
match =ifile,ifile { err }
define atest OK
match =count,count { restore atest
  size = 512 }
match =OK, atest { match i, count \{ size = i \}
  restore atest }
define atest OK
match =start,start { restore atest
  begin = 0 }
match =OK, atest { match i, start \{ begin = i \}
  restore atest }
macro printchr [c] { forward db c
  display c }
macro printhex [c] { forward if c < 10
    printchr '0' + c
  else
    printchr '0' + c + 7
  end if }
macro printint i { t = i
  c = 8
  while c > 0
    h = t shr ( c * 8 - 4 )
    l = t shr ( c * 8 - 8 )
    printhex h and 15, l and 15
    c = c - 1
  end while }
offset = begin
while offset < begin + size
  virtual at 0
    readed = 16
    if begin + size - offset < readed
      readed = begin + size - offset
    end if
    match name,ifile { if name eqtype ""
        file name:offset,readed
      else
        file `name:offset,readed
      end if }
    readed = $
    rb 16
    load a qword from 0
    load b qword from 8
  end virtual
  printint offset
  printchr ' ', ' '
  index = 0
  temp = a
  while index < readed
    low = temp and 15
    temp = temp shr 4
    high = temp and 15
    temp = temp shr 4
    printhex high, low
    printchr ' '
    if index and 3 = 3
      printchr ' '
    end if 
    index = index + 1
    if index = 8
      temp = b
    end if
  end while
  index = 0
  temp = a
  while index < readed
    char = temp and 255
    temp = temp shr 8
    if char < ' '
      char = '.'
    end if
    printchr char
    index = index + 1
    if index = 8
      temp = b
    end if
  end while
  printchr 13, 10
  offset = offset + readed
end while
