sp-tafel_sss.tap
sp-tafel_sss.z80
Zeichensatz UTF-8+Z1013()+CTRL()-ohne Umlaute(äöüß)

   10! Zeichnen ueber Spracheingabe
   20!---------------------------------
   30 CLEAR 1000
   40 DIM M$(20):!Muster
   50 DIM A$(26):!zugeordnete ZK
   55 X=1:Y=1:RI=0:A=0:RE$=""
   60 DATA links,rechts,runter,nach oben,Muster,loeschen,Wiederholung
   70 DATA fertig,"","","","",""," "
   80 DATA 5,6,7,8,9,10,Aufhoeren,Neubeginn
   85 RESTORE 60
   90 FOR I=5 TO 26:READ A$(I):NEXT
  100 FOR I=0 TO 20:M$(I)="":NEXT
  110!--------------------------------
  120 WINDOW 22,23,0,39:CLS
  130 WINDOW 22,23,1,38
  140 PRINT AT(0,0);"",STRING$(38,""),""
  150 FOR I=1 TO 20:PRINT AT(I,0);"",STRING$(38," "),"":NEXT
  160 PRINT AT(21,0);"",STRING$(38,""),""
  162 RE$=" ":PRINT AT(1,1);""
  170 GOTO 230
  180!--- Spracheingabe ---
  190 CLS:PRINT "?";
  200 CALL*8819:A=PEEK(66)
  210 RETURN
  220!--- Auswertung ---
  230 GOSUB 190
  240 IF A<5 OR A>26 THEN 230     :!sonst
  250 IF A<9 THEN GOSUB 1000:GOTO 230:!Richtg
  260 IF A=9 THEN GOSUB 2000:GOTO 230:!Muster
  270 IF A=10 THEN GOSUB 3000:GOTO 230:!loesch
  280 IF A=11 THEN GOSUB 4000:GOTO 230:!Wied.
  290 IF A=12 THEN 230              :!fertig
  300 IF A<19 THEN GOSUB 5000:GOTO 230:!Zeich
  310 IF A<25 THEN GOSUB 6000:GOTO 230:!Faktor
  320 IF A=25 THEN GOTO 7000         :!Ende
  330 IF A=26 THEN PRINT A$(A):PAUSE 10:GOTO 55
 1000!--- Richtung ---
 1010 I=1
 1020 GOSUB 8000
 1030 RETURN
 2000!--- Muster ---
 2010 CLS
 2020 PRINT "Ecke links oben positionieren!"
 2030 GOSUB 10000
 2040 X1=X:Y1=Y
 2050 CLS
 2060 PRINT "Ecke rechts unten positionieren!"
 2070 GOSUB 10000
 2080 X2=X:Y2=Y
 2090 IF X2<X1 OR Y2<Y1 THEN CLS:PRINT "Fehler!":BEEP:PAUSE 5:RETURN
 2095 PRINT AT(Y2,X2);RE$
 2100 FOR I=0 TO 18:M$(I)="":NEXT
 2110 FOR I=0 TO Y2-Y1
 2120 FOR J=0 TO X2-X1
 2130 M$(I)=M$(I)+CHR$(PEEK(-5120+40*(Y1+I)+X1+J))
 2140 NEXT J,I
 2150 PRINT AT(Y2,X2);""
 2160 RETURN
 3000!--- loeschen ---
 3005 PRINT A$(A);
 3010 FOR I=0 TO 20:M$(I)="":NEXT
 3020 RETURN
 4000!--- Wiederholung ---
 4010 CLS
 4020 PRINT "Ecke links oben positionieren!"
 4030 GOSUB 10000
 4040 J=0
 4050 IF M$(J)=""THEN 4080
 4060 J=J+1
 4070 GOTO 4050
 4080 FOR I=0 TO J
 4090 PRINT AT(Y+I,X);LEFT$(M$(I),39-X)
 4100 IF Y+I=20 THEN I=J
 4110 NEXT
 4120 RE$=CHR$(PEEK(-5120+40*Y+X))
 4130 PRINT AT(Y,X);""
 4140 RETURN
 5000!--- Zeichen ---
 5010 RE$=A$(A)
 5020 A=6
 5030 GOSUB 1000
 5040 RETURN
 6000!--- Faktor - Richtung ---
 6010 I=A-14
 6020 PRINT A$(I+14);"mal wohin?";
 6030 GOSUB 200
 6040 IF A<5 OR A>8 THEN CLS:GOTO 6020
 6050 PRINT A$(A)
 6060 GOSUB 8000
 6070 RETURN
 7000!--- Ende ---
 7010 WINDOW:CLS
 7020 PRINT AT(0,0);" "
 7030 PRINT AT(10,10);"Auf Wiedersehen!"
 7040 PAUSE 20
 7050 CLS
 7060 END
 8000!--- Kusor positionieren ---
 8010 RI=A-4
 8020 ON RI GOTO 8100,8200,8300,8400
 8100 IF X<=1 THEN 8150
 8110 PRINT AT(Y,X);RE$
 8120 X=X-1
 8130 GOSUB 9000
 8140 IF I>0 THEN 8100
 8150 RETURN
 8200 IF X>=38 THEN 8250
 8210 PRINT AT(Y,X);RE$
 8220 X=X+1
 8230 GOSUB 9000
 8240 IF I>0 THEN 8200
 8250 RETURN
 8300 IF Y>=20 THEN 8350
 8310 PRINT AT(Y,X);RE$
 8320 Y=Y+1
 8330 GOSUB 9000
 8340 IF I>0 THEN 8300
 8350 RETURN
 8400 IF Y<=1 THEN 8450
 8410 PRINT AT(Y,X);RE$
 8420 Y=Y-1
 8430 GOSUB 9000
 8440 IF I>0 THEN 8400
 8450 RETURN
 8990!--- Kusor setzen ---
 9000 RE$=CHR$(PEEK(-5120+40*Y+X))
 9010 PRINT AT(Y,X);""
 9020 I=I-1
 9030 RETURN
10000!--- Position anfahren ---
10010 GOSUB 200
10015 IF A=12 THEN PRINT A$(A);:RETURN
10020 IF A>4 AND A<9 THEN GOSUB 1000
10030 IF A>18 AND A<25 THEN GOSUB 6000
10040 GOTO 10010