' PB-Dump: Dump the memory contents of a PB-770 to tape
'
100 cls:print "PB-DUMP (C) MvC 2008"
110 input"Start (HEX): ", st$:st=val("&H"+st$)
120 input"# kilobytes: ", kb
130 st=int(st/256)*256
140 erase a$:dim a$(7)*70
150 for b=0 to 4*kb-1
160   a=st+256*b:s=0
170   st$=hex$(a):cls:print st$
180   for i=0 to 7 
190     c=a+32*i:a$(i)=hex$(c)+": "
200     for j=c to c+31
210       d=peek(j):s=s+d:a$(i)=a$(i)+right$(hex$(d),2)
220     next j
230     locate 0,0:print a$(i);
240   next i
250   cls:if s=0 then 280 else print st$,"writing":beep 0
260   put a$(0),a$(1),a$(2),a$(3),a$(4),a$(5),a$(6),a$(7)
270   beep 1:beep 0
280 next b
285 print hex$(st-1024*kb+256);"-";hex$(st+255)
290 a$=inkey$:if a$="" then 290
300 goto 100     
