1    '***********************************
2    '*   Auswahl f}r BASIC-Programme   *
3    '*   von J|rg Buckert      1986    *
4    '***********************************
10   '
20   '
30   '*****   Variable definieren   *****
40   '
50   e$=CHR$(27):cl$=e$+"E"+e$+"H":ion$=e$+"p":ioff$=e$+"q":con$=e$+"e":coff$=e$+"f"
60   DIM adat$(19),bdat$(19),cdat$(19),ddat$(19),edat$(19)
70   '
80   '
90   '*****  Funktionen definieren  *****
100  '
110  DEF FNfen$=e$+"X"+CHR$(32+yp)+CHR$(32+xp)+CHR$(32+hoehe)+CHR$(32+breite)
120  DEF FNpos$=e$+"Y"+CHR$(32+yp)+CHR$(32+xp)
130  '
140  '
150  '*****   Bildschirm l|schen    *****
160  '
170  yp=0:xp=0:hoehe=32:breite=90:PRINT FNfen$;cl$
180  '
190  '
200  '
210  '*****     Hauptprogramm       *****
220  '
230  GOSUB 1810        '***** Bildaufbau
240  '
250  '***** Programme suchen und einf}gen *****
260  '
270  '***** 1.Anwendungsbereich
280  '
290  yp=13:xp=3:hoehe=20:breite=13:PRINT FNfen$;cl$;
300  FOR a=1 TO 18
310  adat$(a)=FIND$("*.elt",a):IF adat$(a)="" THEN GOTO 370
320  PRINT adat$(a)
330  NEXT a
340  '
350  '***** 2.Anwendungsbereich
360  '
370  yp=13:xp=20:hoehe=20:breite=13:PRINT FNfen$;cl$;
380  FOR a=1 TO 18
390  bdat$(a)=FIND$("*.mat",a):IF bdat$(a)="" THEN GOTO 450
400  PRINT bdat$(a)
410  NEXT a
420  '
430  '***** 3.Anwendungsbereich
440  '
450  yp=13:xp=37:hoehe=20:breite=13:PRINT FNfen$;cl$;
460  FOR a=1 TO 18
470  cdat$(a)=FIND$("*.txt",a):IF cdat$(a)="" THEN GOTO 530
480  PRINT cdat$(a)
490  NEXT a
500  '
510  '***** 4.Anwendungsbereich
520  '
530  yp=13:xp=54:hoehe=20:breite=13:PRINT FNfen$;cl$;
540  FOR a=1 TO 18
550  ddat$(a)=FIND$("*.spl",a):IF ddat$(a)="" THEN GOTO 610
560  PRINT ddat$(a)
570  NEXT a
580  '
590  '***** 5.Anwendungsbereich
600  '
610  yp=13:xp=71:hoehe=20:breite=13:PRINT FNfen$;cl$;
620  FOR a=1 TO 18
630  edat$(a)=FIND$("*.bas",a):IF edat$(a)="" THEN GOTO 690
640  PRINT edat$(a)
650  NEXT a
660  '
670  '***** Cursor an Anfangsposition
680  '
690  yp=0:xp=0:hoehe=32:breite=90:PRINT FNfen$
700  IF adat$(1)="" THEN adat$(1)="            "
710  yp=13:xp=3:PRINT FNpos$;ion$;adat$(1);ioff$ 
720  PRINT coff$
730  name$=adat$(1)
740  '
750  '***** Abfrage
760  '
770  taste$=INKEY$
780  IF taste$=CHR$(31) THEN GOSUB 1640:GOTO 770
790  IF taste$=CHR$(30) THEN GOSUB 1730:GOTO 770
800  IF taste$=CHR$(1) THEN GOSUB 1460:GOTO 770
810  IF taste$=CHR$(6) THEN GOSUB 1550:GOTO 770
820  IF taste$="1" THEN GOTO 1090
830  IF taste$="2" THEN GOTO 1010
840  IF taste$="3" THEN GOTO 1170
850  IF taste$="4" THEN GOTO 1280
860  IF taste$="5" THEN GOTO 920
870  IF taste$="6" THEN GOTO 1360
880  GOTO 770
890  '
900  '***** Diskette wechseln
910  '
920  GOSUB 2060:yp=16:xp=34:PRINT FNpos$;ion$;"Diskette wechseln"
930  yp=17:xp=41:PRINT FNpos$;"und"
940  yp=18:xp=31:PRINT FNpos$;"irgendeine Taste dr}cken";ioff$
950  taste$=INKEY$
960  IF taste$<>"" THEN RESET:GOSUB 1890:GOTO 290
970  GOTO 950
980  '
990  '***** Programm laden zum Bearbeiten
1000  '
1010  GOSUB 2060:yp=16:xp=30:PRINT FNpos$;ion$;"Programmname: ";name$
1020  yp=18:xp=34:PRINT FNpos$;"Best{tigen (J/N)";:INPUT frage$:PRINT ioff$
1030  IF frage$="j" OR frage$="J" THEN GOTO 1050
1040  GOSUB 1890:GOTO 290
1050  yp=0:xp=0:hoehe=32:breite=90:PRINT FNfen$;ioff$;con$;cl$:LOAD name$
1060  '
1070  '***** Programm laden und starten
1080  '
1090  GOSUB 2060:yp=16:xp=30:PRINT FNpos$;ion$;"Programmname: ";name$
1100  yp=18:xp=34:PRINT FNpos$;"Best{tigen (J/N)";:INPUT frage$:PRINT ioff$
1110  IF frage$="j" OR frage$="J" THEN GOTO 1130
1120  GOSUB 1890:GOTO 290
1130  yp=0:xp=0:hoehe=32:breite=90:PRINT FNfen$;ioff$;con$;cl$:CHAIN name$
1140  '
1150  '***** Programm umbenennen
1160  '
1170  GOSUB 2060:yp=16:xp=27:PRINT FNpos$;ion$;"alter Programmname: ";name$
1180  yp=17:xp=27:PRINT FNpos$;"neuer Programmname: ";:INPUT neu$
1190  IF FIND$(neu$)="" THEN GOTO 1200 ELSE yp=17:xp=27:PRINT FNpos$;SPC(32);" ":GOTO 1180
1200  yp=18:xp=34:PRINT FNpos$;"Best{tigen (J/N)";:INPUT frage$:PRINT ioff$
1210  IF frage$="j" OR frage$="J" THEN GOTO 1230
1220  GOSUB 1890:GOTO 290
1230  NAME name$ AS neu$
1240  GOSUB 1890:GOTO 290
1250  '
1260  '***** Programm l|schen
1270  '
1280  GOSUB 2060:yp=16:xp=30:PRINT FNpos$;ion$;"Programmname: ";name$
1290  yp=18:xp=34:PRINT FNpos$;"Best{tigen (J/N)";:INPUT frage$:PRINT ioff$
1300  IF frage$="j" OR frage$="J" THEN GOTO 1320
1310  GOSUB 1890:GOTO 290
1320  KILL name$:GOSUB 1890:GOTO 290
1330  '
1340  '***** Zur}ck zum System
1350  '
1360  GOSUB 2060:yp=17:xp=34:PRINT FNpos$;ion$;"Best{tigen (J/N)";:INPUT frage$:PRINT ioff$
1370  IF frage$="j" OR frage$="J" THEN GOTO 1390
1380  GOSUB 1890:GOTO 290
1390  yp=0:xp=0:hoehe=32:breite=90:PRINT FNfen$;ioff$;con$;cl$
1400  SYSTEM
1410  '
1420  '***** Cursor-Positionieren *****
1430  '
1440  '***** Cursor links
1450  '
1460  IF xp=3 THEN RETURN
1470  vorher=0:GOSUB 2140
1480  xp=xp-17
1490  vorher=1
1500  GOSUB 2140
1510  RETURN
1520  '
1530  '***** Cursor rechts
1540  '
1550  IF xp=71 THEN RETURN
1560  vorher=0:GOSUB 2140
1570  xp=xp+17
1580  vorher=1
1590  GOSUB 2140
1600  RETURN
1610  '
1620  '***** Cursor nach oben
1630  '
1640  IF yp=13 THEN RETURN
1650  vorher=0:GOSUB 2140
1660  yp=yp-1
1670  vorher=1
1680  GOSUB 2140
1690  RETURN
1700  '
1710  '***** Cursor nach unten
1720  '
1730  IF yp=30 THEN RETURN
1740  vorher=0:GOSUB 2140
1750  yp=yp+1
1760  vorher=1
1770  GOSUB 2140
1780  RETURN
1790  '
1800 '
1810 '*****      Bildaufbau         *****
1820 '
1830 PRINT cl$;ion$;CHR$(134);STRING$(86,CHR$(138));CHR$(140)
1840 PRINT CHR$(133);"      Programmauswahl f}r BASIC-Programme                 1986 von J|rg Buckert      ";CHR$(133)
1850 PRINT CHR$(135);STRING$(86,CHR$(138));CHR$(141)
1860 PRINT CHR$(133);" 1 = Programm laden und starten      3 = Programm umbenennen   5 = Diskette wechseln  ";CHR$(133)
1870 PRINT CHR$(133);" 2 = Programm laden zum Bearbeiten   4 = Programm l|schen      6 = Zur}ck zum System  ";CHR$(133)
1880 PRINT CHR$(131);STRING$(86,CHR$(138));CHR$(137);ioff$
1890 yp=7:xp=0:PRINT FNpos$;CHR$(148);" Der Programmname besteht aus 8 kennzeichnenden Buchstaben + Anwendungsbereich (.typ) ";CHR$(148)
1900 PRINT CHR$(151);:FOR a=1 TO 5:PRINT STRING$(16,CHR$(154));CHR$(158);:NEXT a:PRINT CHR$(154);CHR$(153)
1910 PRINT CHR$(149);:FOR a=1 TO 5:PRINT " ";ion$;SPC(14);ioff$;" ";CHR$(149);:NEXT a:PRINT " "
1920 '
1930 '***** Anwendungsbereiche
1940 '
1950 PRINT CHR$(149);" ";ion$;" Elektrotech. ";ioff$;" ";CHR$(149);" ";ion$;"  Mathematik  ";ioff$;" ";CHR$(149);" ";ion$;"     Text     ";ioff$;" ";CHR$(149);" ";ion$;"    Spiele    ";ioff$;" ";CHR$(149)
1960 yp=10:xp=70:PRINT FNpos$;ion$;"  Sonstiges   ";ioff$;" ";CHR$(149)
1970 PRINT CHR$(149);:FOR a=1 TO 5:PRINT " ";ion$;SPC(14);ioff$;" ";CHR$(149);:NEXT a:PRINT " "
1980 PRINT CHR$(151);:FOR a=1 TO 5:PRINT STRING$(16,CHR$(154));CHR$(159);:NEXT a:PRINT CHR$(154);CHR$(152)
1990 FOR a=1 TO 18
2000 PRINT CHR$(149);:FOR b=1 TO 5:PRINT SPC(16);CHR$(149);:NEXT b:PRINT " "
2010 NEXT a
2020 RETURN
2030 '
2040 '***** Fenster f}r Best{tigungen *****
2050 '
2060 yp=15:xp=25:hoehe=7:breite=40:PRINT FNfen$;ion$;CHR$(134);STRING$(34,CHR$(138));CHR$(140)
2070 FOR a=1 TO 3:PRINT CHR$(133);SPC(34);CHR$(133):NEXT a
2080 PRINT CHR$(131);STRING$(34,CHR$(138));CHR$(137);ioff$
2090 yp=0:xp=0:hoehe=32:breite=90:PRINT FNfen$
2100 RETURN
2110 '
2120 '***** Programmname aufnehmen und invers darstellen *****
2130 '
2140 IF xp=3 THEN GOTO 2230
2150 IF xp=20 THEN GOTO 2290
2160 IF xp=37 THEN GOTO 2350
2170 IF xp=54 THEN GOTO 2410
2180 IF xp=71 THEN GOTO 2470
2190 RETURN
2200 '
2210 '***** Programmname im 1.Anwendungsbereich
2220 '
2230 IF adat$(yp-12)="" THEN adat$(yp-12)="            "
2240 IF vorher=0 THEN PRINT FNpos$;adat$(yp-12) ELSE PRINT FNpos$;ion$;adat$(yp-12);ioff$:name$=adat$(yp-12)
2250 RETURN
2260 '
2270 '***** Programmname im 2.Anwendungsbereich
2280 '
2290 IF bdat$(yp-12)="" THEN bdat$(yp-12)="            "
2300 IF vorher=0 THEN PRINT FNpos$;bdat$(yp-12) ELSE PRINT FNpos$;ion$;bdat$(yp-12);ioff$:name$=bdat$(yp-12)
2310 RETURN
2320 '
2330 '***** Programmname im 3.Anwendungsbereich
2340 '
2350 IF cdat$(yp-12)="" THEN cdat$(yp-12)="            "
2360 IF vorher=0 THEN PRINT FNpos$;cdat$(yp-12) ELSE PRINT FNpos$;ion$;cdat$(yp-12);ioff$:name$=cdat$(yp-12)
2370 RETURN
2380 '
2390 '***** Programmname im 4.Anwendungsbereich
2400 '
2410 IF ddat$(yp-12)="" THEN ddat$(yp-12)="            "
2420 IF vorher=0 THEN PRINT FNpos$;ddat$(yp-12) ELSE PRINT FNpos$;ion$;ddat$(yp-12);ioff$:name$=ddat$(yp-12)
2430 RETURN
2440 '
2450 '***** Programmname im 5.Anwendungsbereich
2460 '
2470 IF edat$(yp-12)="" THEN edat$(yp-12)="            "
2480 IF vorher=0 THEN PRINT FNpos$;edat$(yp-12) ELSE PRINT FNpos$;ion$;edat$(yp-12);ioff$:name$=edat$(yp-12)
2490 RETURN
 "
2480 IF vor