home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Input 64
/
Input_64_85-01_1985_Verlag_Heinz_Weise_de.d64
/
DATEIKASTEN
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
9KB
|
220 lines
1 poke50257,16:remebergeben v3.0d
5 poke55,0:poke56,48:poke45,190:poke46,42:clr
7 printchr$(14)chr$(8):poke650,128
10 fori=1to40:h$=h$+" ":next
30 a$="[176]":fori=1to16:a$=a$+"[192]":next:a$=a$+"[174]"
31 a$=a$+"[157][221]":fori=1to18:a$=a$+"[157]":next
32 a$=a$+"[221][157]":a$=a$+"[173]":fori=1to16:a$=a$+"[192]":next:a$=a$+"[189]"
33 ra$=a$
35 rl$=left$(h$,18)+"[157] ":fori=1to18:rl$=rl$+"[157]":next:rl$=rl$+" [157]"
36 rl$=rl$+left$(h$,18)
40 nn=1:gosub7000:poke788,52:gosub150:goto2000
100 vc=1:hc=35:gosub295:print"s: [157][157][157]";sn+1
129 gosub700:sys9888+616
130 print:return
150 rem reset speicher
160 sys2*4096+2*256+11*16+7+616:ns=0:sn=0:dn$="":fori=0to9:a$(i)="":next
170 return
200 print"[147]";
215 print"";:printh$;:vc=1:hc=1:gosub295
220 printub$:hc=16:gosub295:ifnnthenprintdn$;
225 print:nn=1
230 fori=0to9:print" "right$(str$(i),1)" [146] "a$(i):print:next:print""h$
245 hc=1:vc=23:gosub295:print"";
250 fori=1tono:print"";:printleft$(w$(i),1);:print"";:printmid$(w$(i),2)" ";:next
255 vc=25:hc=1:gosub295:printleft$(h$,39);:poke56295,nf:poke2023,160:print"[146]";:return
295 poke211,hc-1:poke214,vc-1:sys58640:return
296 poke646,fa:poke53280,rf:poke53281,hf:return
300 geta$:ifa$=""then300
320 fori=1tolen(g$):ifa$=mid$(g$,i,1)then350
325 next
326 ifa$>="0"anda$<="9"theni=asc(a$)-58:goto350
330 m$="eingabefehler":gosub400:goto300
350 si=i+10:m$="":gosub400:return
400 hc=1:vc=24:gosub295:print"[146]";:printh$;
420 hc=21-int((len(m$))/2):vc=24:gosub295:printm$;:return
500 hc=cx:vc=cy:gosub295:print"[146]"ra$:return
550 hc=cx:vc=cy:gosub295:printrl$:return
600 gosub295:sys2*4096+256+9*16+14+616
630 a$="":l=peek(512):ifl=0thenreturn
640 fori=513to512+l:a$=a$+chr$(peek(i)):next:return
700 poke160+11,en:hb=int(sn/256):poke177,hb:poke176,sn-256*hb:return
750 l=len(a$):poke512,l:ifl=0thenreturn
780 fori=513to512+l:pokei,asc(mid$(a$,i-512,1)):nexti:return
800 gosub700:sys2*4096+4*256+4*16+10+616:goto630
850 gosub700:gosub750:sys2*4096+4*256+1*16+9+616:return
870 sys2*4096+4*256+5*16+14+616:return
900 lf=0:m$="bitte mit '@' bestaetigen!"
920 gosub400
930 geta$:ifa$=""then930
940 lf=0:ifa$="@"thenlf=1
945 m$="":goto400
950 hc=1:vc=25:gosub295
960 print"anzahl saetze: [157][157][157][157]"nstab(28)"frei: [157][157][157][157][157][157]";
965 fr=peek(247)+peek(248)*256
970 fr=40960-fr
975 fr=(fr/26624)*100
976 printint(fr)"%";:return
1000 ub$="definition der begriffe":w$(1)="wahltafel":no=1:nn=0:gosub200
1020 g$="w":gosub300:m$="":gosub400:ifsi=11then2000
1035 cx=4:cy=2+si*2:gosub500:hc=5:vc=cy+1:gosub600:a$(si)=a$:gosub550:gosub1020
2000 print"[147]"h$"wahltafel":hc=16:vc=1:gosub295:print"................"
2015 gosub295:printdn$
2025 print"definition"
2030 print"editor"
2040 print"verarbeitung"
2045 print"[146]komplett loeschen"
2050 print""h$
2055 print"[146]festlegung des dateinamens"
2060 print"laden einer datei"
2070 print"sichern einer datei"
2080 print"";:gosub255
2090 g$="dvelsfk":gosub300:m$="":lf=0:gosub400:ifsi<11then2000
2100 onsi-10goto1000,5000,3000,4000,4500,2200,2300
2200 hc=16:vc=1:gosub600:fori=lto1step-1:ifmid$(a$,i,1)="."ormid$(a$,i,1)=" "thennext
2220 dn$=left$(a$,i):goto2090
2300 gosub900:iflf=0then2090
2305 vc=1:hc=16:gosub295:print"................":gosub150:goto2090
3000 ub$="editor":w$(1)="wahltafel":w$(2)="vor":w$(3)="rueck":no=5
3017 w$(4)="loeschen":w$(5)="neuer satz":gosub200:lf=0:sn=0
3040 ifns=0then3080
3042 gosub100
3080 gosub950
3085 m$="":ifns=0thenm$="keine daten im speicher"
3090 gosub400
3100 g$="wvrln":gosub300
3110 ifsi>10then3200
3115 ifns=0then3040
3120 cx=22:cy=2+si*2:gosub500:hc=23:vc=cy+1:gosub600:gosub550
3140 ifns<=snthengosub870
3150 b$=a$:en=si:gosub800:iffr<1andlen(b$)>len(a$)then3190
3160 a$=b$:gosub850:goto3040
3190 m$="speicher belegt":gosub400:gosub200:goto3040
3200 onsi-10goto2000,3300,3350,3400,3500
3300 ifsn>=ns-1thenm$="letzter satz":gosub400:goto3100
3310 sn=sn+1:goto3040
3350 ifsn=0thenm$="erster satz":gosub400:goto3100
3360 sn=sn-1:goto3040
3400 ifns=0then3080
3410 sys2*4096+5*256+16+2+616:ns=ns-1:ifsn=nsthensn=sn-1
3430 goto3040
3500 iffr<1thenm$="speicher belegt!":gosub400:goto3040
3501 sn=ns:ns=ns+1:gosub870:goto3040
4000 gosub900:iflf=0then2090
4003 ifdk=0then4100
4005 gosub10000:iffthen2090
4010 open15,8,15:d$=dn$+",s,r":open1,8,2,d$
4030 input#15,f,f$:iffthenm$="diskettenfehler: "+f$:lf=0:gosub400:goto4060
4032 get#1,a$:ifa$<>chr$(1)thenm$="fremddatei!":gosub400:f=1:goto4060
4035 input#1,ns:fori=0to9:input#1,a$(i):next:sys9420+616
4060 close1:close15
4070 iffthen2090
4080 goto3000
4100 print"[147]":open1,1,0,dn$:f=0:goto4032
4500 ifns=0thenm$="nichts im speicher":gosub400:goto2090
4505 ifdn$=""thenm$="bitte erst dateinamen definieren !":gosub400:goto2090
4510 ifdk=0then4600
4513 gosub10000:iffthen2090
4515 open15,8,15:d$=dn$+",s,w"
4520 open1,8,2,d$
4530 input#15,f,f$:iffthen4700
4535 print#1,chr$(1):print#1,ns:fori=0to9:ifa$(i)=""thena$(i)=" "
4545 print#1,a$(i):next:sys2*4096+4*256+8*16+4+616
4560 close1:close15:ifdk=0then2000
4580 goto2090
4600 print"[147]":open1,1,1,dn$:goto4535
4700 iff<>63thenm$="diskettenfehler "+f$:gosub400:goto4560
4705 m$="wenn file ueberschreiben,dann '@'!":gosub400
4710 geta$:ifa$=""then4710
4713 m$="":gosub400
4715 ifa$<>"@"then4560
4720 d$="@:"+d$:close1:goto4520
5000 ifns=0thenm$="keine daten im speicher":gosub400:lf=1:goto2090
5005 fori=0to9:f$(i)="":next
5010 ub$="verarbeitung"
5015 w$(1)="wahltafel":w$(2)="suchen":w$(3)="ordnen":no=3:nn=0:gosub200:gosub950
5030 g$="wso":gosub300:m$="":gosub400
5040 ifsi>10thenonsi-10goto2000,5200,5100
5060 cx=22:cy=2+si*2:gosub500:hc=23:vc=cy+1:gosub600:f$(si)=a$:gosub550:goto5030
5100 fori=0to9:iff$(i)<>"*"thennext:m$="bitte mit '*' waehlen!":gosub400:goto5030
5105 ek=i
5110 pf=0:m$="ich ordne...":goto5500
5200 pf=1:m$="ich suche...":goto5500
5500 lf=0:gosub400:ba=3*4096:l=0:fori=0to9
5520 f$=f$(i):l=len(f$):pokeba,l:ifl=0then5550
5540 forj=1tol:pokeba+j,asc(mid$(f$,j,1)):next
5550 ba=ba+l+1:nexti
5600 ifpfthensys2*4096+5*256+8*16+15+616
5601 ifpf=0thenen=ek:gosub700:sys2*4096+7*256+4*16+8+616
5602 ba=3*4096+256
5610 an=peek(ba)+peek(ba+1)*256
5620 ifan=0thenm$="keine daten gefunden":gosub400:goto5030
5700 ub$="datenausgabe"
5710 w$(1)="wahltafel":w$(2)="vor":w$(3)="rueck":w$(4)="drucken"
5720 w$(5)="neue datei":no=4+pf:gosub200
5730 m$="ordnet":ifpfthenm$="funden"
5731 m$=str$(an)+" saetze ge"+m$:gosub400
5740 po=ba+2:pn=1
5750 sn=peek(po)+peek(po+1)*256:gosub100:gosub6200
5800 g$="wvrd":ifpftheng$=g$+"n"
5801 gosub300:m$="":gosub400
5805 ifsi<11then5800
5810 onsi-10goto2000,5820,5850,5900,6000
5820 ifpn=anthenm$="letzter satz":gosub400:goto5800
5825 pn=pn+1:po=po+2:goto5750
5850 ifpn=1thenm$="erster satz":gosub400:goto5800
5860 pn=pn-1:po=po-2:goto5750
5900 open1,4,1:sys2*4096+7*256+2*16+14+616
5901 ifpeek(832)thenm$="kein drucker angeschlossen !":lf=0:gosub400:close1:goto5800
5902 close1:goto6100
5910 open4,4,(peek(53272)and2)*3.5:ifefthen5930
5920 print#4,"dateiname : ";dn$
5925 print#4,"datensaetze :";ns
5927 print#4,"ausgesucht :";an
5929 print#4,"----------------------------------------":print#4
5930 po=ba+2:forpi=0toan-1
5940 sn=peek(po)+peek(po+1)*256
5943 ifef=0thenprint#4,"datensatz nr.:"sn
5944 print#4:foren=0toed:ifa$(en)=""then5950
5945 ifef=0thenprint#4," "a$(en)":"left$(h$,20-len(a$(en)));
5948 gosub800:print#4,a$
5950 next:po=po+2:print#4:next:close4
5990 goto5010
6000 gosub900:iflf=0then5800
6010 lf=0:m$="ich ordne...":gosub400
6020 ns=an:sys2*4096+5*256+13*16+7+616
6030 goto2000
6100 vc=23:hc=1:gosub295
6105 print"wahltafel drucken: alles nur daten 0-9"
6110 g$="wa":gosub300
6120 ifsi<10thened=si:ef=1:goto5910
6130 ifsi=11then2000
6135 ed=9:ef=0:goto5910
6200 print"anzahl saetze: [157][157][157][157]"nstab(22)"laufende nr.: [157][157][157][157]";pn;:return
7000 print"[147]";
7010 rf=0:hf=0:nf=5:sf=1:fa=nf:gosub296
7020 print" dddd a ttttt eeeee iii
7030 [153]" d d a a t e i
7035 print" d d a a t e i
7040 [153]" d d a a t eeee i ---
7045 print" d d aaaaa t e i
7050 [153]" d d a a t e i
7055 print" dddd a a t eeeee iii
7056 [153]:[153]
7060 [153]" k k a ssss ttttt eeeee n n
7065 print" k k a a s t e n n
7070 [153]" k k a a s t e nn n
7074 print" kk a a sss t eeee n n n
7080 [153]" k k aaaaa s t e n nn
7085 print" k k a a s t e n n
7090 [153]" k k a a ssss t eeeee n n
7095 print:print:print" von peter sager"
7100 print:print:print"arbeiten sie mit kassette oder diskette?";
7110 g$="kd":gosub300
7120 ifsi<11then7110
7130 dk=0:ifsi=12thendk=1
7999 return
10000 open1,8,1:sys2*4096+7*256+2*16+14+616
10001 f=0:ifpeek(832)thenf=1:m$="diskettenlaufwerk fehlt !":gosub400
10002 close1:return