home *** CD-ROM | disk | FTP | other *** search
/ Go64! / Go64_2000-03_2000_CSW_Side_A.d64 / seqtransfer (.txt) < prev   
Commodore BASIC  |  2023-02-26  |  3KB  |  76 lines

  1. 0 rem this program prints sequential
  2. 5 rem files to the user port
  3. 100 ba=49152:poke828,ba-(int(ba/256)*256):poke829,int(ba/256)
  4. 110 dim co%(255):dim es%(255)
  5. 115 fori=0to255:readco%(i):next:fori=0to255:reades%(i):next
  6. 120 le=0:input"drive:";dr:input"file:";fi$:fi$=fi$+",s,r"
  7. 125 open1,dr,8,fi$
  8. 130 ifle>3000thengosub300
  9. 131 ifst<>0then200
  10. 132 get#1,x$
  11. 134 ifasc(x$+chr$(0))=13then150
  12. 136 ifasc(x$+chr$(0))=27then170
  13. 140 pokeba+le,co%(asc(x$+chr$(0))):le=le+1:goto130
  14. 150 pokeba+le,13:le=le+1:pokeba+le,10:le=le+1
  15. 160 goto 130
  16. 170 pokeba+le,27:le=le+1:get#1,x$:cc=asc(x$+chr$(0)):rl=es%(cc):pokeba+le,cc
  17. 171 le=le+1
  18. 172 ifrl=0then130
  19. 173 ifcc=42then310
  20. 174 ifcc=68then350
  21. 176 forj=1torl:get#1,x$:pokeba+le,asc(x$+chr$(0)):le=le+1:next
  22. 180 goto130
  23. 200 poke830,le-(int(le/256)*256):poke831,int(le/256):close1:sys834
  24. 250 end
  25. 300 poke830,le-(int(le/256)*256):poke831,int(le/256):sys834:le=0:return
  26. 310 get#1,x$:md=asc(x$+chr$(0)):pokele+ba,md:le=le+1:fa=1-(md>31)*2-(md>63)*3
  27. 315 get#1,x$:ll=asc(x$+chr$(0)):pokele+ba,ll:le=le+1
  28. 320 get#1,x$:lh=asc(x$+chr$(0)):pokele+ba,lh:le=le+1:lx=(ll+256*lh)*fa
  29. 325 fork=1tolx:get#1,x$:pokeba+le,asc(x$+chr$(0)):le=le+1
  30. 330 ifle>3000thengosub300
  31. 335 next
  32. 340 goto 130
  33. 350 tm=1
  34. 355 forno=1to32:get#1,x$:tb=asc(x$+chr$(0)):pokeba+le,tb:le=le+1
  35. 360 if tb<tmthenno=32
  36. 365 tm=tb:next
  37. 370 goto130
  38. 490 rem convers. petscii to ascii data
  39. 500 data 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
  40. 510 data 16,17,18,19,127,21,22,23,24,25,26,27,28,32,30,31
  41. 520 data 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47
  42. 530 data 48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63
  43. 540 data 64,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111
  44. 550 data 112,113,114,115,116,117,118,119,120,121,122,91,156,93,94,95
  45. 560 data 96,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79
  46. 570 data 80,81,82,83,84,85,86,87,88,89,90,123,124,125,126,157
  47. 580 data 0,0,0,0,0,0,0,0,0,0,0,0,0,13,0,0
  48. 590 data 0,10,0,0,0,0,0,0,0,0,0,0,0,8,0,0
  49. 600 data 32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  50. 610 data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  51. 620 data 96,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79
  52. 630 data 80,81,82,83,84,85,86,87,88,89,90,123,124,125,126,157
  53. 640 data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  54. 650 data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227
  55. 990 rem enter data here
  56. 991 rem -2 string follows
  57. 992 rem -1 end of file
  58. 993 rem 0-255 ascii codes
  59. 1500 data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0
  60. 1510 data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
  61. 1520 data 1,1,1,0,2,1,0,1,6,1,3,1,1,1,1,1
  62. 1530 data 0,1,0,1,0,0,0,0,1,1,0,1,1,0,0,2
  63. 1540 data 0,1,1,1,1,0,0,0,0,1,1,2,2,0,1,1
  64. 1550 data 0,1,1,1,0,1,1,1,1,2,2,1,2,1,1,1
  65. 1560 data 1,1,0,1,1,1,1,0,1,1,1,1,1,1,1,1
  66. 1570 data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
  67. 1580 data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
  68. 1590 data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
  69. 1600 data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
  70. 1610 data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
  71. 1620 data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
  72. 1630 data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
  73. 1640 data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
  74. 1650 data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
  75. 30000 data -1
  76.