home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disc 51
/
Commodore_Disc_51_19xx_-_de.d64
/
main
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
10KB
|
312 lines
10 rem rezeptmanager.main======64
20 rem (p) commodore disc ==
30 rem ==========================
40 rem (c) by ==
50 rem jens wellhausen ==
60 rem martin radetzki ==
70 rem version 2.0 40z./ascii==
80 rem c-64 floppy ==
90 rem ==========================
95 gosub 60000
100 ifx=1thenx=2
110 ifx=2then320
120 poke53280,14:poke53281,14:printcl$sl$dc$bl$:poke56295,6
130 mn$(1)=" [204][193][196][197][206] ":mn$(2)=" [211][208][197][201][195][200][197][210][206] ":mn$(3)=" [211][195][200][210][197][201][194][197][206] ":mn$(4)=" [196][210][213][195][203] "
140 mn$(5)=" [196][201][197][206][211][212] "
150 mm$(1)=z0$+"[204][193][196][197][206]"+rn$+z0$+rf$:mm$(2)=z0$+"[211][208][197][201][195][200][197][210][206]"+rn$+z0$+rf$
155 mm$(3)=z0$+"[211][195][200][210][197][201][194][197][206]"+rn$+z0$+rf$
160 mm$(4)=z0$+"[196][210][213][195][203]"+rn$+z0$+rf$:mm$(5)=z0$+"[196][201][197][206][211][212]"+rn$+z0$+rf$
170 mn(1)=0:mn(2)=6:mn(3)=16:mn(4)=26:mn(5)=32
180 data133,95,134,96,76,191,163
190 fori=828to834:reada:pokei,a:next
200 dimre$(18)
210 ud$(1)="[196]isketteninhalt":ud$(2)="[210]ezept loeschen":ud$(3)="[210]ez. umbenennen"
220 ud$(4)=" [197][206][196][197] "
230 dimdi$(150)
240 printhe$"[210][197][218][197][208][212][205][193][206][193][199][197][210] [214]1.0 (c)'87 by [202].[215] & [205].[210]";
250 printrn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$;
255 printzn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$;
260 print" [204][193][196][197][206]"s2$"[211][208][197][201][195][200][197][210][206]"s2$"[211][195][200][210][197][201][194][197][206]"s2$"[196][210][213][195][203]"s2$"[196][201][197][206][211][212] ";
270 printz1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$;
275 printz1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$rf$;
280 printzf$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$;
285 printzv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zd$;
290 fori=1to19:printyo$" "yo$;:next
300 printzc$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$;
305 printzv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$;:poke2023,125
310 gosub2500:x=1:goto100
320 poke198,0:al=1:mp=1:poke214,2:poke211,mn(mp):sys58640:printmm$(mp)
330 geti$
340 ifi$=c3$thenmp=mp+1:goto380
350 ifi$=c1$thenmp=mp-1:goto380
360 ifi$=chr$(13)then430
370 goto330
380 ifmp=0thenmp=1:goto330
390 ifmp=6thenmp=5:goto330
400 poke214,2:poke211,mn(al):sys58640:printrn$;mn$(al);rf$;
410 poke214,2:poke211,mn(mp):sys58640:printmm$(mp);
420 al=mp:goto330
430 poke214,2:poke211,mn(al):sys58640:printrn$;mn$(al)
440 onmpgoto450,1010,1220,1450,1570
450 gosub2500
460 lo=1190:be=50000:s=17:z=14:gosub2540
470 poke214,7:poke211,7:sys58640:print"[206]ame d. [210]ezepts"
480 ab=0:i$="":s=7:z=8:l=15:gosub2590:ifab=1thenab=0:gosub2520:goto320
490 ifi$=" "then630
500 open15,8,15:open2,8,2,i$+",s,r"
510 e=0:input#15,e,e$
520 poke211,7:poke214,10:sys58640:printe$
530 ife<>0thenpoke198,0:close2:close15:wait198,1:poke198,0:gosub2520:goto320
540 fori=0to18:re$(i)="":next:fori=0to18:input#2,re$(i):next
550 close2:close15:gosub2520
560 na$=i$:s=(37-len(i$))/2:poke211,s-8:poke214,4:sys58640
570 printzv$zv$zv$zv$zv$zv$zv$zv$rn$" ";na$;" "rf$zv$zv$zv$zv$zv$zv$zv$zv$
580 fori=0to18
590 poke214,5+i:poke211,1:sys58640:print" "
600 poke214,5+i:poke211,1:sys58640:printre$(i)
610 next
620 goto320
630 fori=0to150:di$(i)="":next:open15,8,15,"i"
640 input#15,e,e$:poke211,7:poke214,10:sys58640:printe$
650 ife<>0thenpoke198,0:wait198,1:poke198,0:close15:gosub2520:goto320
660 open2,8,2,"#":sp=18:se=1:y=0
670 print#15,"u1:";2;0;sp;se:get#2,sp$,se$:sp=asc(sp$+chr$(0))
680 se=asc(se$+chr$(0))
690 fori=0to7:print#15,"b-p:";2;2+32*i:get#2,a$:ifa$=""thena$=chr$(0)
700 ft=asc(a$)and15
710 ifft<>1then770
720 get#2,a$,a$
730 forj=0to15:get#2,a$:ifa$=chr$(160)thenj=15:goto750
740 di$(y)=di$(y)+a$
750 nextj
760 y=y+1
770 nexti:ifsp=0thenclose2:close15:goto790
780 goto670
790 mp=0:pa=0:t=0:poke198,0
800 fori=0to9:poke214,7+i:poke211,7:sys58640:print" ":next
810 fori=0to9:poke214,7+i:poke211,7:sys58640:printdi$(i+pa*10):next
820 le$="":le=15-len(di$(mp+pa*10)):fori=1tole:le$=le$+" ":next
830 poke211,7:poke214,7+mp:sys58640:printrn$di$(mp+10*pa)le$rf$:al=mp
840 geti$
850 ifi$=c4$thenmp=mp+1:goto900
860 ifi$=c2$thenmp=mp-1:goto900
870 ifi$=chr$(13)then960
880 ifi$="_"thengosub2520:goto320
890 goto840
900 ifmp>9thenmp=0:pa=pa+1:t=1
910 ifmp<0thenmp=9:pa=pa-1:t=1
920 ifpa<0thenpa=0:mp=0:t=0:goto820
930 if(mp+pa*10)=ythenmp=mp-1:goto900
940 ift=1thent=0:goto800
950 poke214,7+al:poke211,7:sys58640:printdi$(al+pa*10)le$:goto820
960 i$=di$(mp+pa*10)
970 fori=0to9:poke214,7+i:poke211,7:sys58640:print" ":next
980 poke211,7:poke214,7:sys58640:print"[206]ame d. [210]ezepts"
990 poke211,7:poke214,8:sys58640:printi$
1000 goto500
1010 gosub2500
1020 lo=1190:be=50240:s=17:z=8:gosub2540
1030 poke214,7:poke211,7:sys58640:print"[206]ame d. [210]ezepts"
1040 ab=0:i$=na$:s=7:z=8:l=15:gosub2590:ifab=1thenab=0:gosub2520:goto320
1050 na$=i$
1060 open15,8,15:open2,8,2,na$+",s,w"
1070 e=0:input#15,e,e$
1080 ife=63then1160
1090 poke211,7:poke214,10:sys58640:printe$
1100 ife<>0thenclose2:close15:poke198,0:wait198,1:poke198,0:gosub2520:goto320
1110 fori=0to18:print#2,chr$(34);re$(i);chr$(34);chr$(13);:next
1120 close2:close15:gosub2520
1130 s=(37-len(na$))/2:poke214,4:poke211,s-8:sys58640
1140 printzv$zv$zv$zv$zv$zv$zv$zv$rn$" ";na$;" "rf$zv$zv$zv$zv$zv$zv$zv$zv$zv$
1150 goto320
1160 poke214,10:poke211,7:sys58640:print"ersetzen j/n?"
1170 i$="":z=10:s=21:l=1:ab=0:gosub2590:ifab=1thenab=0:i$="n"
1180 ifi$="n"thenclose2:close15:gosub2520:goto320
1190 ifi$<>"j"then1170
1200 close2:close15:open15,8,15,"s:"+na$:open2,8,2,na$+",s,w"
1210 print#15,"s:"+na$:goto1110
1220 gosub2500
1230 lo=1190:be=50380:s=17:z=6:gosub2540
1240 poke214,7:poke211,7:sys58640:print"[206]ame d. [210]ezepts"
1250 ab=0:i$=na$:s=7:z=8:l=15:gosub2590:ifab=1thenab=0:gosub2520:goto320
1260 gosub2520
1270 na$=i$:s=(37-len(na$))/2:poke214,4:poke211,s-8:sys58640
1280 printzv$zv$zv$zv$zv$zv$zv$zv$rn$" ";na$;" "rf$zv$zv$zv$zv$zv$zv$zv$zv$zv$
1290 y=0:sp=0
1300 ify<0theny=0
1310 ify>18theny=18
1320 ab=0:i$=re$(y):s=1:z=5+y:l=38:gosub2190
1330 ifab=0thenre$(y)=i$:y=y+1:sp=0:goto1300
1340 ifab=1thenre$(y)=i$:goto320
1350 ifab=2thenre$(y)=i$:y=y+1:goto1300
1360 ifab=3thenre$(y)=i$:y=y-1:goto1300
1370 ifab=4thenre$(y)=i$:y=y-1:sp=37:goto1300
1380 ifab=5thenre$(y)=i$:y=y+1:sp=0:goto1300
1390 ifab=6thenre$(y)=i$:y=0:sp=0:goto1300
1400 ifab=7thenre$(y)=i$:y=0:sp=0:goto1410
1410 fori=0to18
1420 poke211,1:poke214,i+5:sys58640
1430 re$(i)="":print" "
1440 next:goto1300
1450 gosub2500
1460 lo=1190:be=50490:s=18:z=8:gosub2540
1470 poke198,0:wait198,1:geti$:poke198,0:ifi$="_"thengosub2520:goto320
1480 fori=7to10:poke211,7:poke214,i:sys58640:print" ":next
1490 poke211,7:poke214,7:sys58640:print"ok."
1500 open4,4,7
1510 print#4,spc(20)chr$(14)na$chr$(15)
1520 print#4,spc(20)zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$;
1525 print#4,zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$
1530 fori=0to18:print#4,spc(20)re$(i):next
1540 close4
1550 gosub2520
1560 goto320
1570 gosub2500
1580 lo=1190:be=50640:s=17:z=8:gosub2540
1590 poke198,0:mp=1
1600 poke211,7:poke214,6+mp:sys58640:printrn$ud$(mp)rf$:al=mp
1610 geti$
1620 ifi$=c4$thenmp=mp+1:goto1670
1630 ifi$=c2$thenmp=mp-1:goto1670
1640 ifi$=chr$(13)thenonmpgoto1710,1930,2020,2110
1650 ifi$="_"thengosub2520:goto320
1660 goto1610
1670 ifmp<1thenmp=1
1680 ifmp>4thenmp=4
1690 poke211,7:poke214,6+al:sys58640:printud$(al)
1700 goto1600
1710 poke211,0:poke214,4:sys58640
1720 fori=4to23:print" ";:next
1730 print" ";:poke2023,32
1740 poke214,4:poke211,0:sys58640
1750 open15,8,15:open1,8,0,"$"
1760 input#15,e,e$:ife<>0thenpoke211,0:poke214,5:sys58640:printe$
1770 ife<>0thenclose1:close15:goto1900
1780 get#1,i$,i$
1790 get#1,i$,i$:ifst=64thenclose1:close15:goto1900
1800 get#1,i$,j$:printasc(i$+chr$(0))+256*asc(j$+chr$(0));
1810 get#1,i$:printi$;:ifi$<>""then1810
1820 ifpeek(214)=22then1840
1830 printrf$;:poke211,0:poke214,peek(214)+1:sys58640:goto1790
1840 poke211,0:poke214,24:sys58640:printrn$"[212]aste druecken"rf$;
1850 poke198,0:wait198,1:geti$:poke198,0:ifi$="_"thenclose1:close15:goto1920
1860 poke214,5:poke211,0:sys58640
1870 fori=5to23:print" ";:next
1880 print" ";:poke2023,32
1890 poke214,5:poke211,0:sys58640:goto1790
1900 poke211,0:poke214,24:sys58640
1905 printrn$"[212]aste druecken"rf$;:poke198,0:wait198,1
1910 poke198,0
1920 gosub2520:goto320
1930 lo=1395:be=50780:s=17:z=8:gosub2540
1940 poke214,12:poke211,12:sys58640:print"[206]ame d. [210]ezepts"
1950 i$="":ab=0:s=12:z=13:l=15:gosub2590:ifab=1thenab=0:gosub2520:goto320
1960 open15,8,15,"s:"+i$
1970 input#15,e,e$
1980 ife<>0thenpoke211,12:poke214,15:sys58640:printe$
1990 ife<>0thenpoke198,0:wait198,1:poke198,0
2000 close15
2010 gosub2520:goto320
2020 lo=1395:be=50920:s=17:z=11:gosub2540
2030 poke214,12:poke211,12:sys58640:print"alter [206]ame"
2040 i$="":ab=0:s=12:z=13:l=15:gosub2590:ifab=1thenab=0:gosub2520:goto320
2050 n1$=i$:poke214,15:poke211,12:sys58640:print"neuer [206]ame"
2060 i$="":ab=0:s=12:z=16:l=15:gosub2590:ifab=1thenab=0:gosub2520:goto320
2070 n2$=i$
2080 open15,8,15,"r:"+n2$+"="+n1$
2090 input#15,e,e$:poke211,12:poke214,18:sys58640:printe$
2100 close15:poke198,0:wait198,1:poke198,0:gosub2520:goto320
2110 lo=1395:be=51110:s=17:z=6:gosub2540
2120 ab=0:i$="":s=20:z=13:l=1:gosub2590:ifab=1thenab=0:gosub2520:goto320
2130 ifi$="n"thengosub2520:goto320
2140 ifi$<>"j"then2120
2150 printcl$c4$c4$c4$" [195]opyright 1987"
2160 printc4$c4$" by [202]ens [215]ellhausen"
2170 printc4$" and [205]artin [210]adetzki"
2180 sys64738
2190 iflen(i$)=lthen2210
2200 fori=1tol-len(i$):i$=i$+" ":next
2210 l=l-1
2220 poke211,s:poke214,z:sys58640:printi$
2230 ifsp<0thenab=4:goto2480
2240 ifsp>lthenab=5:goto2480
2250 c=z*40+s+sp+1024:ifpeek(c)<128thenpokec,peek(c)+128
2260 getg$:ifg$=""then2260
2270 a=asc(g$):if(a<>95anda>31anda<128)or(a>191anda<234)ora=160ora=255then2390
2280 ifa=13then2480
2290 ifa=29thensp=sp+1:pokec,peek(c)-128:goto2230
2300 ifa=157thensp=sp-1:pokec,peek(c)-128:goto2230
2310 ifa=19thenab=6:goto2480
2320 ifa=20then2410
2330 ifa=17thenab=2:goto2480
2340 ifa=145thenab=3:goto2480
2350 ifa=147thenab=7:goto2480
2360 ifa=148then2460
2370 ifa=95thenab=1:goto2480
2380 goto2230
2390 poke211,s+sp:poke214,z:sys58640
2400 printg$:i$=left$(i$,sp)+g$+right$(i$,l-sp):sp=sp+1:goto2230
2410 ifsp>1theni$=left$(i$,sp-1)+right$(i$,l+1-sp)+" "
2420 ifsp=0then2260
2430 ifsp=1theni$=right$(i$,l)+" "
2440 poke211,s:poke214,z:sys58640:printi$:sp=sp-1:goto2230
2450 i$="":fori=1tol+1:i$=i$+" ":next:goto2220
2460 i$=left$(left$(i$,sp)+" "+right$(i$,l+1-sp),l+1)
2470 poke211,s:poke214,z:sys58640:printi$:goto2230
2480 ifpeek(c)>127thenpokec,peek(c)-128
2490 return
2500 poke781,4:poke780,160:poke91,7:poke90,232:poke89,195:poke88,72:sys828
2510 return
2520 poke781,192:poke780,0:poke91,195:poke90,72:poke89,7:poke88,232:sys828
2530 return
2540 fori=0toz-1
2550 g=be+i*s:h=int(g/256):poke781,h:poke780,g-256*h
2560 g=g+s:h=int(g/256):poke91,h:poke90,g-256*h
2570 g=lo+i*40+s:h=int(g/256):poke89,h:poke88,g-256*h
2580 sys828:nexti:return
2590 iflen(i$)=lthen2610
2600 fori=1tol-len(i$):i$=i$+" ":next
2610 l=l-1
2620 poke211,s:poke214,z:sys58640:printi$:sp=0
2630 ifsp<0thensp=0
2640 ifsp>lthensp=l
2650 c=z*40+s+sp+1024:ifpeek(c)<128thenpokec,peek(c)+128
2660 getg$:ifg$=""then2660
2670 a=asc(g$):if(a<>95anda>31anda<128)or(a>191anda<234)ora=160ora=255then2770
2680 ifa=13then2860
2690 ifa=29thensp=sp+1:pokec,peek(c)-128:goto2630
2700 ifa=157thensp=sp-1:pokec,peek(c)-128:goto2630
2710 ifa=19thensp=0:pokec,peek(c)-128:goto2630
2720 ifa=20then2790
2730 ifa=147then2830
2740 ifa=148then2840
2750 ifa=95thenab=1:return
2760 goto2630
2770 poke211,s+sp:poke214,z:sys58640
2780 printg$:i$=left$(i$,sp)+g$+right$(i$,l-sp):sp=sp+1:goto2630
2790 ifsp>1theni$=left$(i$,sp-1)+right$(i$,l+1-sp)+" "
2800 ifsp=0then2660
2810 ifsp=1theni$=right$(i$,l)+" "
2820 poke211,s:poke214,z:sys58640:printi$:sp=sp-1:goto2630
2830 i$="":fori=1tol+1:i$=i$+" ":next:goto2620
2840 i$=left$(left$(i$,sp)+" "+right$(i$,l+1-sp),l+1)
2850 poke211,s:poke214,z:sys58640:printi$:goto2630
2860 fori=l+1to1step-1:ifmid$(i$,i,1)<>" "theni$=left$(i$,i):i=1
2870 next:pokec,peek(c)-128:return
60000 rem nachspann ===============
60010 rem * farbcodes/steuercodes *
60020 dc$=chr$(008):sl$=chr$(014)
60030 c4$=chr$(017):rn$=chr$(018)
60040 he$=chr$(019):c3$=chr$(029)
60050 bl$=chr$(031):c2$=chr$(145)
60060 rf$=chr$(146):cl$=chr$(147)
60070 c1$=chr$(157)
60080 rem *** zeichensatz/graphik *
60090 s2$=chr$(160):z0$=chr$(161)
60100 z1$=chr$(162):zc$=chr$(173)
60110 zd$=chr$(174):zf$=chr$(176)
60120 zm$=chr$(183):zn$=chr$(184)
60130 zv$=chr$(192):yo$=chr$(221)
60140 return
60150 rem ende