   dim sector$(256)
   print "program to read SSDD CoCo FLEX disks from D0: on SSB"
   input "where to put result? " sector$
   create #1,sector$
   open #2,"d0:"
   for track=1 to 35
       for sector=1 to 18
           print "reading track";track;"sector";sector
           logicalposition=((track-1)*18+(sector-1))*128
           if error when
                read #2@logicalposition,Sector$
           then
                if error when
                ! was probably some stupid read-ahead error. Ignore it.
                  read #2@logicalposition,Sector$
                then
                    Print "That sector is unreadable; substituting trash."
                    len(Sector$)=maxlen(Sector$)
                fi
         fi
           write #1,Sector$
       next sector
   next track
END
