home *** CD-ROM | disk | FTP | other *** search
- 1 rem *********************************
- 2 rem * sample loader for data *
- 3 rem * with checksum *
- 4 rem *********************************
- 5 rem
- 10 sa=49152:ea=50800:dt=16
- 20 printchr$(147)spc(14)"reading ml!"
- 30 fori=0todt-2:read d$:gosub 100
- 40 printchr$(19)chr$(17)chr$(17)chr$(17)"loading at:";sa+i
- 50 pokesa+i,d:ck=ck+d:next:readd$:gosub100:ck=ckand255
- 60 ifd<>ckthenprintchr$(17)"data error in line";peek(63)+256*peek(64):stop
- 70 sa=sa+dt-1:ck=0:ifsa<=eagoto30
- 80 printchr$(17)"finished!":end
- 100 rem d=val(d$):return
- 110 rem remove 'rem' from line 100 for decimal numbers
- 120 l=asc(right$(d$,1))-48:ifl>9thenl=l-7
- 130 h=asc(left$(d$,1))-48:ifh>9thenh=h-7
- 140 d=l+16*h:return
-