PERSONAL RECORD KEEPING Basic Calls and Source code
This long page contains a the TI BASIC source code of the TI99/4a Personal Record Keeping module.
The module source was written in BASIC with CALLs to GPL routines - the CALLs are available from your own TI Basic programs when the module is inserted. TI BASIC DISPLAY AT, ACCEPT AT and a simple and quick TI BASIC screen dump and much more.
Here is a description of ALL of the CALLs, the better known alphabetic ones (beginning with CALL A) and CALLs with a single character in the range hex 04 to 0C.
On this page is the module source code. The GPL routines themselves are not listed.
You can download the TI disks from Jan in PC99 format. There is one disk each for the two modules, PRK and Stats, which includes these notes and source code plus the full program lines in merge format ready to be added to your own program and then edited. Use TIDIR to convert these disks to v9t9 format.
The easy way to enter CALL
0
b (K) : Jan's PRK disk and also his Stats disk.
NOTE: CALL >04 is the format used below to describe a CALL to a SINGLE CHARACTER having an ASCII value of 4. You can't easily key this in using the keyboard. The disks from Jan include merge format portions of the program. Using Extended Basic you can merge these into your own program and then edit them to fit. Write your program as if you were using TI Basic, as you will need the PRK module in place to use the extra calls, and will only have TI BASIC! You can also use a "program that writes programs" or write your program in DV80 text format (TI Writer can easily insert a CHAR >04 in control mode) and then load it with TEXTLOADER.
The initialisation routine is below - this is as used by the module but your TI Basic program should just DIMension the arrays as indicated. Arrays are numeric: A,B,C,D,E,F,G,H,I and String @$,A$,B$,C$,D$. The variable names listed are as used the in PRK Source.
CALL >09 does not seem to function from TI BASIC: its purpose seems to be to set aside memory for the variables and index those locations. When you type in your own TI BASIC program, the interpreter scans your code and does this for you. You still need to DIMension those arrays!
20 CALL >09
30 OPTION BASE 1
40 DIM @$(15),A$(5),B$(15),C$(5),D$(5)
50 E$=F$&G$&H$&I$&J$&K$
60 @=0
70 DIM A(30),B(30),C(15),D(15),E(5),F(5),G(5),H(5),I(15)
80 J=K+L+M+N+O+P+Q+R+S+T+U+V+W+X+Y+Z+[+\+]+A@+AA+AB+AC+AD+AE
90 AF=AG+AH+AI+AJ+AK+AL+AM
164 J=1
165 K=2
166 L=3
171 M=9.9999999999999E+127
173 N=LOG(10)
220 CALL >05(K)
225 CALL A(13,16,K,O,P,J,31)
230 IF O>J THEN 225
240 CALL H(Q,L,Q,P)
255 CALL A(14,16,K,O,R,J,31)
258 IF O=4 THEN 220
260 IF O>J THEN 255
270 CALL H(Q,K,Q,R)
285 CALL A(15,18,K,O,S,79,99)
288 IF O=4 THEN 220
290 IF O>J THEN 285
300 CALL H(Q,4,Q,S)
310 CALL >05(98)
320 GOSUB 6300
325 ON T GOTO 330,390,320,320,220
330 CALL >05(93)
340 CALL A(13,J,28,O,E$)
345 ON O GOTO 355,340,340,310,340,340,220
355 CALL >08(E$,O)
360 IF O THEN 390
370 GOSUB 14300
375 GOTO 310
390 CALL >05(J)
425 GOSUB 10060
435 ON U GOTO 525,25005,310
525 GOSUB 6740
540 CALL >05(6)
550 CALL A(13,16,9,O,F$)
560 ON O GOTO 580,550,550,540,550,550,390
580 CALL H(Q,J,Q,F$)
620 V=J
640 FOR W=J TO 15
660 CALL >05(7)
670 CALL D(7,14,L,W)
673 IF V THEN 680
675 CALL H(J,9,W,F$)
677 CALL D(9,15,9,F$)
680 CALL A(9,15,9,O,F$)
690 ON O GOTO 780,680,680,660,680,680,720
720 IF W-J THEN 1330
760 IF V THEN 540 ELSE 1340
780 CALL H(Q,9,W,F$)
800 CALL >05(8)
802 IF V THEN 840
804 CALL H(J,10,W,U)
806 CALL >0A(U,F$)
808 CALL D(11,15,4,F$)
840 GOSUB 10068
845 IF U>X THEN 840
860 CALL H(Q,10,W,U)
865 CALL >0A(U,F$)
867 CALL D(11,15,4,F$)
880 ON U GOTO 910,990,1000,1130
910 CALL >05(13)
913 IF V THEN 920
915 CALL H(J,11,W,R)
917 CALL D(14,21,L,R)
920 CALL A(14,22,K,O,R,J,15)
930 ON O GOTO 950,920,920,660,920,920,920
950 CALL H(Q,11,W,R)
960 GOTO 1310
990 CALL >05(9)
995 GOTO 1010
1000 CALL >05(10)
1010 IF V THEN 1050
1030 CALL H(J,11,W,R)
1040 CALL D(14,21,L,R)
1050 CALL A(14,22,K,O,R,U-J,U+8)
1060 ON O GOTO 1090,1050,1050,660,1050,1050,1050
1090 CALL H(Q,11,W,R)
1100 IF U=K THEN 1310
1130 CALL >05(12)
1133 IF V THEN 1140
1135 CALL H(J,12,W,S)
1137 CALL D(14,21,L,S)
1140 CALL A(14,22,K,O,S,4-U,-5*U+25)
1150 ON O GOTO 1165,1140,1140,660,1140,1140,1140
1165 IF U=4 THEN 1270
1170 IF R<=S THEN 1140
1270 CALL H(Q,12,W,S)
1310 IF V=Q THEN 1340
1320 NEXT W
1330 CALL H(Q,5,W-J,W)
1340 CALL H(J,5,Q,Y)
1360 GOSUB 11400
1380 CALL >05(106)
1382 CALL >04(Z)
1384 CALL D(22,22,6,Z)
1400 GOSUB 6300
1420 ON T GOTO 1550,1450,1360,1400,1400
1450 V=Q
1470 CALL >05(86)
1480 CALL A(24,15,K,O,W,J,Y)
1490 ON O GOTO 660,1480,1480,1360,1480,1480,1360
1550 CALL H(J,6,Q,[)
1552 CALL H(J,5,Q,Y)
1553 IF Y<16 THEN 1556
1554 Y=15
1556 \=J
1558 CALL >04(Z)
1570 CALL >05(20)
1590 X=8
1610 GOSUB 10080
1611 IF U>X THEN 1610
1612 IF(U<L)+(U>6)+([>Q)THEN 1630
1614 CALL >05(15)
1616 GOSUB 10020
1618 IF U=13 THEN 1570 ELSE 1616
1630 ON U GOTO 1680,2030,163
5,2570,20020,1638,25400,25600
1635 GOSUB 2310
1636 GOTO 1550
1638 GOSUB 4040
1640 GOTO 1550
1680 CALL >05(87)
1700 CALL H(J,J,Q,F$)
1720 CALL D(6,14,9,F$,8,14,8,G$)
1890 CALL D(10,13,L,Y,12,13,6,[,14,13,6,Z-[)
1910 GOSUB 10020
1930 IF U=13 THEN 1950
1932 IF U=15 THEN 1550
1933 IF U-12 THEN 1910
1934 @=15
1937 GOSUB 26000
1938 CALL >05(103)
1940 IF \ THEN 1910 ELSE 1680
1950 GOSUB 11400
1960 CALL >05(102)
1980 GOSUB 10020
2000 IF U=15 THEN 1550
2001 IF U-12 THEN 1980
2003 @=Y+6
2005 GOSUB 26000
2007 CALL >05(102)
2008 IF \ THEN 1980 ELSE 1950
2030 IF [>=Z THEN 2272
2040 CALL >05(34)
2090 GOSUB 11660
2113 FOR ]=[+J TO Z
2117 CALL D(4,13,9,])
2170 V=Q
2190 GOSUB 11870
2210 IF O=7 THEN 1550
2250 CALL >05(49)
2270 NEXT ]
2272 CALL >05(107)
2274 GOSUB 10020
2276 IF U=13 THEN 1550 ELSE 2274
2310 A@=U
2315 IF A@>J THEN 2330
2320 CALL >05(26)
2325 GOTO 2340
2330 CALL >05(22)
2340 ]=Q
2360 GOSUB 11660
2380 CALL >05(88)
2390 CALL A(4,14,5,O,],J,[)
2400 ON O GOTO 2420,2390,2460,2315,2510,2390,2535
2420 GOSUB 10170
2440 GOTO 2390
2460 GOSUB 10410
2465 ]=Q
2480 GOTO 2315
2510 GOSUB 11120
2530 IF \ THEN 2380 ELSE 2315
2535 RETURN
2570 ]=Q
2580 CALL >05(35)
2620 GOSUB 10064
2640 ON U GOTO 2660,2940,3410,1550
2660 CALL >05(36)
2665 \=J
2700 GOSUB 11660
2720 CALL >05(88)
2730 CALL A(4,14,5,O,],J,[)
2740 ON O GOTO 2830,2730,2760,2660,2800,2730,1550
2760 GOSUB 10410
2765 ]=Q
2780 IF \ THEN 2660 ELSE 2570
2800 GOSUB 11120
2810 IF \ THEN 2720 ELSE 2570
2830 GOSUB 10170
2850 CALL >05(105)
2880 V=J
2900 GOSUB 11870
2905 GOTO 2720
2940 CALL >05(37)
2980 GOSUB 10060
3000 V=Q
3020 ON U GOTO 3160,3040,2570
3040 CALL >05(30)
3050 GOSUB 13200
3055 IF AA=Q THEN 2570
3057 V=K
3058 IF AA=J THEN 3160
3090 CALL >05(83)
3130 GOSUB 10060
3135 IF U>X THEN 2940
3150 V=U
3160 CALL >0B(J)
3162 IF @=Q THEN 3176
3163 GOSUB 9000
3164 CALL >05(55)
3168 GOSUB 10064
3170 ON U GOTO 3176,3196,3172,2940
3172 GOSUB 8000
3174 GOTO 3164
3176 GOSUB 12115
3178 IF @=Q THEN 2570
3180 CALL >05(56)
3184 GOSUB 10068
3186 ON U GOTO 3188,3196,3192,3192,2570
3188 GOSUB 8000
3190 GOTO 3180
3192 CALL >0B(Q)
3194 IF U=L THEN 1550
3196 CALL >05(48)
3200 IF V THEN 3290
3220 FOR ]=J TO [
3240 GOSUB 13500
3250 NEXT ]
3270 GOTO 1550
3290 FOR ]=J TO [
3310 GOSUB 14050
3330 IF U=Q THEN 3360
3350 GOSUB 13500
3360 NEXT ]
3380 GOTO 1550
3410 CALL >05(50)
3450 GOSUB 11660
3460 CALL HCHAR(22,L,32,28)
3463 CALL HCHAR(4,16,32,5)
3467 CALL A(4,14,5,O,],J,[)
3470 ON O GOTO 3490,3467,3467,3467,3467,3467,1550
3490 GOSUB 10170
3510 CALL >05(51)
3530 GOSUB 6300
3550 ON T GOTO 3560,3460,3410,3530,1550
3560 CALL >06(])
3565 [=[-J
3580 CALL >05(49)
3590 IF [ THEN 3460 ELSE 1550
4040 A@=U
4045 IF A@>K THEN 4060
4050 CALL >05(3)
4055 GOTO 4063
4060 CALL >05(5)
4063 IF E$="" THEN 4080
4065 CALL D(13,J,28,E$)
4080 CALL A(13,J,28,O,E$)
4090 ON O GOTO 4110,4080,4080,4045,4080,4080,5620
4110 CALL >08(E$,O)
4140 IF O THEN 4210
4160 GOSUB 14300
4190 GOTO 4045
4210 CALL >05(94)
4213 IF AB=Q THEN 4230
4215 CALL D(17,24,4,AB)
4230 CALL A(17,25,L,O,AB,30,132)
4240 ON O GOTO 4242,4230,4230,4045,4230,4230,5620
4242 CALL >05(96)
4246 CALL A(22,J,20,O,H$)
4247 ON O GOTO 4260,4250,4246,4045,4246,4246,5620
4250 H$=""
4260 CALL >05(52)
4300 GOSUB 10064
4335 ON U GOTO 4360,4850,4620,5620
4360 CALL >05(95)
4365 GOSUB 5629
4380 FOR W=J TO Y
4390 CALL H(J,9,W,F$)
4400 B$(W)=STR$(W)&"."&F$
4410 IF W>9 THEN 4430
4420 B$(W)=" "&B$(W)
4430 NEXT W
4450 FOR ]=J TO [
4465 CALL >0A(Q,F$)
4470 PRINT #J: :F$,STR$(])
4475 PRINT #J:"______",SEG$(
"_____",J,LEN(STR$(])))
4490 FOR W=J TO Y
4510 GOSUB 5860
4530 PRINT #J:B$(W),I$
4550 GOSUB 5660
4560 IF O THEN 5600
4570 NEXT W
4580 NEXT ]
4590 GOTO 5600
4620 CALL >05(53)
4660 GOSUB 11680
4680 FOR W=J TO Y
4700 CALL A(21,15,K,O,A(W),J,Y)
4710 ON O GOTO 4730,4700,4700,4620,4700,4700,4800
4730 CALL D(A(W)+5,5,J,STR$(W))
4750 CALL HCHAR(22,11,32,K)
4760 NEXT W
4800 @=W-J
4820 IF @ THEN 4900 ELSE 4260
4850 @=Y
4860 FOR AC=J TO @
4870 A(AC)=AC
4880 NEXT AC
4900 CALL >05(95)
4905 GOSUB 5629
4908 CALL >0A(5,F$)
4910 PRINT #J: :TAB(L);F$
4915 CALL >0A(6,F$)
4920 PRINT #J:TAB(L);F$
4930 AC=L
4940 FOR W=J TO Y
4950 CALL H(J,9,W,F$)
4960 IF W<10 THEN 4980
4970 AC=K
4980 PRINT #J:TAB(AC);STR$(W);" = ";F$
4990 GOSUB 5660
5000 IF O THEN 5600
5010 NEXT W
5030 AA=LEN(STR$([))
5050 AD=J
5060 F$="_______________"
5070 I$=" "&SEG$(F$,J,AA)
5075 PRINT #J: : :TAB(J+(INT(.5+AA/K)));"0";
5080 AE=AA+J
5120 FOR W=AD TO @
5175 CALL H(J,10,A(W),P)
5180 CALL H(J,11,A(W),R)
5182 IF P=J THEN 5200
5184 R=R+J
5200 IF AE+R+J>AB THEN 5290
5220 I$=I$&" "&SEG$(F$,J,R)
5240 PRINT #J:TAB(AE+J+(INT(.5+R/2)));STR$(A(W));
5260 AE=AE+J+R
5270 NEXT W
5290 AF=W-J
5310 PRINT #J: :I$
5320 GOSUB 5660
5330 IF O THEN 5600
5350 FOR ]=J TO [
5353 I$=STR$(])
5355 PRINT #J:SEG$(" ",J
,J+AA-LEN(I$))&I$;
5360 FOR AC=AD TO AF
5420 W=A(AC)
5440 GOSUB 5860
5460 GOSUB 6170
5480 PRINT #J:" "&I$;
5490 GOSUB 5660
5500 IF O THEN 5600
5510 NEXT AC
5530 PRINT #J:
5540 NEXT ]
5560 AD=AF+J
5580 IF AD<=@ THEN 5060
5600 PRINT #J:
5605 CLOSE #J
5620 RETURN
5629 OPEN #J:E$,OUTPUT
5630 CALL >0A(7,F$)
5631 PRINT #J: :F$;
5632 CALL H(J,J,Q,F$)
5633 PRINT #J:F$
5634 CALL >0A(8,I$)
5636 F$=G$
5639 GOSUB 6740
5640 PRINT #J:I$;G$
5642 G$=F$
5643 CALL >0A(9,F$)
5645 PRINT #J:F$;H$
5647 RETURN
5660 O=Q
5680 CALL KEY(Q,U,T)
5690 IF T=Q THEN 5810
5710 CALL >05(47)
5730 GOSUB 10020
5750 IF U=15 THEN 5800
5770 IF U-13 THEN 5730
5790 CALL >05(95)
5800 O=U-13
5810 RETURN
5860 CALL H(J,10,W,P)
5870 CALL H(J,11,W,R)
5880 I$=" "
5890 IF P-J THEN 5920
5900 CALL G(J,],W,O,I$)
5910 GOTO 6140
5920 CALL H(J,12,W,S)
5930 CALL G(J,],W,O,AG)
5940 IF O THEN 6140
5950 IF P=4 THEN 6020
5960 I$=STR$(AG)
5970 IF P=K THEN 6140
5980 IF POS(I$,".",J)THEN 6000
5990 I$=I$&"."
6000 I$=SEG$(I$&"0000000
000",J,POS(I$,".",J)+S)
6010 GOTO 6140
6020 IF AG THEN 6060
6030 I$="0."
6040 F$="E+00"
6050 GOTO 6135
6060 U=INT(LOG(ABS(AG))/N)
6065 AG=AG/(10^U)
6070 AG=SGN(AG)*INT(ABS(AG*10^S)+.5)/10^S
6075 IF AG<10 THEN 6090
6080 U=U+J
6085 AG=AG/10
6090 I$=STR$(AG)
6100 IF POS(I$,".",J)THEN 6115
6110 I$=I$&"."
6115 F$=STR$(ABS(U))
6120 IF LEN(F$)>J THEN 6130
6125 F$="0"&F$
6130 F$="E"&SEG$("-++",2+SGN(U),J)&F$
6135 I$=SEG$(I$&"00000",J,P
OS(I$,".",J)+S)&F$
6140 RETURN
6170 IF LEN(I$)>R THEN 6230
6180 F$=" "
6190 IF P-J THEN 6220
6200 I$=I$&SEG$(F$,J,R-LEN(I$))
6210 GOTO 6230
6220 I$=SEG$(F$,J,J+R-LEN(I$))&I$
6230 RETURN
6300 GOSUB 10020
6320 IF U=ASC("Y")THEN 6430
6322 IF U=ASC("1")THEN 6430
6324 IF U=ASC("2")THEN 6420
6330 IF U=ASC("N")THEN 6420
6340 IF U=6 THEN 6410
6350 IF U=12 THEN 6400
6370 IF U-15 THEN 6300
6380 T=T+J
6400 T=T+J
6410 T=T+J
6420 T=T+J
6430 RETURN
6740 CALL H(J,L,Q,AE)
6750 CALL H(J,K,Q,O)
6760 CALL H(J,4,Q,X)
6770 G$=STR$(AE)&"/"&STR$(O)&"/"&STR$(X)
6815 RETURN
7000 IF @$(AC)="M" THEN 7170
7003 IF I(AC)=Q THEN 7180
7010 CALL H(J,10,AC,P)
7020 CALL H(J,11,AC,R)
7030 CALL H(J,12,AC,S)
7040 ON P-J GOTO 7050,7075,7110
7050 I(AC)=SGN(I(AC))*INT(ABS(I(AC))+.5)
7060 AD=(10^R)-J
7070 GOTO 7160
7075 IF ABS(I(AC))>1E11 THEN 7170
7080 I(AC)=SGN(I(AC))*INT(ABS(I(AC)*10^S)+.5)/10^S
7090 AD=(10^-S)*((10^(R-J))-J)
7100 GOTO 7160
7110 U=INT(LOG(ABS(I(AC)))/N)
7120 I(AC)=I(AC)/(10^U)
7130 I(AC)=SGN(I(AC))*INT(ABS(I(AC)*10^S)+.5)/10^S
7135 IF(I(AC)>=10)+(U=127)=-K THEN 7170
7140 I(AC)=I(AC)*(10^U)
7150 GOTO 7180
7160 IF(I(AC)>AD)+(I(AC)<-AD)=Q THEN 7180
7170 X=K
7175 @$(AC)="A"
7180 RETURN
8000 AC=Q
8010 CALL >05(89)
8020 FOR W=J TO 5
8025 AC=AC+J
8030 H$=""
8040 J$=""
8050 CALL H(J,9,B(AC),K$)
8060 IF A(AC)>16 THEN 8110
8062 IF A(15+AC)THEN 8070
8064 H$=STR$(C(AC))
8066 GOTO 8080
8070 CALL H(J,9,A(15+AC),H$)
8080 IF A(AC)=J THEN 8110
8090 IF A(AC)>6 THEN 8110
8092 IF B(15+AC)THEN 8100
8094 J$=STR$(D(AC))
8096 GOTO 8110
8100 CALL H(J,9,B(15+AC),J$)
8110 CALL D(K+L*W,J,28,K$&" =")
8112 IF A(AC)<7 THEN 8140
8115 CALL >0A(A(AC)+L,F$)
8120 IF LEN(H$)THEN 8135
8125 H$=F$
8130 GOTO 8140
8135 H$=F$&"("&H$&")"
8140 CALL D(L+L*W,J,28,H$)
8150 IF LEN(J$)=Q THEN 8180
8160 CALL D(L+L*W,K+LEN(H$),
J,SEG$("+-X/^",A(AC)-J,J))
8170 CALL D(L+L*W,4+LEN(H$),LEN(J$),J$)
8180 IF AC=@ THEN 8200
8190 NEXT W
8200 CALL >05(85)
8210 GOSUB 10020
8220 IF U-13 THEN 8210
8230 IF AC<@ THEN 8010
8240 RETURN
9000 FOR W=J TO Y
9010 @$(W)=""
9020 NEXT W
9030 FOR AC=J TO @
9040 @$(B(AC))="A"
9050 IF A(15+AC)=Q THEN 9070
9060 @$(A(15+AC))="A"
9070 IF B(15+AC)=Q THEN 9090
9080 @$(B(15+AC))="A"
9090 NEXT AC
9100 RETURN
10020 CALL KEY(Q,U,T)
10030 IF T-J THEN 10020
10040 RETURN
10060 X=K
10062 GOTO 10080
10064 X=L
10066 GOTO 10080
10068 X=4
10070 GOTO 10080
10080 GOSUB 10020
10084 IF U-15 THEN 10100
10086 U=X+J
10087 GOTO 10130
10100 U=U-48
10120 IF(U<J)+(U>X)THEN 10080
10130 RETURN
10170 FOR W=J TO Y
10190 CALL HCHAR(W+5,16,32,15)
10210 GOSUB 5860
10350 CALL D(W+5,14,R+J,I$)
10360 NEXT W
10370 RETURN
10410 CALL >05(62)
10440 GOSUB 11680
10450 CALL A(22,15,K,O,W,J,Y)
10460 ON O GOTO 10480,10450,
10450,10450,10450,10450,11080
10480 CALL H(J,9,W,F$)
10510 CALL >05(63)
10530 CALL D(4,8,9,F$)
10560 AC=J
10580 FOR ]=AC TO AC+14
10600 CALL HCHAR(]-AC+6,L,32,28)
10620 IF ]>[ THEN 10840
10640 F$=STR$(])
10660 CALL D(]-AC+6,6-LEN(F$),5,F$)
10680 GOSUB 5860
10700 IF P-J THEN 10830
10740 CALL D(]-AC+6,8,R,I$)
10750 GOTO 10840
10830 CALL D(]-AC+6,9+R-LEN(I$),R+J,I$)
10840 NEXT ]
10910 GOSUB 10020
10930 IF U-11 THEN 11000
10950 IF AC+15<=[ THEN 10970
10960 AC=-14
10970 AC=AC+15
10980 GOTO 10580
11000 IF U-10 THEN 11070
11020 IF AC>15 THEN 11040
11022 IF(AC=J)+([>14)=-K THEN 11030
11024 AC=J
11025 GOTO 10580
11030 AC=[+J
11040 AC=AC-15
11050 GOTO 10580
11070 IF U=15 THEN 11080
11072 IF U-80 THEN 10910
11074 @=20
11076 GOSUB 26010
11077 IF \ THEN 10910
11080 RETURN
11120 CALL >05(23)
11140 GOSUB 10020
11160 IF U-11 THEN 11230
11180 IF ]<[ THEN 11200
11190 ]=Q
11200 ]=]+J
11210 GOTO 11275
11230 IF U-10 THEN 11350
11250 IF ]>J THEN 11270
11260 ]=[+J
11270 ]=]-J
11275 CALL HCHAR(4,16,32,5)
11290 CALL D(4,13,6,])
11310 GOSUB 10170
11330 GOTO 11140
11350 IF U=15 THEN 11360
11353 IF U-80 THEN 11140
11355 @=Y+6
11357 GOSUB 26010
11358 IF \ THEN 11140
11360 RETURN
11400 CALL >05(21)
11440 GOSUB 11660
11460 FOR W=J TO Y
11480 CALL H(J,10,W,P)
11490 CALL >0A(P,F$)
11510 CALL D(W+5,14,4,F$)
11530 CALL H(J,11,W,R)
11570 CALL D(W+5,22-LEN(STR$
(R)),K,STR$(R))
11590 CALL H(J,12,W,S)
11610 CALL D(W+5,27-LEN(STR$
(S)),K,STR$(S))
11620 NEXT W
11630 RETURN
11660 X=L
11670 GOTO 11690
11680 X=10
11690 FOR W=J TO Y
11700 F$=STR$(W)
11720 CALL D(W+5,X-LEN(F$),2,F$)
11730 CALL H(J,9,W,F$)
11750 CALL D(W+5,X+J,9,F$)
11760 NEXT W
11770 RETURN
11870 FOR W=J TO Y
11890 CALL H(J,10,W,P)
11910 CALL H(J,11,W,R)
11930 IF P-J THEN 12010
11950 CALL A(W+5,14,R,O,F$,W)
11960 ON O GOTO 11980,12070,
11950,11870,11950,11950,12093
11980 CALL G(Q,],W,F$)
11990 GOTO 12080
12010 CALL A(W+5,14,R,O,AG,W)
12020 ON O GOTO 12040,12070,
12010,11870,12010,12010,12093
12040 CALL G(Q,],W,AG)
12050 GOTO 12080
12070 CALL G(K,],W,AG)
12080 NEXT W
12082 IF V THEN 12098
12085 CALL H(Q,6,Q,])
12090 GOTO 12098
12093 IF V THEN 12098
12095 IF W-J THEN 11930
12097 CALL H(Q,6,Q,]-J)
12098 RETURN
12115 FOR W=J TO Y
12116 @$(W)=""
12118 NEXT W
12125 FOR @=J TO 15
12135 CALL >05(38)
12137 H$=""
12139 J$=""
12145 CALL A(23,22,K,O,A(@),J,18)
12155 ON O GOTO 12165,12145,
12145,12135,12145,12145,12720
12165 CALL >05(89)
12185 GOSUB 11680
12195 F$=STR$(@)
12205 CALL D(21,L-LEN(F$),L,F$&".")
12215 CALL >05(63+A(@))
12225 CALL >05(39)
12235 GOSUB 12800
12238 IF O=7 THEN 12135
12245 B(@)=AC
12255 K$=F$
12265 IF A(@)>16 THEN 12545
12275 CALL >05(40)
12285 GOSUB 6300
12295 ON T GOTO 12365,12310,12285,12285,12135
12310 CALL >05(41)
12320 GOSUB 12800
12324 IF O=7 THEN 12135
12330 A(15+@)=AC
12340 H$=F$
12345 GOTO 12405
12365 A(15+@)=Q
12375 CALL >05(42)
12385 CALL A(23,15,15,O,C(@))
12388 IF O=7 THEN 12135
12390 IF O>J THEN 12385
12395 H$=STR$(C(@))
12405 IF(A(@)<K)+(A(@)>6)THEN 12545
12415 CALL >05(43)
12425 GOSUB 6300
12435 ON T GOTO 12505,12450,12425,12425,12135
12450 CALL >05(44)
12460 GOSUB 12800
12464 IF O=7 THEN 12135
12470 B(15+@)=AC
12480 J$=F$
12485 GOTO 12545
12505 B(15+@)=Q
12515 CALL >05(45)
12525 CALL A(23,15,15,O,D(@))
12528 IF O=7 THEN 12135
12530 IF O>J THEN 12525
12535 J$=STR$(D(@))
12545 CALL >05(105)
12565 CALL D(21,J,28,K$&" =")
12570 IF A(@)<7 THEN 12605
12575 CALL >0A(A(@)+L,F$)
12580 IF LEN(H$)THEN 12600
12585 A(15+@)=Q
12590 H$=F$
12595 GOTO 12605
12600 H$=F$&"("&H$&")"
12605 CALL D(22,J,LEN(H$),H$)
12610 IF LEN(J$)=Q THEN 12665
12615 CALL D(22,K+LEN(H$),J,SEG$("+-X/^",A(@)-J,J))
12620 CALL D(22,4+LEN(H$),LEN(J$),J$)
12665 CALL >05(46)
12675 GOSUB 6300
12685 ON T GOTO 12710,12135,12675,12675,12135
12710 NEXT @
12720 @=@-J
12730 RETURN
12795 CALL >05(92)
12800 CALL A(23,24,K,O,AC,J,Y)
12805 CALL HCHAR(24,L,32,28)
12807 IF O=7 THEN 12875
12810 IF O>J THEN 12800
12820 CALL H(J,10,AC,P)
12830 IF P=J THEN 12795
12840 @$(AC)="A"
12860 CALL H(J,9,AC,F$)
12875 RETURN
13200 GOSUB 11680
13230 FOR AA=J TO 5
13240 D$(AA)=""
13250 H(AA)=Q
13260 CALL >05(82)
13270 CALL A(21,27,K,O,G(AA),Q,Y)
13280 ON O GOTO 13290,13270,
13270,13240,13270,13270,13460
13290 IF G(AA)=Q THEN 13310
13300 CALL H(J,10,G(AA),H(AA))
13310 CALL >05(31)
13320 IF H(AA)-J THEN 13350
13330 CALL A(23,12,15,O,C$(AA))
13340 ON O GOTO 13380,13341,
13330,13240,13330,13330,13240
13341 C$(AA)=""
13342 F(AA)=-M
13343 D$(AA)="M"
13344 GOTO 13380
13350 CALL A(23,12,15,O,F(AA))
13360 ON O GOTO 13375,13370,
13350,13240,13350,13350,13240
13370 IF G(AA)=Q THEN 13350 ELSE 13342
13375 IF G(AA)THEN 13380
13376 IF INT(F(AA))-F(AA)THEN 13350
13380 CALL >05(32)
13390 IF H(AA)-J THEN 13420
13400 CALL A(23,13,15,O,A$(AA))
13410 ON O GOTO 13450,13411,
13400,13240,13400,13400,13240
13411 IF D$(AA)="M" THEN 13450
13412 A$(AA)="_____"
13413 GOTO 13450
13420 CALL A(23,13,15,O,E(AA))
13430 ON O GOTO 13435,13431,
13420,13240,13420,13420,13240
13431 IF G(AA)=Q THEN 13420
13432 E(AA)=M
13433 GOTO 13450
13435 IF G(AA)THEN 13450
13436 IF INT(E(AA))-E(AA)THEN 13420
13450 NEXT AA
13460 AA=AA-J
13470 RETURN
13500 FOR AC=J TO Y
13505 IF @$(AC)="" THEN 13525
13510 CALL G(J,],AC,AH,I(AC))
13515 IF AH=Q THEN 13525
13520 @$(AC)="M"
13525 NEXT AC
13530 FOR AC=J TO @
13535 IF A(15+AC)=Q THEN 13550
13540 IF @$(A(15+AC))="M" THEN 13935
13545 C(AC)=I(A(15+AC))
13550 IF(A(AC)<K)+(A(AC)>6)THEN 13570
13555 IF B(15+AC)=Q THEN 13570
13560 IF @$(B(15+AC))="M" THEN 13935
13565 D(AC)=I(B(15+AC))
13570 IF A(AC)>9 THEN 13755
13575 ON A(AC)GOTO 13580,135
90,13615,13640,13660,
13685,13715,13725,13740
13580 I(B(AC))=C(AC)
13585 GOTO 13885
13590 IF C(AC)>Q THEN 13600
13595 IF D(AC)>-M-C(AC)THEN 13605 ELSE 13935
13600 IF D(AC)>M-C(AC)THEN 13935
13605 I(B(AC))=C(AC)+D(AC)
13610 GOTO 13885
13615 IF C(AC)>Q THEN 13625
13620 IF D(AC)<M+C(AC)THEN 13630 ELSE 13935
13625 IF D(AC)<C(AC)-M THEN 13935
13630 I(B(AC))=C(AC)-D(AC)
13635 GOTO 13885
13640 IF ABS(C(AC))<J THEN 13650
13645 IF ABS(D(AC))>M/ABS(C(AC))THEN 13935
13650 I(B(AC))=C(AC)*D(AC)
13655 GOTO 13885
13660 IF D(AC)=Q THEN 13935
13665 IF ABS(C(AC))<J THEN 13675
13670 IF ABS(D(AC))<ABS(C(AC))/M THEN 13935
13675 I(B(AC))=C(AC)/D(AC)
13680 GOTO 13885
13685 IF(C(AC)=Q)+(D(AC)<Q)=-2 THEN 13935
13687 IF C(AC)=Q THEN 13705
13690 IF(C(AC)<Q)+(INT(D(AC))<>D(AC))=-2 THEN 13935
13695 IF LOG(ABS(C(AC)))<J THEN 13705
13700 IF ABS(D(AC))>LOG(M)/LOG(ABS(C(AC)))THEN 13935
13705 I(B(AC))=C(AC)^D(AC)
13710 GOTO 13885
13715 I(B(AC))=ABS(C(AC))
13720 GOTO 13885
13725 IF C(AC)<=Q THEN 13935
13730 I(B(AC))=LOG(C(AC))/N
13735 GOTO 13885
13740 IF C(AC)<=Q THEN 13935
13745 I(B(AC))=LOG(C(AC))
13750 GOTO 13885
13755 O=A(AC)-9
13760 ON O GOTO 13765,13780,
13790,13815,13830,1
3845,13855,13865,13875
13765 IF C(AC)>294.73089190314 THEN 13935
13770 I(B(AC))=EXP(C(AC))
13775 GOTO 13885
13780 I(B(AC))=ATN(C(AC))
13785 GOTO 13885
13790 IF ABS(C(AC))>=1.5707963266375E+10 THEN 13935
13795 X=1.570796326795
13800 IF ABS(C(AC)-(X*INT(C(
AC)/X)))<5.1E-13 THEN 13935
13805 I(B(AC))=TAN(C(AC))
13810 GOTO 13885
13815 IF ABS(C(AC))>=1.5707963266375E+10 THEN 13935
13820 I(B(AC))=SIN(C(AC))
13825 GOTO 13885
13830 IF ABS(C(AC))>=1.5707963266375E+10 THEN 13935
13835 I(B(AC))=COS(C(AC))
13840 GOTO 13885
13845 I(B(AC))=INT(C(AC))
13850 GOTO 13885
13855 I(B(AC))=SGN(C(AC))
13860 GOTO 13885
13865 I(B(AC))=3.14159265359
13870 GOTO 13885
13875 RANDOMIZE
13880 I(B(AC))=RND
13885 @$(B(AC))="A"
13890 NEXT AC
13895 FOR AC=J TO Y
13900 IF @$(AC)="" THEN 13925
13915 X=Q
13917 GOSUB 7000
13920 CALL G(X,],AC,I(AC))
13925 NEXT AC
13930 RETURN
13935 @$(B(AC))="M"
13955 GOTO 13890
14050 U=Q
14060 FOR AC=J TO AA
14070 IF G(AC)THEN 14100
14080 X=]
14090 GOTO 14240
14100 IF H(AC)-J THEN 14210
14110 CALL G(J,],G(AC),AH,F$)
14120 IF AH=Q THEN 14180
14130 IF D$(AC)="M" THEN 14150
14140 IF V=J THEN 14270 ELSE 14260
14150 IF V=J THEN 14260 ELSE 14264
14180 IF D$(AC)="M" THEN 14140
14190 IF F$>A$(AC)THEN 14140
14200 IF F$<C$(AC)THEN 14140 ELSE 14150
14210 CALL G(J,],G(AC),AH,X)
14220 IF AH THEN 14130
14230 IF D$(AC)="M" THEN 14140
14240 IF X<F(AC)THEN 14140
14250 IF X>E(AC)THEN 14140 ELSE 14150
14260 NEXT AC
14262 IF V=K THEN 14270
14264 U=J
14266 AI=AI+J
14270 RETURN
14300 CALL >05(18)
14310 GOSUB 10020
14320 IF U-13 THEN 14310
14330 RETURN
20020 CALL >05(24)
20050 GOSUB 10060
20055 AI=[
20060 ON U GOTO 20510,20080,1550
20080 CALL >05(30)
20100 GOSUB 13200
20110 IF AA=Q THEN 20510
20112 V=J
20115 IF AA=J THEN 20155
20120 CALL >05(33)
20140 GOSUB 10060
20145 IF U>X THEN 20050
20150 V=U
20155 AI=Q
20158 CALL >05(104)
20160 FOR ]=J TO [
20170 GOSUB 14050
20180 IF U=Q THEN 20250
20190 IF AI=] THEN 20250
20240 CALL >07(AI,],[)
20250 NEXT ]
20510 IF AI THEN 20518
20512 CALL >05(11)
20515 GOTO 1616
20518 CALL >05(25)
20520 X=6
20530 GOSUB 10080
20540 ON U GOTO 20560,20560,
21010,22010,20620,1550,20020
20560 AJ=[
20570 [=AI
20575 IF U=J THEN 20580
20577 GOSUB 4040
20578 GOTO 20590
20580 GOSUB 2310
20590 [=AJ
20600 GOTO 20510
20620 CALL >05(61)
20640 GOSUB 11680
20650 CALL A(22,15,K,O,X,J,Y)
20655 CALL >05(84)
20660 ON O GOTO 20670,20650,
20650,20650,20650,20650,20510
20670 CALL H(J,10,X,P)
20680 IF P-J THEN 20690
20683 CALL >05(92)
20685 GOTO 20650
20690 AD=-M
20700 AF=M
20710 AK=Q
20720 AL=Q
20730 AG=Q
20740 FOR W=J TO AI
20750 CALL G(J,W,X,P,AE)
20760 IF P=J THEN 20860
20770 AG=AG+J
20780 AL=AL+AE
20790 IF AE<AD THEN 20810
20800 AD=AE
20810 IF AE>AF THEN 20850
20820 AF=AE
20850 AK=AK+AE*AE
20860 NEXT W
20862 CALL >05(90)
20865 IF AG=Q THEN 20940
20870 A@=AL/AG
20875 AK=AK-AG*A@*A@
20876 IF AG=J THEN 20885
20880 AK=SQR(AK/(AG-J))
20882 GOTO 20890
20885 AK=Q
20890 CALL H(J,9,X,F$)
20910 CALL D(8,17,9,F$,9,16,12,A@,10,16,12,AK)
20920 CALL D(11,16,12,AD,12,16,12,AF,13,16,12,AL)
20940 CALL D(14,16,5,AG,15,16,5,AI-AG)
20970 GOSUB 10020
20975 IF U=15 THEN 20620
20977 IF U-12 THEN 20970
20980 @=18
20982 GOSUB 26000
20985 GOTO 20620
21010 CALL >05(27)
21030 GOSUB 11680
21040 CALL A(21,15,K,O,X,J,Y)
21045 ON O GOTO 21050,21040,
21040,21010,21040,21040,20510
21050 CALL >05(28)
21060 GOSUB 10020
21070 IF U=49 THEN 21088
21080 IF U-50 THEN 21060
21084 CALL >05(100)
21086 GOTO 21090
21088 CALL >05(99)
21090 F$=CHR$(U)
21117 CALL H(J,10,X,AG)
21120 AL=AI
21130 FOR W=J TO AI
21135 IF W>AL THEN 21510
21137 IF AG=J THEN 21145
21140 CALL G(J,W,X,P,AE)
21142 GOTO 21150
21145 CALL G(J,W,X,P,K$)
21150 IF P=Q THEN 21180
21160 CALL >07(W,AL,[)
21170 AL=AL-J
21175 GOTO 21135
21180 NEXT W
21510 @=Q
21520 AF=J
21530 AD=AL
21540 W=AF
21550 AC=AD
21560 AH=-J
21565 IF AG=J THEN 21780
21570 CALL G(J,W,X,P,AE)
21580 CALL G(J,AC,X,P,O)
21585 IF F$="2" THEN 21595
21590 IF O<AE THEN 21600 ELSE 21620
21595 IF AE>=O THEN 21620
21600 CALL >07(W,AC,[+J)
21610 AH=-AH
21620 IF AH-J THEN 21650
21630 W=W+J
21640 GOTO 21660
21650 AC=AC-J
21660 IF W<AC THEN 21565
21670 IF W+J<AD THEN 21680 ELSE 21710
21680 @=@+J
21685 IF @>30 THEN 21510
21690 A(@)=W+J
21700 B(@)=AD
21710 AD=W-J
21720 IF AF<AD THEN 21540
21730 IF @=Q THEN 20510
21740 AF=A(@)
21750 AD=B(@)
21760 @=@-J
21770 GOTO 21540
21780 CALL G(J,W,X,P,K$)
21790 CALL G(J,AC,X,P,H$)
21800 IF F$="2" THEN 21820
21810 IF H$<K$ THEN 21600 ELSE 21620
21820 IF K$<H$ THEN 21600 ELSE 21620
22010 CALL >05(59)
22030 GOSUB 11680
22040 CALL A(21,15,K,O,X,J,Y)
22045 CALL HCHAR(24,L,32,28)
22050 ON O GOTO 22055,22040,
22040,22040,22040,22040,20510
22055 CALL H(J,10,X,P)
22056 IF P-J THEN 22060
22058 CALL >05(92)
22059 GOTO 22040
22060 CALL >05(60)
22070 CALL A(22,15,K,O,AC,J,Y)
22075 CALL HCHAR(24,L,32,28)
22080 ON O GOTO 22090,22070,
22070,22040,22070,22070,20510
22090 CALL H(J,10,AC,P)
22100 IF P-J THEN 22110
22105 CALL >05(92)
22107 GOTO 22070
22110 AL=Q
22120 AG=Q
22130 AK=Q
22140 AD=Q
22150 AF=Q
22155 AM=Q
22160 FOR W=J TO AI
22170 GOSUB 22480
22180 IF V=J THEN 22220
22190 AG=AG+J
22200 AL=AL+AE
22210 AK=AK+O
22220 NEXT W
22230 IF AG>K THEN 22260
22240 CALL >05(97)
22245 GOSUB 10020
22250 IF U-13 THEN 22245 ELSE 20510
22260 A@=AL/AG
22270 AK=AK/AG
22280 FOR W=J TO AI
22290 GOSUB 22480
22300 IF V=J THEN 22340
22310 AD=AD+AE*AE
22320 AF=AF+O*O
22330 AM=AM+AE*O
22340 NEXT W
22343 AM=AM-AG*A@*AK
22345 AD=AD-AG*A@*A@
22346 AF=AF-AG*AK*AK
22347 CALL >05(91)
22348 IF AD*AF THEN 22358
22349 IF AD=AF THEN 22354
22350 AE=Q
22351 O=AK
22353 GOTO 22394
22354 AE=J
22355 O=AK-A@
22357 GOTO 22394
22358 AE=AM/AD
22360 O=AK-AE*A@
22387 CALL D(15,15,12,SQR(AB
S((AF-AE*AM)/(AG-K))))
22388 CALL D(16,15,12,AM/SQR(AD*AF))
22394 CALL H(J,9,X,F$)
22395 CALL D(7,6,10,F$)
22396 CALL H(J,9,AC,F$)
22397 CALL D(8,6,10,F$,12,5,
12,AE,13,5,12,O)
22440 GOSUB 10020
22450 IF U=15 THEN 22010
22455 IF U-12 THEN 22440
22460 @=18
22462 GOSUB 26000
22465 GOTO 22010
22480 CALL G(J,W,X,V,AE)
22490 IF V=J THEN 22510
22500 CALL G(J,W,AC,V,O)
22510 RETURN
25005 CALL >05(14)
25020 GOSUB 10064
25030 ON U GOTO 25055,25055,25260,220
25055 CALL CLEAR
25070 CALL L("CS"&STR$(U),O)
25080 IF O=Q THEN 25300
25100 CALL >05(17)
25110 CALL H(J,J,Q,F$)
25120 CALL D(10,13,9,F$)
25130 GOSUB 6740
25140 CALL D(12,13,8,G$)
25150 CALL H(Q,L,Q,P)
25160 CALL H(Q,K,Q,R)
25170 CALL H(Q,4,Q,S)
25190 GOSUB 10020
25200 IF U=13 THEN 1550
25210 IF U=15 THEN 25005
25211 IF U-12 THEN 25190
25213 @=14
25215 GOSUB 26000
25216 GOTO 25100
25230 GOSUB 14300
25250 GOTO 25005
25260 CALL >05(16)
25270 CALL A(20,4,20,X,F$)
25272 ON X GOTO 25275,25270,
25270,25260,25270,25270,25005
25275 CALL L(F$,O)
25280 IF O=Q THEN 25230
25288 GOTO 25080
25300 CALL >05(19)
25310 GOSUB 10020
25320 IF U=13 THEN 25005 ELSE 25310
25400 CALL >05(54)
25420 GOSUB 10064
25424 ON U GOTO 25457,25457,25427,1550
25427 CALL >05(16)
25429 CALL A(20,4,20,X,F$)
25432 CALL S(F$,O)
25433 IF O THEN 25475
25435 GOSUB 14300
25436 GOTO 25400
25457 CALL CLEAR
25470 CALL S("CS"&STR$(U),O)
25475 IF O=Q THEN 25400
25495 CALL >05(57)
25500 CALL H(J,J,Q,F$)
25510 CALL D(11,7,9,F$)
25520 GOSUB 6740
25530 CALL D(12,7,8,G$)
25580 GOSUB 10020
25582 IF U=13 THEN 25600
25590 IF U-12 THEN 25580
25592 @=18
25594 GOSUB 26000
25598 GOTO 25495
25600 CALL >05(58)
25610 GOSUB 6300
25620 ON T GOTO 25640,1550,25600,25610,1550
25640 CALL >05(4)
26000 CALL >05(101)
26002 \=J
26004 GOSUB 10020
26006 IF U=13 THEN 26140
26007 IF U-80 THEN 26000
26010 CALL >0C(@,E$,\)
26020 IF \ THEN 26140
26030 GOSUB 14300
26040 \=Q
26140 RETURN