home *** CD-ROM | disk | FTP | other *** search
/ Light / Light_Vol.1_August_1992_Datasphere_Publications_Disk_1_of_2_Side_B.d64 / music (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  7KB  |  244 lines

  1. 10 rem*** music database ***
  2. 15 rem***  (c)  sav 1992  ***
  3. 20 poke53280,0:poke53281,0
  4. 25 a=a+1:ifa=1thenprintchr$(147)"loading code..":load"md-code",8,1
  5. 30 sys53008
  6. 32 poke788,52:poke792,193
  7. 35 clr:v=53248:j=56320:c=211:l=214:cl=58732
  8. 40 def fnb(b)=(1024+y*40+x):def fnx(x)=((peek(v)+(peek(v+16)and1)*256-24)/8)
  9. 45 def fny(y)=((peek(v+1)-50)/8)
  10. 50 me=50959:mo=49155:rem menu and mouse on
  11. 51 rv=50280:rem record view
  12. 52 re=52132:rem record entry
  13. 53 pf=51665:rem print screen
  14. 54 dimar$(200),tt$(200):gosub800
  15. 55 sp=14:gosub1000
  16. 65 sysmo:sysme
  17. 70 if(peek(j)and17)=17then70
  18. 75 x=int(fnx(x)):y=int(fny(y))
  19. 80 ifpeek(fnb(b))<49orpeek(fnb(b))>54then70
  20. 85 onpeek(fnb(b))-48goto90,92,94,96,500,600
  21. 90 a$="albums":goto100
  22. 92 a$="singles":goto100
  23. 94 a$="cassettes":goto100
  24. 96 a$="videos"
  25. 100 dd=1:gosub500:dd=0
  26. 101 gosub870:gosub9000
  27. 102 ifq=1then55
  28. 103 a=1:sysmo:gosub1000
  29. 104 gosub700:gosub850
  30. 106 onpeek(fnb(b))-48goto110,200,1050:gosub850
  31. 110 sys49421:pokel,10:pokec,9:syscl
  32. 111 print"[213][195][178][195][195][195][195][195][195][195][178][195][195][195][195][195][195][195][178][195][201]"
  33. 112 printtab(9)"[194][158] [146][194][155]  add  [194][155]  edit [194][158] [146][194]":printtab(9)"[202][195][177][195][195][195][195][195][195][195][177][195][195][195][195][195][195][195][177][195][203]"
  34. 113 if(peek(j)and17)=17then113
  35. 114 x=int(fnx(x)):y=int(fny(y))
  36. 115 ify=11andx=10then120
  37. 116 ify=11andx=28then400
  38. 117 goto113
  39. 120 iffx=199thena=a-28:goto104
  40. 125 dd=1:gosub500:dd=0:open2,8,2,a$+",s,a":pokev+21,3:sysmo:ed=0
  41. 130 sys52132:poke1274,160:poke1293,160:pokel,6:pokec,15:syscl:print"[155]"a$
  42. 131 pokel,13:pokec,0:syscl:printfx+1:pokel,13:pokec,0:syscl:print"[194][155]"
  43. 134 if(peek(j)and17)=17then134
  44. 135 x=int(fnx(x)):y=int(fny(y))
  45. 136 ifpeek(fnb(b))=49then140
  46. 138 ifpeek(fnb(b))=50thena=a-28:close2:goto104
  47. 139 goto134
  48. 140 ar$="":tt$="":at=1549:le=10:gosub900:poke204,1
  49. 142 fors=0tole:h=peek(at+s):ifh>26then146
  50. 144 h$=chr$(h+64):goto148
  51. 146 h$=chr$(h)
  52. 148 ar$=ar$+h$:next:ar$=left$(ar$,w)
  53. 150 at=1561:le=21:gosub900:poke204,1
  54. 152 fors=0tole:h=peek(at+s):ifh>26then156
  55. 154 h$=chr$(h+64):goto158
  56. 156 h$=chr$(h)
  57. 158 tt$=tt$+h$:next:tt$=left$(tt$,w)
  58. 159 ifedthen177
  59. 160 sys52132:pokel,6:pokec,15:syscl:print"[155]satisfied?"
  60. 162 pokel,13:pokec,0:syscl:printfx+1:pokel,13:pokec,0:syscl:print"[194][155]"
  61. 164 pokel,13:pokec,5:syscl:printar$:pokel,13:pokec,17:syscl:printtt$
  62. 166 if(peek(j)and17)=17then166
  63. 168 x=int(fnx(x)):y=int(fny(y))
  64. 170 ifx=10 and y=6then178
  65. 172 ifx=29 and y=6then175
  66. 174 goto166
  67. 175 ifed=1thened=0:goto130
  68. 176 goto130
  69. 177 ar$(es)=ar$:tt$(es)=tt$:a=a-28:goto104
  70. 178 pokev+21,0:sys49408:print#2,ar$:print#2,tt$
  71. 180 fx=fx+1:ar$(fx)=ar$:tt$(fx)=tt$:pokev+21,3:sysmo
  72. 182 if fx=199then190
  73. 184 goto130
  74. 190 close2:a=a-28:goto104
  75. 195 :
  76. 200 rem   * print file *
  77. 205 pp=0:sys51665:sys49408:open4,4,4:poke2,4:sys49764:close4:sysmo
  78. 210 ifpeek(2)thenpp=1:pokec,6:pokel,21:syscl:print"[158]warning! [155]printer not present"
  79. 220 if(peek(j)and17)=17then220
  80. 225 x=int(fnx(x)):y=int(fny(y))
  81. 230 ifx=12andy=14thena=a-14:goto104
  82. 235 ifx=12andy=8then250
  83. 240 goto220
  84. 250 ifppthena=a-14:goto104
  85. 255 pokec,6:pokel,21:syscl:print"[155] click mouse to print file. "
  86. 257 a=0:sys49408:gosub1000
  87. 260 if(peek(j)and17)=17then260
  88. 265 sys51665:open4,4,4:open9,4,9
  89. 270 print#9,chr$(27)+chr$(104)+chr$(2);
  90. 271 print#9,chr$(27)+chr$(120)+chr$(49);
  91. 272 print#9,chr$(27)+chr$(45)+chr$(49);
  92. 273 print#9,chr$(27)+chr$(107)+chr$(0);
  93. 275 print#9,chr$(27)+chr$(101)+chr$(48)+chr$(48);
  94. 280 print#9,chr$(27)+chr$(80);
  95. 285 print#9,chr$(27)+chr$(15);
  96. 286 print#9,chr$(27)+chr$(97)+chr$(49);
  97. 287 print#4,a$:print#9,chr$(27)+chr$(104)+chr$(0);
  98. 290 print#9,chr$(27)+chr$(97)+chr$(48);:print#9,chr$(27)+chr$(48);
  99. 295 print#9,chr$(27)+chr$(45)+chr$(48);
  100. 300 if(peek(j)and17)=17then310
  101. 305 print#9,chr$(27)+chr$(64);:print#4:close4:close9:goto103
  102. 310 a=a+1:a1=a+70:a2=a1+70
  103. 315 ifa>70then350
  104. 320 print#4,a;ar$(a)"---"tt$(a);:print#9,chr$(9);
  105. 325 print#4,a1;ar$(a1)"---"tt$(a1);:print#9,chr$(9);
  106. 330 ifa2>200thenprint#4," ":goto300
  107. 335 print#4,a2;ar$(a2)"---"tt$(a2):goto300
  108. 340 goto300
  109. 350 print#4:close4:close9:goto103
  110. 400 rem *** edit entry ***
  111. 402 sys52132:poke1274,160:poke1293,160:pokel,6:pokec,15:syscl
  112. 404 print"[155]edit mode ":at=1545:le=2:ed=1:es=0:h$=""
  113. 406 gosub900
  114. 407 fors=0tole:h=peek(at+s)
  115. 408 ifh=32then400
  116. 409 ifh<48orh>57then400
  117. 410 hh$=chr$(h):h$=h$+hh$:next:es=val(h$)
  118. 411 ifes>fxthen400
  119. 412 sys52132:poke1274,160:poke1293,160:pokel,6:pokec,15:syscl
  120. 414 print"[155]edit mode "
  121. 416 pokel,13:pokec,0:syscl:print es
  122. 417 pokel,13:pokec,0:syscl:print"[194]"
  123. 418 pokel,13:pokec,5:syscl:printar$(es):pokel,13:pokec,17:syscl:printtt$(es)
  124. 420 ed=1:goto140
  125. 500 rem directory
  126. 502 pokev+21,0:sys49408
  127. 505 open8,8,8:poke2,8:sys49764:close8
  128. 510 ifpeek(2)then550
  129. 512 ifddthenreturn
  130. 515 printchr$(147):sys49664:print"click mouse!!!!"
  131. 520 if(peek(j)and17)=17then555
  132. 525 goto55
  133. 550 sys49421:sysmo:pokel,10:pokec,9:syscl
  134. 552 print"[213][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][201]":printtab(9)"[194] drive not present [194]
  135. 553 [153][163]9)"peek   -click mouse-   peek":[153][163]9)"mid$lenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlen(NULL)"
  136. 555 [139]([194](j)[175]17)[178]17[167]555
  137. 560 [137]55
  138. 600 [143] quit programme
  139. 611 [158]49421:[151]l,10:[151]c,9:[158]cl
  140. 612 [153]"(NULL)len=lenlenlenlenlenlenlenlenlenlenlenlenlenlenlen=lenright$"
  141. 613 [153][163]9)"peekypeeklistquit programme?peeknpeek":[153][163]9)"mid$len>lenlenlenlenlenlenlenlenlenlenlenlenlenlenlen>len(NULL)"
  142. 620 [139]([194](j)[175]17)[178]17[167]620
  143. 625 x[178][181]([165]x(x)):y[178][181]([165]y(y))
  144. 626 [139][194]([165]b(b))[179][177]25[167]55
  145. 630 [153][199](147):[151]v[170]21,0:[158]49408:[128]
  146. 700 [143]** display file **
  147. 701 [158]50280:[151]l,2:[151]c,14:[158]cl:[153]a$:[153]"list"
  148. 702 [139]a[177]186[167]a[178]186
  149. 703 [139]a[179]1[167]a[178]1
  150. 704 [129]s[178]1[164]14
  151. 705 [151]l,6[170]s:[151]c,0:[158]cl:[153];a
  152. 706 [151]l,6[170]s:[151]c,0:[158]cl:[153]"peeklist"
  153. 708 [151]l,6[170]s:[151]c,5:[158]cl:[153]ar$(a)
  154. 710 [151]l,6[170]s:[151]c,17:[158]cl:[153]tt$(a)
  155. 712 a[178]a[170]1:[139]a[177]200[167] [153]"":[142]
  156. 716 [130]:[153]"":[142]
  157. 800 [129]s[178]1[164]200:ar$(s)[178]"*":tt$(s)[178]"*":[130]:[142]
  158. 850 [139]([194](j)[175]17)[178]17[167]850
  159. 852 x[178][181]([165]x(x)):y[178][181]([165]y(y))
  160. 854 [139][194]([165]b(b))[178]43[167][141]700:[137]850
  161. 856 [139][194]([165]b(b))[178]45[167]a[178]a[171]28:[141]700:[137]850
  162. 858 [139][194]([165]b(b))[179]49[176][194]([165]b(b))[177]51[167]850
  163. 860 [142]
  164. 870 [158]49421:[151]l,10:[151]c,9:[158]cl
  165. 872 [153]"(NULL)lenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenright$"
  166. 874 [153][163]9)"peek  list  please wait    peek":[153][163]9)"mid$lenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlen(NULL)"
  167. 876 [142]
  168. 900 [143] ** data input **
  169. 909 [151]c,0:[151]l,18:[158]cl
  170. 910 [153]"(NULL)lenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlen=lenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenright$";
  171. 911 [153]"peeklista b c d e f g h ipeeklist0 1 2 3 4 5 6 7 8 9 peek";
  172. 912 [153]"peek listj k l m n o p q -lenlenlenlenlenlenlenlenlen=lenlenlenlenlenlenlenlenlenlen<";
  173. 913 [153]"peeklistr s t u v w x y zpeekcontdelete open wait peek contreturn open wait peek";
  174. 914 [153]"peek  list( ) / - , .    peekcontletter   peek open waitcont quit   peek";
  175. 915 [153]"mid$lenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlen>lenlenlenlenlenlenlenlenlen>lenlenlenlenlenlenlenlenlenlen(NULL)"
  176. 916 [139]at[178]1549[167]u[178]5:[151]c,u:[151]l,13:[158]cl:[151]204,0
  177. 917 [139]at[178]1561[167]u[178]17:[151]c,u:[151]l,13:[158]cl:[151]204,0
  178. 918 [139]at[178]1545[167]u[178]1:[151]c,u:[151]l,13:[158]cl:[151]204,0
  179. 919 w[178]0
  180. 920 [139]([194](j)[175]17)[178]17[167]920
  181. 922 x[178][181]([165]x(x)):y[178][181]([165]y(y))
  182. 924 [139]y[179]18 [176] y[177]23[167]920
  183. 926 [139]x[178]30[175]y[178]22[167][151]204,1:[137]960
  184. 928 [139]x[178]37[175]y[178]21[167][151]204,1:[137]950
  185. 930 [139]x[178]26[175]y[178]21[167]940
  186. 932 [139][194]([165]b(b))[177]57[167]920
  187. 934 [151]204,1:[151]at[170]w,[194]([165]b(b))
  188. 936 w[178]w[170]1:[139]w[177]le [167][142]
  189. 937 [151]l,13:[151]c,u[170]w:[158]cl:[151]204,0
  190. 938 [137]920
  191. 940 [139]w[178]0[167]920
  192. 942 w[178]w[171]1:[151]at[170]w,32:[151]at[170](w[170]1),32
  193. 944 [151]l,13:[151]c,u[170]w:[158]cl:[151]204,0:[137]920
  194. 950 [139]w[178]le [167][142]
  195. 952 [139]ed [167][142]
  196. 955 [151]at[170]w,32:[142]
  197. 960 [139]ed[167]a[178]a[171]28:[137]104
  198. 965 [137]130
  199. 1000 [143] sprite placement
  200. 1005 [151]v[170]21,3:[151]v[170]1,57:[151]v,32:[151]v[170]39,1:[151]v[170]16,2:[151]v[170]2,60:[151]v[170]3,60
  201. 1010 [151]v[170]40,7:[151]2040,13:[151]2041,sp
  202. 1015 [142]
  203. 1050 [158]49421:[151]l,10:[151]c,9:[158]cl
  204. 1052 [153]"(NULL)len=lenlenlenlenlenlenlenlenlenlenlenlenlenlenlen=lenright$"
  205. 1054 [153][163]9)"peekypeeklistsave edit file?peeknpeek":[153][163]9)"mid$len>lenlenlenlenlenlenlenlenlenlenlenlenlenlenlen>len(NULL)"
  206. 1056 [139]([194](j)[175]17)[178]17[167]1056
  207. 1058 x[178][181]([165]x(x)):y[178][181]([165]y(y))
  208. 1060 [139]y[178]11[175]x[178]10[167]1068
  209. 1062 [139]y[178]11[175]x[178]28[167]1066
  210. 1064 [137]1056
  211. 1066 [141]870:[141]800:[137]35
  212. 1068 [143]*** save edited file ***
  213. 1070 [141]870:[158]49408:dd[178]1:[141]500:dd[178]0:[159]1,8,15,"r:temp="[170]a$:[160]1
  214. 1072 [159]2,8,2,a$[170]",s,w":[152]2,a$:[152]2,a$
  215. 1074 [129]s[178]1[164]fx:[152]2,ar$(s):[152]2,tt$(s):[130]
  216. 1076 [159]1,8,15,"s:temp":[160]1
  217. 1078 [141]800:[137]35
  218. 8000 [143]** file check/create **
  219. 9000 [143] ** input file data **
  220. 9005 [159]15,8,15:q[178]0
  221. 9010 fx[178]0:[159]2,8,2,a$[170]",s,r"
  222. 9015 [132]15,e,e$:[139]e[177]20[167]9080
  223. 9016 [160]15:[160]2
  224. 9017 [159]2,8,2,a$[170]",s,r"
  225. 9020 :
  226. 9030 [132]2,x$:ar$(fx)[178]x$
  227. 9035 [132]2,xx$:tt$(fx)[178]xx$
  228. 9040 [139] st [175] 64 [167][160] 2:[142]
  229. 9045 fx[178]fx[170]1
  230. 9070 [137]9020
  231. 9080 [160]15:[160]2
  232. 9082 [158]49421:[151]l,10:[151]c,9:[158]cl
  233. 9084 [153]"(NULL)len=lenlenlenlenlenlenlenlenlenlenlenlenlenlenlen=lenright$"
  234. 9085 [153][163]9)"peek peeksysno file presentpeek peek"
  235. 9086 [153][163]9)"-len(NULL)lenlenlenlenlenlenlenlenlenlenlenlenlenlenlen(NULL)len<"
  236. 9087 [153][163]9)"peekypeeklistcreate new filepeeknpeek":[153][163]9)"mid$len>lenlenlenlenlenlenlenlenlenlenlenlenlenlenlen>len(NULL)"
  237. 9088 [151]v[170]21,3:[158]mo
  238. 9089 [139]([194](j)[175]17)[178]17[167]9088
  239. 9090 x[178][181]([165]x(x)):y[178][181]([165]y(y))
  240. 9091 [139]y[178]13 [175] x[178]10[167]10000
  241. 9092 [139]y[178]13 [175] x[178]28[167]q[178]1:[142]
  242. 9094 [137]9089
  243. 10000 [159]2,8,2,a$[170]",s,w":[152]2,a$:[152]2,a$:[160]2:[142]
  244.