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

  1. 5 print""chr$(142)"[147]"
  2. 10 goto30
  3. 20 hi=int(nu/256):lo=nu-hi*256:return
  4. 30 ify=0theny=1:load"filecopy.o",8,1
  5. 40 poke51,.:poke56,47:clr:dim f$(100),t$(100),ea(100),sa(100)
  6. 45 dd%=9:close2:open2,9,15:close2:ifstthendd%=8
  7. 46 ifdd%=9thengosub2000
  8. 50 rb=1:gosub520:sa=12288
  9. 60 fl$="":f=32768
  10. 70 a=peek(f):ifa<>0thenfl$=fl$+chr$(a):f=f+1:goto70
  11. 80 iflen(fl$)>16thenfl$=left$(fl$,16)
  12. 90 open2,8,2,"files on side "+si$
  13. 100 input#2,a$:i=st:input#2,nf$:nf=val(nf$):input#2,nb$:nb=val(nb$)+1
  14. 110 forx=1tonf:input#2,f$(x),t$(x):next
  15. 120 nf=nf+1:f$(nf)="loadstar reader":t$(nf)="p"
  16. 130 ifa$<>fl$andi=0then100
  17. 140 ifa$=fl$then170
  18. 150 print"error....file "fl$" not found in file!":close2
  19. 160 stop
  20. 170 close2
  21. 180 print
  22. 190 print:poke198,.
  23. 200 :
  24. 210 :
  25. 220 d1=.
  26. 230 nu=sa:gosub20:d1=d1+1:d=d1:poke12131,hi:poke12135,lo:sa(d1)=sa
  27. 240 gosub670:print"[154]reading:"f$(d)
  28. 250 open1,8,2,f$(d):sys12040:close1
  29. 260 ea(d1)=peek(832)+peek(833)*256:sa=ea(d1)+1
  30. 270 if (ea(d1)<53248) and (d1<nf) then 230
  31. 280 if ea(d1)<53248 then 310
  32. 290 d1=d1-1:sa=12288:print"[150]                            "
  33. 300 print"                      "
  34. 310 ifdd%=9then340
  35. 315 print"       insert destination disk...      "
  36. 320 print"    press space when ready to copy.":poke198,.
  37. 330 geta$:ifa$<>" "then330
  38. 340 ifrbthenprint"       [129]checking # of blocks free"
  39. 350 ifrbthenrb=.:gosub790
  40. 360 d2=d2+1:d=d2:gosub670
  41. 370 print"[154]writing:"f$(d):gosub640
  42. 380 if(mm)then420
  43. 390 nu=ea(d2):gosub20:poke832,lo:poke833,hi
  44. 400 nu=sa(d2):gosub20:poke12131,hi:poke12135,lo
  45. 410 open1,dd%,2,f$(d)+","+t$(d)+",w":sys12084:close1
  46. 420 if d2<d1 then 360
  47. 430 ifdd%=9then460
  48. 435 print"       insert [153]"dn$"..."
  49. 440 print" press space when ready to continue.":poke198,.
  50. 450 geta$:ifa$<>" "then450
  51. 460 gosub600:if(mm$<>dn$)thengosub710:goto460
  52. 470 print"[145][145]";:fora=1to2:print"                                       ":next
  53. 480 print"[145][145][145]";:poke832,.:poke833,32
  54. 490 if d1<nf then 230
  55. 500 gosub1030:rem  loading instructions
  56. 510 goto1310
  57. 520 poke53280,0:poke53281,0
  58. 530 printchr$(142)"[147][213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]";
  59. 540 print"[221]       loadstar program copier        [221]";
  60. 550 print"[221]   [154]by:  mike maynard & alan gardner   [221]";
  61. 560 print"[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]";
  62. 570 fora=217to242:pokea,peek(a)or128:next
  63. 580 gosub600:si$=right$(dn$,1):mm$=dn$
  64. 590 print" please wait five more seconds... ":return
  65. 600 open15,8,15,"i0":open8,8,8,"#"
  66. 610 print#15,"ua:8 0 18 0"
  67. 620 print#15,"b-p:8 144"
  68. 630 dn$="":fora=1to16:get#8,a$:dn$=dn$+a$:next:close8:close15:return
  69. 640 open15,dd%,15,"r0:"+f$(d)+"="+f$(d):input#15,er:close15
  70. 650 mm=.:ifer=63thenmm=1
  71. 660 return
  72. 670 print"";:fora=1to20:print"                                       ":next
  73. 680 return
  74. 690 print"[145][145][145][145][145][145]";:fora=1to6:print"                                       "
  75. 700 next:print"[145][145][145][145][145]";:return
  76. 710 print"[145][145][159] "mm$"[154] is not in the drive."
  77. 720 print"                                     "
  78. 730 print" put [159]"mm$" [154]in the drive and"
  79. 740 print"       press space [154]to try again.":poke198,.
  80. 750 geta$:ifa$<>" "then750
  81. 760 print"[145][145][145][145]";:fora=1to4:print"                                      ":next
  82. 770 print"[145][145][145]":return
  83. 780 rem check # of blocks free
  84. 790 open15,dd%,15,"i0":input#15,er:close15:if(er<20)or(er>24)then810
  85. 800 gosub670:print" the disk in the drive isn't formatted.":goto910
  86. 810 open15,dd%,15,"i0":open8,dd%,8,"#"
  87. 820 print#15,"ua:8 0 18 0":print#15,"b-p:8 4"
  88. 830 ba=.:fora=1to35:ifa=18thenget#8,a$:goto850
  89. 840 get#8,a$:ba=ba+asc(a$+chr$(.))
  90. 850 forb=1to3:get#8,a$:next
  91. 860 next:ifnb<bathenclose8:close15:return
  92. 870 close8:close15
  93. 880 gosub670:print"there's not enough room on this disk"
  94. 890 print"for [150]"f$(d)" and the files"
  95. 900 print"associated with it."
  96. 910 print"[158]             your options:"
  97. 920 print"f[154]ormat a disk for this program"
  98. 930 print"t[154]ry saving this program on another disk"
  99. 940 print"q[154]uit (forget about copying it)
  100. 950 [153]"press fcont, tcont, or qcont.":[151]198,.
  101. 960 a[178][194](203):[139]a[179][177]21[175]a[179][177]22[175]a[179][177]62[167]960
  102. 970 [139]a[178]62[167][141]1250:[137]960
  103. 980 [139]a[178]22[167][153]"       forchecking # of blocks free":[137]790
  104. 990 [153]"cont     put disk to format in drive 0"
  105. 1000 [153]"    press spacecont when ready to format":[151]198,.
  106. 1010 [161]a$:[139]a$[179][177]" "[167]1010
  107. 1020 [159]15,dd%,15,"n0:loadstar progs,mm":[160]15:[137]790
  108. 1030 [141]670:[153]"         cont-- finished copying cont--"
  109. 1040 [153]"contto load this program from basic, enter:"
  110. 1050 [153]"load "[199](34)f$(1)[199](34)",8"
  111. 1060 [153]"on"[163]30)"contthen...":[153]"run"
  112. 1070 [153]"cont      please make note of this..."
  113. 1080 [153]"         press space contfor more"
  114. 1090 [139][194](203)[179][177]60[167]1090
  115. 1100 [141]670:[153]""
  116. 1110 [153]"contto read about this program from basic,"
  117. 1120 [153]"enter the following:"
  118. 1130 [153]"load "[199](34)"loadstar reader"[199](34)",8,1   contthen..."
  119. 1140 [153]"new                          contthen..."
  120. 1150 [153]"sys 679,"[199](34)"t."f$(1)[199](34)
  121. 1160 [153]"contuse pcont to pause, ccont to continue, and"
  122. 1170 [153]"acont to abort."
  123. 1180 [153]"cont      please make note of this..."
  124. 1190 [153]"   press space contto return to loadstar"
  125. 1200 [139][194](203)[179][177]60[167]1200
  126. 1210 [142]
  127. 1220 [159]3,8,3,"files on side 1"
  128. 1230 [129]i[178].[164]1:[161]#3,a$:i[178]st:[153]a$;
  129. 1240 [130]:[160]3
  130. 1250 [153]" contare you sure you want to quit? (ycont/ncont)":[151]198,.
  131. 1260 a[178][194](203):[139]a[179][177]25[175]a[179][177]39[167]1260
  132. 1270 [139]a[178]39[167][153]"on                                     ":[153]"onon";:[142]
  133. 1280 [153]"contplace open"dn$" contin the drive and"
  134. 1290 [153]"press space contto return to loadstar":[151]198,.
  135. 1300 a[178][194](203):[139]a[179][177]60[167]1300
  136. 1310 [137]60000
  137. 2000 [153]"cont   is drive 9 your destination?  (ycont/ncont)"
  138. 2010 [161]a$:[139]a$[179][177]"y"[175]a$[179][177]"n"[167]2010
  139. 2020 [153]"                                         "
  140. 2030 [139]a$[178]"n"[167]dd%[178]8
  141. 2040 [142]
  142. 3000 [151]45,135:[151]46,27:[151]47,142:[151]48,27:[151]49,142:[151]50,27:[151]51,0
  143. 3010 [151]52,128:[151]53,0:[151]54,0:[151]55,0:[151]56,128:[156]:[137]60000
  144. 10000 [159]15,8,15,"s0:copier":[160]15:[148]"copier",8:[128]
  145. 60000 [159]15,8,15,"r0:hello connect=hello connect":[132]15,er:[160]15
  146. 60010 [139]er[179][177]63[167] [153]"load":[128]
  147. 60020 a$[178]"hello connect":q$[178][199](34)
  148. 60030 [153]"loadstopload"q$a$q$",8"
  149. 60040 [153]"run":[151]631,13:[151]632,13:[151]198,2:[162]
  150.