home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1994 August / 1994-08b.d64 / reader (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  2KB  |  44 lines

  1. 100 rem reader      jim butterfield
  2. 110 data 3085,8205,0
  3. 120 read x
  4. 130 if x=0 then print "unknown system!":end
  5. 140 x=x+0:if peek(x)<>asc("j") goto 120
  6. 150 x=x+1:if peek(x)<>asc("i") goto 120
  7. 160 x=x+1:if peek(x)<>asc("m") goto 120
  8. 170 x=x+1:if peek(x)<>asc(" ") goto 120
  9. 180 x=x+1:if peek(x)<>asc("b") goto 120
  10. 190 x=x+1
  11. 200 rem sys to the code, wherever
  12. 210 open 15,8,15
  13. 220 open 1,8,0,"$0:*=s"
  14. 230 get#15,e,e$:if e<>0 then printe$:stop
  15. 240 printchr$(14):sys x
  16. 250 close 1
  17. 260 z$=chr$(peek(9728))
  18. 270 if z$="a" then print "no sequential files!":end
  19. 280 print z$;".< exit >"
  20. 290 print "   .. press key 'a' to '";z$;"' .."
  21. 300 get a$:if a$<"a" or a$>z$ goto 300
  22. 310 if a$=z$ then end
  23. 320 poke 9728,asc(a$):print"[147][198]ile 0:";
  24. 330 sys x+131
  25. 340 print "[208]ress [q] to [209]uit"
  26. 350 print "[208]ress [p] to [208]rint"
  27. 360 print ".. any other key to display."
  28. 370 print chr$(157);:poke 9731,pos(0)+1:print:print
  29. 380 get z$,z$,z$,z$
  30. 390 get z$
  31. 400 if z$="p" goto 600
  32. 410 if z$="q" goto 700
  33. 420 if z$="" goto 390
  34. 430 sys x+225
  35. 440 a$=" >> [205][207][210][197] - [q] [212][207] [209][213][201][212]"
  36. 450 if st<>0 then a$=" >> [197]nd of [196]ocument <<"
  37. 460 printa$;:get z$,z$,z$,z$
  38. 470 get z$:if z$="" goto 470
  39. 480 for j=1 to 22:printchr$(20);:next j
  40. 490 if z$="q" or st<>0 goto 700
  41. 500 goto 430
  42. 600 open 4,4,7:sys x+396:close 4
  43. 700 close 1:close 15:run
  44.