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

    1 GOTO 7000
    9 GOTO 9905
   30!UP GAUSS
   35 IF N=1 THEN 100
   40 FOR K=N TO 2 STEP-1
   45! PIVOTSUCHE
   50 Z=1:FOR I=2 TO K:IF ABS(A(P(Z),P(Z)))<ABS(A(P(I),P(I)))THEN Z=I
   55 NEXT
   60 P=P(Z):P(Z)=P(K):P(K)=P
   65 IF ABS(A(P,P))<P1 THEN PRINT "PIVOT";P,A(P,P)
   70!ELIMINATION
   75 FOR J=1 TO K-1:Z=P(J):IF A(Z,P)=0 THEN 90
   80 X=A(Z,P)/A(P,P):B(Z)=B(Z)-X*B(P)
   85 FOR I=1 TO K-1:A(Z,P(I))=A(Z,P(I))-X*A(P,P(I)):NEXT
   90 NEXT:NEXT
   95!RUECKSUBSTITUTION
  100 FOR J=1 TO N:Z=P(J):IF J=1 THEN 110
  105 FOR I=1 TO J-1:B(Z)=B(Z)-B(P(I))*A(Z,P(I)):NEXT
  110 IF A(Z,Z)=0 THEN PRINT "KNOTEN";Z;"ISOLIERT!!!":GOTO 7300
  115 B(Z)=B(Z)/A(Z,Z):NEXT:RETURN
  455!UP KLM 2-POL
  460 A(L,L)=A(L,L)+G1:A(L,M)=A(L,M)-G1:A(M,L)=A(M,L)-G1:A(M,M)=A(M,M)+G1
  465 RETURN
  495!UP C-ESB
  500 GOSUB 460:B(L)=B(L)+G1*(U(L)-U(M)):B(M)=B(M)-G1*(U(L)-U(M)):RETURN
  520!UP GEST. I-QUELLE
  525 A(L,J)=A(L,J)-X:A(L,K)=A(L,K)+X:A(M,J)=A(M,J)+X:A(M,K)=A(M,K)-X
  530 RETURN
 1500 IF T=0 THEN X=0
 1505 RETURN
 1520 IF T>0 THEN X=0
 1525 RETURN
 1540 X=X*T:RETURN
 1560 X=X*SIN(2*PI*T/T0):RETURN
 1580 V=X*SIN(2*PI*T/T0):IF V<=0 THEN X=0
 1585 RETURN
 1600 V=X*SIN(2*PI*T/T0):IF(T=0)AND(V=0)THEN X=0
 1605 IF V<0 THEN X=-X
 1610 RETURN
 1620 IF(T=0)OR(T>T0)THEN X=0
 1625 RETURN
 2500!UP AUFSTELLEN GLS
 2505 FOR I=1 TO A:B(I)=0:FOR J=1 TO A:A(I,J)=0:NEXT:NEXT
 2550!AUSLESEN R
 2555 IF Z(1)=0 THEN 2605
 2560 FOR I=1 TO Z(1):G1=R(I,1):L=R(I,2):M=R(I,3):GOSUB 460:NEXT
 2600!AUSLESEN E
 2605 IF Z(2)=0 THEN 2705
 2610 FOR I=1 TO Z(2):G1=1/E(I,3):L=E(I,4):M=E(I,5):GOSUB 460
 2615 B(L)=B(L)+E(I,6):B(M)=B(M)-E(I,6):NEXT
 2700!AUSLESEN I
 2705 IF Z(3)=0 THEN 2805
 2710 FOR I=1 TO Z(3):X=I(I,7):L=I(I,5):M=I(I,6)
 2715 IF I(I,1)<>10 THEN B(L)=B(L)+X:B(M)=B(M)-X:GOTO 2725
 2720 J=I(I,3):K=I(I,4):X=I(I,2):GOSUB 525
 2725 NEXT
 2800!AUSLESEN C
 2805 IF(Z(4)=0)OR(T=0)THEN 2855
 2810 FOR I=1 TO Z(4):L=C(I,2):M=C(I,3):G1=C(I,1)/H:GOSUB 500:NEXT
 2855!
 4995 RETURN
 5000!START HAUPTPROGRAMM
 5005 FOR I=1 TO A:P(I)=I:NEXT
 5100 PRINT:PRINT "* BEZUGSKNOTEN: ";:GOSUB 9:B=X:PRINT B
 5105 P=P(B):P(B)=P(A):P(A)=P
 5245!ZEITPARAMETER
 5250 T2=-1:PRINT "* SCHRITT(NS) : ";:GOSUB 9:H=X:PRINT H:IF H=0 THEN 5595
 5275 PRINT "* ENDZEIT(NS): ";:GOSUB 9:T2=X:PRINT X
 5300 PRINT "* ANZEIGEKNOTEN: ";:GOSUB 9:A1=X:PRINT X;" , ";:GOSUB 9:A2=X:PRINT X
 5590!START INTEGRATIONSSCHLEIFE
 5595 T=0
 5600!UMRECHNEN E-QUELLEN
 5605 IF Z(2)=0 THEN 5655
 5610 FOR I=1 TO Z(2):X=E(I,2)/E(I,3)
 5615 ON E(I,1)GOSUB 1500,1520,1540,1560,1580,1600,1620:E(I,6)=X:NEXT
 5650!UMRECHNEN I-QUELLEN
 5655 IF Z(3)=0 THEN 5770
 5660 FOR I=1 TO Z(3):IF I(I,1)=10 THEN 5670
 5665 X=I(I,2):ON I(I,1)GOSUB 1500,1520,1540,1560,1580,1600,1620:I(I,7)=X
 5670 NEXT
 5770!AUFSTELLEN GLS
 5775 GOSUB 2500
 5900!LOESEN GLS
 5905 GOSUB 35:B(B)=0
 5910 FOR I=1 TO A:U(I)=B(I):NEXT
 6000!START HAUPTPROGRAMM
 6005 IF T=0 THEN PRINT "KNOTENSPANNUNGEN(VOLT):"
 6010 IF H=0 THEN 6030
 6015 IF T=0 THEN PRINT "T(NS)  U(";A1;")";TAB(21);"U(";A2;")"
 6020 PRINT T;TAB(7);B(A1);TAB(20);B(A2):IF T>=T2 THEN 7300
 6025 T=T+H:GOTO 5600
 6030 FOR I=1 TO A:IF I<>B THEN PRINT "U(";I;")=";B(I),
 6035 NEXT:GOTO 7300
 7000!START EINGABEPROGRAMM
 7005 WINDOW 0,22,0,39
 7010 CLS:PRINT TAB(8);"*** DYNA-L ***"
 7015 M$="REIC":DIM Z(LEN(M$))
 7020 PRINT:PRINT "  MODELLBIBLIOTHEK = ";M$:PRINT
 7025 PRINT " KNOTENZAHL:";:GOSUB 9:A=X:PRINT A
 7030 PRINT "   BE-TYPEN: ";:GOSUB 9:B$=X$:PRINT B$
 7035 PRINT "    T0 (NS):";:GOSUB 9:PRINT X:T0=X
 7170 FOR I=1 TO LEN(B$):FOR J=1 TO LEN(M$)
 7175 IF MID$(B$,I,1)=MID$(M$,J,1)THEN GOSUB 7350
 7180 NEXT:NEXT
 7220 DIM A(A,A):DIM B(A):DIM P(A):DIM U(A):N=A-1:P1=1E-12
 7300 PRINT:PRINT "* FORTSETZUNG ? (K/E/H)":GOSUB 9:IF X$="E"THEN RUN 7000
 7305 IF X$="K"THEN 9000
 7340 GOTO 5000
 7350!UP BE-LISTEN
 7355 PRINT:PRINT "* ANZAHL ";MID$(B$,I,1);":";:GOSUB 9:Z(J)=X:PRINT X
 7360 ON J GOSUB 7400,7550,7700,7850:FOR K=1 TO Z(J):ON J GOSUB 7420,7570,7720,7870
 7365 NEXT K:RETURN
 7400!R-EINGABE-UP
 7405 DIM R(Z(1),3)
 7410 PRINT "NR";TAB(8);"WERT(KOHM)";TAB(28);"K   K":RETURN
 7420 PRINT "R";K;TAB(7);:GOSUB 9:R(K,1)=1/X:PRINT X;TAB(27);
 7425 GOSUB 9:R(K,2)=X:PRINT X;TAB(29);",";
 7430 GOSUB 9:R(K,3)=X:PRINT X:RETURN
 7530 PRINT "R";I;TAB(7);1/R(I,1);TAB(27);R(I,2);TAB(29);",";R(I,3):RETURN
 7550!E-EINGABE-UP
 7555 DIM E(Z(2),6)
 7560 PRINT "NR  TYP WERT(VOLT) RI(KOHM) K+  K-":RETURN
 7570 PRINT "E";K;TAB(4);:GOSUB 9:E(K,1)=X:PRINT X;TAB(7);
 7575 GOSUB 9:E(K,2)=X:PRINT X;TAB(18);
 7580 GOSUB 9:E(K,3)=X:PRINT X;TAB(27);
 7585 GOSUB 9:E(K,4)=X:PRINT X;TAB(29);",";
 7590 GOSUB 9:E(K,5)=X:PRINT X:RETURN
 7680 PRINT "E";I;TAB(4);E(I,1);TAB(7);E(I,2);TAB(18);
 7685 PRINT E(I,3);TAB(27);E(I,4);TAB(29);",";(I,5):RETURN
 7700!I-EINGABE-UP
 7705 DIM I(Z(3),7)
 7710 PRINT "NR  TYP WERT(mA/V)  S+  S-  K+  K-":RETURN
 7720 PRINT "I";K;:GOSUB 9:I(K,1)=X:PRINT X;TAB(7);
 7725 GOSUB 9:I(K,2)=X:PRINT X;TAB(19);:IF I(K,1)<>10 THEN GOTO 7740
 7730 GOSUB 9:I(K,3)=X:PRINT X;TAB(21);",";
 7735 GOSUB 9:I(K,4)=X:PRINT X;
 7740 PRINT TAB(27);:GOSUB 9:I(K,5)=X:PRINT X;TAB(29);",";
 7745 GOSUB 9:I(K,6)=X:PRINT X:RETURN
 7830 PRINT "I";I;TAB(4);I(I,1);TAB(7);I(I,2);TAB(19);I(I,3);TAB(21);",";
 7835 PRINT I(I,4);;TAB(27);I(I,5);TAB(29);",";I(I,6):RETURN
 7850!C-EINGABE-UP
 7855 DIM C(Z(4),3)
 7860 PRINT "NR";TAB(8);WERT(PF)";TAB(28);"K   K ":RETURN
 7870 PRINT "C";K;TAB(7);:GOSUB 9:C(K,1)=X:PRINT X;TAB(27);
 7875 GOSUB 9:C(K,2)=X:PRINT X;TAB(29);",";
 7880 GOSUB 9:C(K,3)=X:PRINT X:RETURN
 7980 PRINT "C";I;TAB(7);C(I,1);TAB(27);C(I,2);TAB(29);",";C(I,3):RETURN
 9000!START KORREKTUR
 9005 PRINT:PRINT "* TYP ? (";B$;")"
 9010 GOSUB 9:FOR J=1 TO LEN(M$):IF X$=MID$(M$,J,1)THEN 9025
 9015 NEXT:IF X$=""THEN 5000
 9020 GOTO 9000
 9025 PRINT:ON J GOSUB 7410,7560,7710,7860:FOR I=1 TO Z(J)
 9030 ON J GOSUB 7530,7680,7830,7980:NEXT
 9035 PRINT "* INDEX ?":GOSUB 9:K=X:IF K=0 THEN 9000
 9040 ON J GOSUB 7420,7570,7720,7870:GOTO 9035
 9700!START LOESEN LINEARER GLS
 9705 WINDOW 0,22,0,39:CLS
 9710 PRINT "ANZAHL UNBEKANNTE: ";:GOSUB 9:N=X:PRINT X
 9715 DIM A(N,N):DIM B(N):DIM P(N):P1=1E-12
 9720 FOR I=1 TO N:P(I)=I:FOR J=1 TO N:PRINT "A(";I;J;")=";:GOSUB 9:A(I,J)=X
 9725 PRINT X;"  ";:NEXT:PRINT "B(";I;")=";:GOSUB 9:B(I)=X:PRINT X:NEXT
 9730 GOSUB 35:PRINT "LOESUNG: ":FOR I=1 TO N:PRINT "X(";I;")=";B(I),:NEXT:STOP
 9900!INPUT-UP
 9905 X$="":PRINT AT(23,0);"                                       "
 9910 Y$=INKEY$:IF Y$<>"?"THEN 9920
 9915 CLS:GOTO 9905
 9920 IF Y$=CHR$(13)THEN 9935
 9925 IF Y$=","THEN 9905
 9930 X$=X$+Y$:PRINT AT(23,0);X$:GOTO 9910
 9935 X=VAL(X$):RETURN