home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 18 / 018.d81 / dop (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  16KB  |  513 lines

  1. 1 rem**************************************************************************
  2. 2 rem*                disk operations programs - dop                          *
  3. 3 rem*                written by charles o. gauthier                          *
  4. 5 rem*                for all frustrated disk lovers                          *
  5. 6 rem**************************************************************************
  6. 10 rem*********************************
  7. 20 rem*     declare variables         *
  8. 30 rem*********************************
  9. 40 dim a$(150)
  10. 50 qo$=chr$(34):k$="                "
  11. 60 k1$="r[146]un u[146]p d[146]own q[146]uit"
  12. 70 k2$="p[146]urge u[146]p d[146]own q[146]"
  13. 80 rx=781:ry=782:rp=783:cp=65520:xs=23:ys=0:c$=chr$(13):sd=828
  14. 90 s$(1)="  purge/delete  [146]":s$(2)="  c o p y    [146]"
  15. 100 s$(3)=" rename disk      [146]":s$(4)="   directory   [146]"
  16. 110 s$(5)="  c h a n g e  [146]":s$(6)="[144]  f o r m a t  [146]"
  17. 120 s$(7)="  print directory  [146]":s$(8)="[144]   load / run  [146]"
  18. 130 m1$="                                      "
  19. 140 m$="[144]---------------------------------------"
  20. 190 goto19000
  21. 191 rem************************************************************************
  22. 192 rem*                                                                      *
  23. 193 rem*                           subroutines section                        *
  24. 194 rem*                                                                      *
  25. 195 rem************************************************************************
  26. 196 rem
  27. 197 rem********************************
  28. 198 rem*      check for yes/no        *
  29. 199 rem********************************
  30. 200 print"[147]"spc(240)spc(80)tab(10)"are you sure":printspc(50)"you want to"
  31. 210 printtab(8)s$(s):print
  32. 220 printtab(10)"  y [146]  for yes
  33. 230 [153][163]10)"  n wait  for no"
  34. 240 [161]g$:[139]g$[179][177]"y"[175]g$[179][177]"n"[167]240
  35. 250 [139]g$[178]"n"[167]ns[178]1
  36. 255 [142]
  37. 257 [143]********************************
  38. 258 [143]*    ask purge or delete       *
  39. 259 [143]********************************
  40. 260 [153]"load"[166]240)[166]80)[163]10)"select which":[153][166]50)"you want to do"
  41. 265 [153][163]6)"  f1 wait  for directory purge
  42. 270 printtab(6)"  f3 [146]  for 1 program delete
  43. 275 [161]g$:[139]g$[179][177]"input"[175]g$[179][177]"dim"[167]275
  44. 280 [142]
  45. 297 [143]********************************
  46. 298 [143]*      directory check         *
  47. 299 [143]********************************
  48. 300 dc[178]0:[153]"load"[166]240)[166]80)"   do you want a directory first"
  49. 310 [153][163]10)"  y wait  for yes
  50. 320 printtab(10)"  n [146]  for no"
  51. 330 getb$:ifb$<>"y"andb$<>"n"then330
  52. 340 ifb$="y"thendc=1
  53. 350 return
  54. 357 rem********************************
  55. 358 rem*      print blank line        *
  56. 359 rem********************************
  57. 360 px=0:py=23:gosub470:printm1$:return
  58. 397 rem********************************
  59. 398 rem*        page turner           *
  60. 399 rem********************************
  61. 400 pokerx,xs:pokery,ys:pokerp,0
  62. 410 sys cp:ifr=1thenr=0:return
  63. 420 print"press [144] spacebar [146] to continiue[144] [144] q [146] quit"
  64. 430 getb$:ifb$="q"thengosub600:ifgg=0then400
  65. 440 ifgg=1then670
  66. 450 ifb$<>chr$(32)then430
  67. 460 return
  68. 467 rem********************************
  69. 468 rem*      position cursor         *
  70. 469 rem********************************
  71. 470 pokerx,py:pokery,px:pokerp,0
  72. 480 sys cp
  73. 490 return
  74. 497 rem********************************
  75. 498 rem*       validate disk          *
  76. 499 rem********************************
  77. 500 print"[147]"spc(240)tab(12)"please select":printtab(12)" your choice "
  78. 510 printtab(6)"  f1 [146]  to validate disk
  79. 512 [153][163]13)"(this may take a while!)"
  80. 520 [153][163]6)"  f3 wait  to return to menu
  81. 525 print"a validate merely re-organizes the"
  82. 527 print"disk's bam (block availability map)."
  83. 530 getg$:ifg$<>"[133]"andg$<>"[134]"then530
  84. 540 ifg$="[134]"thenreturn
  85. 550 print"          now validating [146]"
  86. 560 close15:open15,8,15:print#15,"v":close15
  87. 570 return
  88. 597 rem********************************
  89. 598 rem*         quit y/n             *
  90. 599 rem********************************
  91. 600 print"[147] please be sure you want to quit"
  92. 610 gg=0
  93. 620 print"        f1 [146]  to quit"
  94. 630 print"        f3 [146]  to go back
  95. 640 [161]a$:[139]a$[179][177]"input"[175]a$[179][177]"dim"[167]640
  96. 650 [139]a$[178]"input"[167]gg[178]1
  97. 660 [142]
  98. 670 [153][199](142):[153]"load bye for now!!!!":[147]"payload connect",8:[128]
  99. 696 [143]*******************************
  100. 697 [143]*  directory ( f4 main menu)  *
  101. 699 [143]*******************************
  102. 700 [160]1:[160]15:[159]15,8,15:[159]1,8,0,"$":nf[178]0:[141]2690
  103. 702 [139]a$[179][177]"00"[167][160]15:[160]1:[142]
  104. 720 [161]#1,f$,s$
  105. 730 [161]#1,f$,s$
  106. 740 [161]#1,f$,s$
  107. 750 co[178]co[170]1
  108. 760 f[178]0:[139]f$[179][177]""[167]f[178][198](f$)
  109. 770 [139]s$[179][177]""[167]f[178]f[170][198](s$)[172]256
  110. 780 [153][202]([196](f),2);[163]3);[199](34);
  111. 790 [161]#1,s$:[139]st[179][177]0[167]890
  112. 800 [139]s$[179][177][199](34)[167]790
  113. 810 [161]#1,s$:[139]s$[179][177][199](34)[167][153]s$;:[137]810
  114. 820 [153][199](34);:nf[178]nf[170]1
  115. 830 [161]#1,s$:[139]s$[178][199](32)[167]830
  116. 840 [153][163]19);:t$[178]""
  117. 850 t$[178]t$[170]s$:[161]#1,s$:[139]s$[179][177]""[167]850
  118. 860 [153][200](t$,3)
  119. 870 [139]co[178]23[167]co[178]0:[137]920
  120. 880 [139]st[178]0[167]730
  121. 890 [153]"blocks free"
  122. 900 [160] 1
  123. 910 co[178]0:[142]
  124. 920 [153]" press stop y wait for more - stop n wait to stop";
  125. 930 [161]g$:[139]g$[179][177]"y"[175]g$[179][177]"n"[167]930
  126. 940 [139]g$[178]"n"[167][160]1:co[178]0:px[178]0:py[178]23:[141]470:[153]m1$:[142]
  127. 950 [153]"load":[137]880
  128. 997 [143]********************************
  129. 998 [143]*  purge/delete disk f1        *
  130. 999 [143]********************************
  131. 1000 s[178]1:[141]200:s[178]0:[139]ns[178]1[167]ns[178]0:[142]
  132. 1005 [141]260:[139]g$[178]"dim"[167]1700
  133. 1010 d$[178]"0":d[178][197](d$):sp[178]1108:ls[178]17
  134. 1020 [153]"load"[166]240)[166]240)"  purge current disk  y wait or  n wait"
  135. 1030 [161]g$:[139]g$[179][177]"y"[175]g$[179][177]"n"[167]1030
  136. 1040 [139]g$[178]"n"[167][142]
  137. 1050 [153]"load":[141]700:px[178]24:py[178]2:po[178]sp
  138. 1060 [141]470
  139. 1070 [153]k$:[129]t[178]1[164]50:[130]:[141]470:[153]k2$:[129]t[178]1[164]100:[130]
  140. 1080 [161]g$:[139]g$[179][177]"p"[175]g$[179][177]"u"[175]g$[179][177]"d"[175]g$[179][177]"q"[167]1060
  141. 1090 [139]g$[178]"q"[167]500
  142. 1100 [139]g$[178]"u"[167][141]470:[153]k$
  143. 1102 [139]g$[178]"u"[167][139]py[177]2[167]py[178]py[171]1:po[178]po[171]40:[139]py[179]0[167]py[178]0:po[178]sp[171]80
  144. 1110 [139]g$[178]"p"[167][141]1200:[139]d1$[178]"n"[167]1060
  145. 1120 [139]g$[178]"d"[167][141]470:[153]k$
  146. 1122 [139]g$[178]"d"[167][139]py[179]nf[167]py[178]py[170]1:po[178]po[170]40:[139]py[178][177]23[167]py[178]0:[137]1160
  147. 1130 [139]g$[178]"u"[176]g$[178]"d"[167]1060
  148. 1140 [141]470:[153]k$:py[178]py[170]1:po[178]po[170]40:[139]py[178][177]23[167]py[178]0:po[178]sp:[137]1160
  149. 1150 [137]1060
  150. 1160 [141]360:[153]" continue purge disk  y wait or  n wait   "
  151. 1170 [161]g$:[139]g$[179][177]"y"[175]g$[179][177]"n"[167]1170
  152. 1180 [139]g$[178]"n"[167]500
  153. 1190 [137]1050
  154. 1200 a$[178]"":b$[178]"":pp[178]po:[129]s[178]1[164]ls
  155. 1210 a[178][194](pp):[139]a[179]32[167]p[178]a[170]64:[137]1230
  156. 1220 p[178]a
  157. 1230 a$[178][199](p):pp[178]pp[170]1:[139]a$[178][199](34)[167]s[178]ls:[137]1250
  158. 1240 b$[178]b$[170]a$:[130]
  159. 1250 r[178]1:[141]400:[153]" purge? wait "b$"  y wait or  n wait"
  160. 1260 [161]d1$:[139]d1$[179][177]"y"[175]d1$[179][177]"n"[167]1260
  161. 1270 r[178]1:[141]400:[153]m1$
  162. 1280 [139]d1$[178]"n"[167][142]
  163. 1290 [159] 1,8,15
  164. 1300 [152]1,"s:"[170]b$:b$[178]""
  165. 1310 [160] 1:[142]
  166. 1700 [141]300:[139]dc[178]1[167][153]"load":[141]700
  167. 1710 [141]360:px[178]0:py[178]23:[141]470
  168. 1720 [133]" delete which program wait";pn$:[139]pn$[178]""[167][142]
  169. 1730 s$(0)[178]" delete wait "[170]pn$
  170. 1740 [141]200:[139]ns[178]1[167]ns[178]0:[142]
  171. 1750 s$(0)[178]""
  172. 1760 [159]1,8,15:[152]1,"s:"[170]pn$:[160]1:
  173. 1770 [141]500:[142]
  174. 1997 [143]*******************************
  175. 1998 [143]*     rename / disk id  f3    *
  176. 1999 [143]*******************************
  177. 2000 s[178]3:[141]200:s[178]0:[139]ns[178]1[167]ns[178]0:[142]
  178. 2003 dv[178]0:sp$[178]"                "
  179. 2004 m$[178]"stop----------------