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