g the value
of each byte in hexadecimal format. Note that the <strong>S</strong> variable is filled with the file size
after the <strong>LOAD</strong> instruction, so we use it as a counter (counting down) to find out when
we've finished the file.</p>

<pre>
rem *** Hex dumper ***

print "Enter a filename:"
input $1

x = RAMSTART

load $1 x
if r = 1 then goto error

loop:
  peek a x
  print hex a ;
  print "  " ;
  x = x + 1
  s = s - 1
  if s = 0 then goto finish
  goto loop

finish:
print ""
end

error:
p