home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 85 / 085.d81 / copier (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  5KB  |  106 lines

  1. 10 goto30
  2. 20 hi=int(nu/256):lo=nu-hi*256:return
  3. 30 ify=0theny=1:load"filecopy.o",8,1
  4. 40 poke51,.:poke56,47:clr:dimf$(100),t$(100),ea(100),sa(100)
  5. 45 dd%=9:close2:open2,9,15:close2:ifstthendd%=8
  6. 46 ifdd%=9thengosub2000
  7. 50 rb=1:gosub520:sa=12288:fl$="":f=32768
  8. 70 a=peek(f):ifa<>0thenfl$=fl$+chr$(a):f=f+1:goto70
  9. 80 iflen(fl$)>16thenfl$=left$(fl$,16)
  10. 90 open2,8,2,"files on side "+si$
  11. 100 input#2,a$:i=st:input#2,nf$:nf=val(nf$):input#2,nb$:nb=val(nb$)+1:forx=1tonf:input#2,f$(x),t$(x):next
  12. 120 nf=nf+1:f$(nf)="loadstar reader":t$(nf)="p":ifa$<>fl$andi=0then100
  13. 140 ifa$=fl$then170
  14. 150 print"error....file "fl$" not found in file!":close2:stop
  15. 170 close2:print:print:poke198,.:::::d1=.
  16. 230 nu=sa:gosub20:d1=d1+1:d=d1:poke12131,hi:poke12135,lo:sa(d1)=sa
  17. 240 gosub670:print"[154]reading:"f$(d):open1,8,2,f$(d):sys12040:close1
  18. 260 ea(d1)=peek(832)+peek(833)*256:sa=ea(d1)+1:if(ea(d1)<53248)and(d1<nf)then230
  19. 280 ifea(d1)<53248then310
  20. 290 d1=d1-1:sa=12288:print"[150]                            
  21. 300 [153]"                      
  22. 310 ifdd%=9then340
  23. 315 print"       insert destination disk...      
  24. 320 [153]"    press space when ready to copy.":[151]198,.
  25. 330 [161]a$:[139]a$[179][177]" "[167]330
  26. 340 [139]rb[167][153]"       forchecking # of blocks free
  27. 350 ifrbthenrb=.:gosub790
  28. 360 d2=d2+1:d=d2:gosub670:print"[154]writing:"f$(d):gosub640:if(mm)then420
  29. 390 nu=ea(d2):gosub20:poke832,lo:poke833,hi:nu=sa(d2):gosub20:poke12131,hi:poke12135,lo
  30. 410 open1,dd%,2,f$(d)+","+t$(d)+",w":sys12084:close1
  31. 420 ifd2<d1then360
  32. 430 ifdd%=9then460
  33. 435 print"       insert [153]"dn$"...
  34. 440 [153]" press space when ready to continue.":[151]198,.
  35. 450 [161]a$:[139]a$[179][177]" "[167]450
  36. 460 [141]600:[139](mm$[179][177]dn$)[167][141]710:[137]460
  37. 470 [153]"onon";:[129]a[178]1[164]2:[153]"                                       ":[130]
  38. 480 [153]"ononon";:[151]832,.:[151]833,32:[139]d1[179]nf[167]230
  39. 500 [141]1030:[137]1310
  40. 520 [151]53280,0:[151]53281,0:[153][199](142)"load(NULL)tantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantanright$";
  41. 540 [153]"(NULL)       loadstar program copier        (NULL)";
  42. 550 [153]"(NULL)   contby:  mike maynard & alan gardner   (NULL)";
  43. 560 [153]"mid$tantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantan(NULL)";:[129]a[178]217[164]242:[151]a,[194](a)[176]128:[130]
  44. 580 [141]600:si$[178][201](dn$,1):mm$[178]dn$:[153]" please wait five more seconds... ":[142]
  45. 600 [159]15,8,15,"i0":[159]8,8,8,"#":[152]15,"ua:8 0 18 0":[152]15,"b-p:8 144
  46. 630 dn$="":fora=1to16:get#8,a$:dn$=dn$+a$:next:close8:close15:return
  47. 640 open15,dd%,15,"r0:"+f$(d)+"="+f$(d):input#15,er:close15:mm=.:ifer=63thenmm=1
  48. 660 return
  49. 670 print"";:fora=1to20:print"                                       ":next:return
  50. 690 print"[145][145][145][145][145][145]";:fora=1to6:print"                                       ":next:print"[145][145][145][145][145]";:return
  51. 710 print"[145][145][159] "mm$"[154] is not in the drive.":print"                                     
  52. 730 [153]" put open"mm$" contin the drive and
  53. 740 print"       press space [154]to try again.":poke198,.
  54. 750 geta$:ifa$<>" "then750
  55. 760 print"[145][145][145][145]";:fora=1to4:print"                                      ":next:print"[145][145][145]":return
  56. 790 open15,dd%,15,"i0":input#15,er:close15:if(er<20)or(er>24)then810
  57. 800 gosub670:print" the disk in the drive isn't formatted.":goto910
  58. 810 open15,dd%,15,"i0":open8,dd%,8,"#
  59. 811 [152]15,"ua:8 0 18 0":[152]15,"b-p:8 2":[161]#8,a$:[139]a$[179][177]"2"[167]ba[178]nb[170]1:[137]865
  60. 820 [152]15,"ua:8 0 18 0":[152]15,"b-p:8 4":ba[178].:[129]a[178]1[164]35:[139]a[178]18[167][161]#8,a$:[137]850
  61. 840 [161]#8,a$:ba[178]ba[170][198](a$[170][199](.))
  62. 850 [129]b[178]1[164]3:[161]#8,a$:[130]:[130]
  63. 865 [139]nb[179]ba[167][160]8:[160]15:[142]
  64. 870 [160]8:[160]15:[141]670:[153]"there's not enough room on this disk
  65. 890 print"for [150]"f$(d)" and the files":print"associated with it.
  66. 910 [153]"sys             your options:":[153]"fcontormat a disk for this program
  67. 930 print"t[154]ry saving this program on another disk
  68. 940 [153]"qcontuit (forget about copying it)":[153]"press fcont, tcont, or qcont.":[151]198,.
  69. 960 a[178][194](203):[139]a[179][177]21[175]a[179][177]22[175]a[179][177]62[167]960
  70. 970 [139]a[178]62[167][141]1250:[137]960
  71. 980 [139]a[178]22[167][153]"       forchecking # of blocks free":[137]790
  72. 990 [153]"cont     put disk to format in drive 0
  73. 1000 print"    press space[154] when ready to format":poke198,.
  74. 1010 geta$:ifa$<>" "then1010
  75. 1020 open15,dd%,15,"n0:loadstar progs,mm":close15:goto790
  76. 1030 gosub670:print"         [154]-- finished copying [154]--
  77. 1040 [153]"contto load this program from basic, enter:":[153]"load "[199](34)f$(1)[199](34)",8
  78. 1060 print"[145]"tab(30)"[154]then...":print"run":print"[154]      please make note of this...
  79. 1080 [153]"         press space contfor more
  80. 1090 ifpeek(203)<>60then1090
  81. 1100 gosub670:print"":print"[154]to read about this program from basic,
  82. 1120 [153]"enter the following:
  83. 1130 print"load "chr$(34)"loadstar reader"chr$(34)",8,1   [154]then...
  84. 1140 [153]"new                          contthen...":[153]"sys 679,"[199](34)"t."f$(1)[199](34)
  85. 1160 [153]"contuse pcont to pause, ccont to continue, and":[153]"acont to abort.
  86. 1180 print"[154]      please make note of this...
  87. 1190 [153]"   press space contto return to loadstar
  88. 1200 ifpeek(203)<>60then1200
  89. 1210 return:open3,8,3,"files on side 1":fori=.to1:get#3,a$:i=st:printa$;:next:close3
  90. 1250 print" [154]are you sure you want to quit? (y[154]/n[154])":poke198,.
  91. 1260 a=peek(203):ifa<>25anda<>39then1260
  92. 1270 ifa=39thenprint"[145]                                     ":print"[145][145]";:return
  93. 1280 print"[154]place [159]"dn$" [154]in the drive and
  94. 1290 [153]"press space contto return to loadstar":[151]198,.
  95. 1300 a[178][194](203):[139]a[179][177]60[167]1300
  96. 1310 [137]3000
  97. 2000 [153]"sys   is drive 9 your destination?  (y/n)
  98. 2010 geta$:ifa$<>"y"anda$<>"n"then2010
  99. 2020 print"                                         ":ifa$="n"thendd%=8
  100. 2040 return
  101. 3000 poke45,135:poke46,27:poke47,142:poke48,27:poke49,142:poke50,27:poke51,0
  102. 3010 poke52,128:poke53,0:poke54,0:poke55,0:poke56,128:clr
  103. 60000 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15:ifer<>63thenprint"[147]":end
  104. 60020 a$="hello connect":q$=chr$(34):poke53281,7:poke53280,7:print"[147]":print"[158]load"q$a$q$",8
  105. 60040 [153]"run":[151]631,13:[151]632,13:[151]198,2:[162]
  106.