home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 48 / 048side1.d81 / utilizer (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  6KB  |  258 lines

  1. 10 poke53280,.:poke53281,.:print"[147]":sys65511:poke650,128
  2. 20 open2,8,15:print"[147]":goto430
  3. 30 rem
  4. 40 rem ----- directory -----
  5. 50 rem
  6. 60 print"[147]":open1,8,0,"$0"
  7. 70 print"[208]ress [158][211][208][193][195][197] [194][193][210][146] to abort listing."
  8. 80 print""
  9. 90 pp=1
  10. 100 get#1,a$,b$
  11. 110 get#1,a$,b$
  12. 120 get#1,a$,b$
  13. 130 c=0
  14. 140 ifa$<>""then c=asc(a$)
  15. 150 ifb$<>""then c=c+asc(b$)*256
  16. 160 ifc<10thenprint"0";
  17. 170 printmid$(str$(c),2);tab(3);
  18. 180 get#1,b$:ifst<>0then280
  19. 190 ifb$<>chr$(34)then180
  20. 200 get#1,b$:ifb$<>chr$(34)thenprintb$;:goto200
  21. 210 get#1,b$:ifb$=chr$(32)then210
  22. 220 printtab(18):c$=""
  23. 230 c$=c$+b$:get#1,b$:ifb$<>""then230
  24. 240 print:print"[145]"left$(c$,3)
  25. 250 ifpp=1thenprint:pp=0
  26. 260 gett$:ift$<>""thengoto290
  27. 270 ifst=0then110
  28. 280 print" blocks free"
  29. 290 close1:print"[208]ress [158][210][197][212][213][210][206][146]":pp=0
  30. 300 getr$:ifr$<>chr$(13)then300
  31. 310 goto650
  32. 320 rem
  33. 330 rem ----- drive status -----
  34. 340 rem
  35. 350 print""
  36. 360 get#2,a$:printtab(5);a$;:ifa$<>chr$(13)goto360
  37. 370 print"[146]"
  38. 380 fordl=1to500:next
  39. 390 goto650
  40. 400 rem
  41. 410 rem ----- title screen -----
  42. 420 rem
  43. 430 poke53280,.:poke53281,.
  44. 440 m$="[158]           [204][207][193][196][211][212][193][210] [208]resents:       ":pl$="":gosub560
  45. 450 m$="             [202]ason [205]assey           ":pl$="":gosub560
  46. 460 m$="[154]            [195]harles [194]arney          ":pl$=pl$+"":gosub560
  47. 470 forx=1to500:next
  48. 480 m$="[151]              [213][212][201][204][201][218][197][210]!             ":pl$=pl$+"":gosub560
  49. 490 m$="[151]        ([195]) 1988 by [193]uthors         ":pl$=pl$+"":gosub560
  50. 500 m$="        [208]ress any key to continue   ":pl$=pl$+"":gosub560
  51. 510 geta$:ifa$=""then510
  52. 520 print"[147]":goto650
  53. 530 rem
  54. 540 rem ----- screen effect -----
  55. 550 rem
  56. 560 l=len(m$):mi=38-l/2:fori=1tolen(m$)-19
  57. 570 printpl$spc(mi)left$(m$,i)right$(m$,l-(l-i)):mi=mi-1:next:return
  58. 580 ld$="[158][204][207][193][196][211][212][193][210] [208]resents:"
  59. 590 forx=1to200:next
  60. 600 forx=1tolen(ld$):print""left$(ld$,x):fory=1to100:nexty:nextx:goto450
  61. 610 goto650
  62. 620 rem
  63. 630 rem ----- menu screen -----
  64. 640 rem
  65. 650 close15:close1:print"[147]"chr$(14)
  66. 660 print"[145][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][192]"
  67. 670 print" [159]         [178]   [178]                       [146]"
  68. 680 print"          [221]   [221] [212] [201] [204] [201] [218] [197] [210]         [146]"
  69. 685 print"          [173][192][192][192][189]                       [146]"
  70. 690 print"[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][192]"
  71. 700 printtab(10);"[1] [158][196]irectory"
  72. 710 printtab(10);"[2] [158][198]ormat a disk"
  73. 720 printtab(10);"[3] [158][195]lear a disk"
  74. 730 printtab(10);"[4] [158][201]nitialize drive"
  75. 740 printtab(10);"[5] [158][214]alidate a disk"
  76. 750 printtab(10);"[6] [158][211]cratch a file"
  77. 760 printtab(10);"[7] [158][210]ename a file"
  78. 770 printtab(10);"[8] [158][195]hange disk name"
  79. 780 printtab(10);"[9] [158][196]isk status"
  80. 790 printtab(10);"[[193]] [158][195]hange border color"
  81. 800 printtab(10);"[[194]] [158][195]hange screen color"
  82. 810 printtab(10);"[[195]] [158][207]riginal border color"
  83. 820 printtab(10);"[[196]] [158][207]riginal screen color"
  84. 830 printtab(10);"[[197]] [158][196]isplay title screen"
  85. 840 printtab(10);"[[209]] [158][209]uit program"
  86. 850 getc$:ifc$=""then850
  87. 860 ifc$="1"then60
  88. 870 ifc$="2"then1050
  89. 880 ifc$="3"then1620
  90. 890 ifc$="4"then1200
  91. 900 ifc$="5"then1260
  92. 910 ifc$="6"then1480
  93. 920 ifc$="7"then1350
  94. 930 ifc$="8"then1770
  95. 940 ifc$="9"then350
  96. 950 ifc$="a"thenq=q+1:poke53280,q:ifq=255thenq=0
  97. 960 ifc$="q"then2290
  98. 970 ifc$="b"theny=y+1:poke53281,y:ify=255theny=0
  99. 980 ifc$="c"thenpoke53280,.
  100. 990 ifc$="d"thenpoke53281,.
  101. 1000 ifc$="e"thenprint"[147]":goto430
  102. 1010 goto850
  103. 1020 rem
  104. 1030 rem ----- format a disk -----
  105. 1040 rem
  106. 1050 print"[147]"
  107. 1060 printtab(5);"[208]lease [201]nsert [196]isk [212]o [198]ormat"
  108. 1070 printtab(5);"[163][163][163][163][163][163] [163][163][163][163][163][163] [163][163][163][163][160][163][163] [163][163][163][163][163][163]"
  109. 1080 print"[206]ame of disk: ";:gosub2470:n$=a$
  110. 1090 ifn$=""then650
  111. 1100 print"[197]nter id of disk: ";:gosub2470:v$=a$
  112. 1110 print"[193]re you sure: ";:gosub2470:ifa$="n"then650
  113. 1120 print"[196]isk being formatted...."
  114. 1130 print"[196]isk name: ";n$:print"[196]isk id: ";v$
  115. 1140 print"[198]ormat time: 1 minute and 20 seconds..."
  116. 1150 open15,8,15:print#15,"n0:";n$;",";v$;",8,1":close15
  117. 1160 gosub2420:n$="":goto650
  118. 1170 rem
  119. 1180 rem ----- initialize drive -----
  120. 1190 rem
  121. 1200 print"[147]"
  122. 1210 printtab(10):print"[201]nitializing [196]rive!"
  123. 1220 open15,8,15,"i":close15:gosub2430:goto650
  124. 1230 rem
  125. 1240 rem ----- validate a disk -----
  126. 1250 rem
  127. 1260 print"[147]":printtab(4);"[208]lease [201]nsert [196]isk [212]o [214]alidate"
  128. 1270 printtab(4);"[163][163][163][163][163][163][160][163][163][163][163][163][163] [163][163][163][163] [163][163] [163][163][163][163][163][163][163][163]"
  129. 1280 printtab(5);"  [208]ress [158][210][197][212][213][210][206][146] when ready"
  130. 1290 getr$:ifr$<>chr$(13)then1290
  131. 1300 print"          [214]alidating disk."
  132. 1310 open15,8,15,"v":close15:gosub2430:goto650
  133. 1320 rem
  134. 1330 rem ----- rename a file -----
  135. 1340 rem
  136. 1350 print"[147]"
  137. 1360 printtab(11);"[210]ename [198]ile"
  138. 1370 printtab(11);"<<<<<->>>>>"
  139. 1380 printtab(3);"[207]ld name: ";:gosub2470:s$=a$
  140. 1390 ifs$=""then650
  141. 1400 printtab(3);"[206]ew name: ";:gosub2470:d$=a$
  142. 1410 printtab(3);"[193]re you sure:";:gosub2470:ifa$="n"then650
  143. 1420 printtab(3);"[210]enaming:";s$;" to ";d$
  144. 1430 open15,8,15:print#15,"r0:";d$;"=";s$:close15
  145. 1440 goto650
  146. 1450 rem
  147. 1460 rem ----- scratch a file -----
  148. 1470 rem
  149. 1480 print"[147]"
  150. 1490 printtab(11);"[211]cratch [198]ile"
  151. 1500 printtab(11);"[171][179][171][179][171][179][171][179][171][179][171][179]":print
  152. 1510 printtab(3);"[198]ile to scratch: ";:gosub2470:w$=a$
  153. 1520 ifw$=""then650
  154. 1530 printtab(3);"[193]re you sure? (y/n)"
  155. 1540 getq$:ifq$<>"y"andq$<>"n"then1540
  156. 1550 ifq$="n"then650
  157. 1560 print:printtab(3);"[211]cratching: ";w$
  158. 1570 open15,8,15:print#15,"s:";w$;",8,1":close15,8,15
  159. 1580 w$="":goto650
  160. 1590 rem
  161. 1600 rem ----- clear a disk -----
  162. 1610 rem
  163. 1620 print"[147]"
  164. 1630 printtab(15);"[195]lear [196]isk"
  165. 1640 printtab(15);"*--------*"
  166. 1650 printtab(5);"[208]lease [201]nsert [196]isk [212]o [194]e [195]leared!"
  167. 1660 print"[196]isk name: ";:gosub2470
  168. 1670 n$=a$:ifn$=""then650
  169. 1680 print"[193]re you sure? (y/n)"
  170. 1690 getq$:ifq$<>"y"andq$<>"n"then1690
  171. 1700 ifq$="n"then650
  172. 1710 print"[195]learing disk...."
  173. 1720 open15,8,15:print#15,"n0:";n$:close15
  174. 1730 n$="":goto650
  175. 1740 rem
  176. 1750 rem ----- change disk name -----
  177. 1760 rem
  178. 1770 k=0
  179. 1780 print"[147]":printtab(10);"[195]hange [196]isk [206]ame"
  180. 1790 printtab(10);"[163][183][163][183][163][183][163][183][163][183][163][183][163][183][163][183]"
  181. 1800 printtab(6);"[201]nsert [196]isk [212]o [194]e [195]hanged"
  182. 1810 printtab(7);"press [158][210][197][212][213][210][206][146] when ready"
  183. 1820 get a$:ifa$<>chr$(13) then 1820
  184. 1830 printtab(9);"[145][157][157]      [200]old [207]n......          "
  185. 1840 open15,8,15,"i0"
  186. 1850 gosub2190
  187. 1860 open1,8,5,"#"
  188. 1870 print#15,"u1:5 0 18 0"
  189. 1880 print#15,"b-p:5 144"
  190. 1890 dn$=""
  191. 1900 fork=1to16
  192. 1910 get#1,a$:ifa$=""thena$=chr$(0)
  193. 1920 dl$=dl$+a$
  194. 1930 next
  195. 1940 print"[147]"tab(5);"[207]ld [206]ame:"dl$
  196. 1950 printtab(5);"[206]ew [206]ame:";:gosub2470:nn$=a$
  197. 1960 iflen(nn$)><17goto2030
  198. 1970 ifright$(nn$,1)=chr$(160)thennn$=left$(nn$,len(nn$)-1)
  199. 1980 printtab(10);"** name too long **"
  200. 1990 fordl=1to1000:next
  201. 2000 printtab(12);"press [158]return[146]"
  202. 2010 geta$:ifa$<>chr$(13)then2010
  203. 2020 goto650
  204. 2030 print"[195]hange on disk? (y/n):"
  205. 2040 getq$:ifq$<>"y"andq$<>"n"then2040
  206. 2050 ifq$="n"thenclose1:close15:dl$="":goto650
  207. 2060 iflen(nn$)<16thennn$=nn$+chr$(160):goto2060
  208. 2070 print#15,"b-p:5 144"
  209. 2080 print#1,nn$;
  210. 2090 print#15,"u2:5 0 18 0"
  211. 2100 gosub2190
  212. 2110 print#15,"i0"
  213. 2120