TI-82 programs

programs for the Texas Instruments 82 pocket calculator

Gauss, Jordan, matrix inverse, prime factorization, GCD, SCM, boolean function truth tables

In order to run these programs you need a TI-82 pocket calculator and the black TI Graph Link connector for the serial port of your PC. If your PC does not have a serial port, an USB to serial converter should also do it. Since the TI Graph Link software only runs under Windows and Mac I have installed it with Qemu under Windows XP. You have to select COM port one and 'black cable' under the TI 82 Graph Link software if this is your setup. If you don´t have the link you would need to manually type all the programs as seen in the .AS2 files. To see which parameters need to be passed to Qemu to make the serial port work, look at the configuration file under downloads below. At the time this article was written the Graph Link software did not run under Wine/Linux. I have reported the issue to the Wine developers but it seemed rather hard to fix since it amounted to the ntoskrnl.

linear equations and matrix inverse

Download and unpack TI-82-progs-elstel.org.tar to get all the programs in plain text as .AS2 and in the internal representation for direct upload as .82P. The A/B/C.TXT and A/B/C.82M are matrices I have used to test the linear equation solver. Linear equations are solved using the Gauss algorithm. If you assign 1→E then the program keeps all numbers as integers and does not produce fractions. This way you can be sure not to have any rounding errors. If you want direct solutions for every rather than one variable and thus avoid back propagating the results you may want to apply the Jordan algorithm after the Gauss algorithm. GJNorm noramlizes the results to have a coefficient of one for each variable but it will produce fractions. It can be applied either after Gauss or after the Jordan. GJGGTDIV simplifies the result without producing fractions, i.e. it divides every row through its common greates divider. If you happen to have n linear independent vectors of size n in your matrix then an inverse matrix exists. You can call JXTRINV after the Jordan and GJNorm. Call GETINV as sole program to calculate the left inverse matrix of [A] into [E]. All programs change L6 the vector/list number 6. All other matrix programs than GETINV only operate on [E]. The M variable is supposed to contain the number of linear equations, i.e. the row count. The N variable the column count and thus the number of variables with coefficients. Everything which is not the coefficient of a variable needs to reside in a column with number N+1 (counting starts at one, not at zero). If you do not call GETINV directly make sure to assign appropriate values to M, N and D. If you set D to one then the outcome of each intermediate step will be displayed. Set the E variable to zero to work with fractions and decimal numbers. Set E to one to calculate with integers only. You may be astonished that GETINV produces a result also if not inverse matrix should exist. In this case the number of rows will be less than they were initially because not all vectors were linear independent. If you calculate [E]*[A] you still get a matrix that looks as similar as possible to the identity matrix (German: Einheitsmatrix).

pixel peacock
TI-82 arts: a peacock

greates common divider, smallest common multiple, truth tables for boolean functions, prime factorization, cross product, unit vector

We also have a program to calculate the greatest common divider (German: GGT, größtes gemeinsames Vielfaches) and the smallest common multiple (German: KGV, kleinstes gemeinsames Vielfaches). The integer number list is stored and processed in L6. Be careful; the programs in this section may change some integer variables. While the programs that operate on matrices do save and restore integer variables to L6 (except GJGGTDIV which also uses L5 for this purpose) the GGT0 program uses variables G and F, while KGV uses even more variables (see at the sources). The program PRIM factorizes prime numbers and stores the result as matrix [E]. The program TTBOOL evaluates a boolean function in Y0 with all possible values of A, B, C and D and outputs its truth table. That way you can f.i. compare if two boolean functions yield the same result. We also have two programs to calculate the unit vector and the three dimensional cross product of a vector stored in L6. The difference between the GGT and the GGT0 programs is that GGT lets you input L6 while GGT0 merely does the calculation and is thus called by the program GJGGTDIV.

TI-82 arts

Finally you can enjoye some TI-82 arts by invoking ZPFAU which paints a peacock in the polar coordinate system merely by definining six polar functions r1-r6. If you read the source file of this program for use elsewhere apart from the TI-82, then you need to interprete the @ as theta.

Download:
TI-82 programs as tar archive; extract with tar -xvf xy.tar
matrix inverse calculation view the source file which is part of the .tar above
Gauss algorithm view the source file which is part of the .tar above
runWinXP bash script to invoke Qemu for Windows XP with serial port connected
Email:
elws@elstel.org (for bug reports and questions)