Casio FX-8000G programs

"You can bring any calculator you like to the midterm, as long as it doesn't dim the lights when you turn it on."
On this page:

Here is a bunch of programs I wrote 10~15 years ago, when I was still a student. At the time I was selling them to other students in a booklet ! If I had had to live off my programming skills at the time, I'd have died of starvation long ago. Those programs will work on the FX-7000G and other Casio calculators as well. I had many more, but I doubt much people are interested in action games on a calculator anymore... Those are just the few programs I still use.

Note 1: some keys of the FX-8000G cannot be represented accurately on a PC. So I use the '¬' symbol for the variable setting arrow (same key as '?' and 'H'), '»' for the test fat arrow ([Shift][7]), '¶' for display value ([Shift][:])...

Note 2: the main program memory (Mode 2) is used for functions and very basic progs. The editor memory (Mode 0) is used for the actual programs. Some programs call each others, so it's advised to keep the names (I made them very short to save off memory, we didn't have GigaBytes in our pocket calculators at the time).

Main program memory (Mode 2)

Prog 0 - F(X) function

Contains functions of 'X'. Referenced later as F(X). Example:


Prog 1 - Parametric function

Contains parametric functions of 'T'. Referenced later as as X(T) and Y(T). Example:

cos 3T¬X
sin T¬Y

Prog 2 - F(X,Y) function

Contains functions of 'X' and 'Y', possibly using 'R' as an intermediate variable (do not use other variable names). Referenced later as Z(X,Y). Example:

40sin R÷R

Prog 9 - Get value mini-program

Program to get F(X):

"X"?¬X:Prog 0

Prog 8 - Get value mini-program

Program to get X(T) and Y(T):

"T"?¬T:Prog 1:X¶

Prog 7 - Get value mini-program

Program to get F(X,Y):

"X"?¬X:"Y"?¬Y:Prog 2

Editor program memory (Mode 0)

Prog "IN" - Ask bounds/precision subroutine

Ask for limits (like -10, 10) and a number of steps (like 10).


Prog "CL" - Clear text screen subroutine

Just this, two quotes with 7 [EXE] in between. Used to avoid screen flicker in graphic programs.



Prog "S" - Integral of F(X)

Ask for limits (like -10, 10) and a number of steps (like 100) and compute the integral of F(X) as written in Prog 0. Increase P for better precision but slower computation. Example with F(X)=X²-1, A=-10, B=30, P=100 returns 9293.333333.

Prog "IN":Prog "NS"

Prog "NS" - Integral Subroutine

Computes an integral (needs A, B and P). Second order polynomial.

A¬X:Prog 0:Ans¬I
Lbl 0
Prog 0:I+4Ans¬I
Prog 0:I+2Ans¬I
Dsz P:Goto 0
B¬X:Prog 0

Prog "R" - Solve equation.

Classic dichotomy program. Ask for limits (like 0, 10) and a number of precision digits (like 5) and search for X so that F(X)=0 as written in Prog 0. Increase P for better precision but slower computation. Example with F(X)=X²-1, A=0, B=10, P=5 returns 1.000003815. You should have F(A) and F(B) of opposite sign, if not the program returns "Err".

Prog "IN"
A¬X:Prog 0:Ans÷Abs Ans¬D
B¬X:Prog 0:Ans÷Abs Ans¬E
D-E=0»Goto 2
D<0»Goto 3
Lbl 0:.5(A+B)¬X
Prog 0
Ans≥C»Goto 1
Ans>-C»Goto 4
X¬B:Goto 0
Lbl 1:X¬A:Goto 0
Lbl 2:"Err":Goto 5
Lbl 3:A¬Q:B¬A:Q¬B:Goto 0
Lbl 4:X
Lbl 5

Prog "G" - Gauss linear system equation solving.

Solve a linear system of Dim equations of Dim unknown using Gauss method. For instance x+2y+3z=14; 4x+5y+6z=32; 7x+8y+9z=23. Equivalent to returning vector Sol so that MatxSol=Col.
The program first asks for the dimension "Dim" of the system (ex: 3), then each coefficient of the each line "Lin" of the system (ex: 1,2,3; 4,5,6; 7,8,9), then it asks for the vector "Col" (ex: 14,32,23), then it returns the solution "olS" in reverse order (here: 3,2,1). Prints "End" after the last value. You need 4+Dim²+2Dim memories. Use Defm (Mode .) to declare memories after 26.

Lbl 8:0¬A:B+1¬B
Lbl 9:A+1¬A:?¬D[A+(B-1)D]
A<D»Goto 9
B<D»Goto 8
Lbl 7:B+1¬B:?¬D[D²+B]
B<D»Goto 7
Lbl 0:C+1¬B
Lbl 1:D[C+(B-1)D]D[D²+C]-D[C+(C-1)D]D[D²+B]¬D[D²+B]
C+1¬A:Lbl 2
A+1¬A:A≤D»Goto 2
B+1¬B:B≤D»Goto 1
C+1¬C:C≤D»Goto 0
Lbl 3:B-1¬B:D+1¬A
Lbl 4:A-1¬A
A>B+1»Goto 4
B>1»Goto 3

Prog "D" - Prime factor.

Split an integer number to its prime factors. Example: 1224:Prog "D" will return 2, 2, 2, 3, 3, 17, 1, so that 1224=2³.3².17. You need to press [EXE] between each factor. The program finishes with 1. Big prime numbers take a long time...

Lbl 9:.5N≠Int .5N»Goto 8
Goto 9
Lbl 8:N÷3¬T:T≠Int T»Goto 0
Goto 8
Lbl 0:N÷I¬A:A=Int A»Goto 1
N≥2»Goto 0:Goto 2
Lbl 1:I¶
A¬N:Goto 0
Lbl 2:1

Prog "P" - Parametric plot.

Plot the parametric curve X(T),Y(T). You need to set the bounds A and B and the number of steps P. You also need to set the correct (or at least wider) [Range] for the graphic window.
Try the example given above in Prog 1 with A=0, B=2π, P=100, Range=-1,1,0,-1,1,0. Make sure you are in Radians (Mode 5).

Prog "IN":Prog "CL"
(B-A)÷P¬H:A¬T:Prog 1:Plot X,Y
Lbl 0:T+H¬T:Prog 1:Plot X,Y:Line
T<B»Goto 0

Prog "U" - Nth element of a series.

Iterate F(X) on itself n-i times starting from a given value. Equivalent to finding Xn knowing Xi with Xi+1=F(Xi). F is defined in Prog 0. Example: Xi=2, i=0, n=5 returns Xn=2.479057493E+14.

Lbl 0:Prog 0:Ans¬X
Isz N:N≤M»Goto 0

Prog "DM" - Fraction simplify.

If N/D is a fraction (N and D are 2 integers), the program returns the smallest Q and R possible so that N/D=Q/R. N stands for Numerator, D for Denominator. Example: N=96, D=60 returns 8/5.

A<B»Goto 2
Lbl 0
Int (.5+BFrac (A÷B¬R
R=0»Goto 1
Goto 0
Lbl 2:A¬C:B¬A:C¬B:Goto 0
Lbl 1:E÷C¶

Prog "GS" - Integral graph.

Let I(X) be the integral of F(t)dt (the function present in Prog 0, always as a variable of X) between G(X) and H(X). G and H are 2 functions of X defined in Prog 1 and Prog 2 (for example G(X)=0 and H(X)=X will display the integral of F, here X³/3-X, set A=-1, B=1, P=100).
Do not be confused by the use of X as the parameter for the inner integral (here dt).

Prog "IN":Prog "CL"
Lbl 1:5¬P:E¬X
Prog 1:Ans¬A
Prog 2:Ans¬B
Prog "NS":Ans¬Y
T≠0»Goto 2
1¬T:Plot E,Y
Lbl 2:Plot E,Y:Line
E+J¬E:E≤F»Goto 1

Prog "IMP" - ?

Contour plot ??? can't remember !!!

Lbl 0
Prog "DPC"
Plot X,Y
Lbl 1:Prog 1
Prog "DPC"
X¬A:Y¬B:Plot X,Y:A¬X:B¬Y:Goto 1

Prog "DPC" - ?

??? can't remember !!!

Lbl 0
Prog 2:Ans¬Z
Abs Z<E»Goto 9
Prog 1
Goto 0:Lbl 9

Prog "DL" - Decomposition in Taylor polynomials.

Decomposition of the F(X) function at a given point (A) in a polynomial P(X)=E[0]+E[1]X+E[2]X²+E[3]X³...=E+FX+GX²+HX³+...

The function approximate each coef one after the other. Before approximating the next one, it needs an exact value for the preceding ones, so it asks you for confirmation. Example of use with sin X÷X in Prog 0:

Prog outputYou typeComment
Prog "DL"
A0Point where to find the polynomial
Coef Xxy0

Ask if constant coef (x0) is good.
We can guess it's 1, but lets increase the resolution by putting 1 (means that we think the real value of the coef is higher than the approximated one.

It seems to converge to 1, lets accept it by typing 0.
E[Y]?1Ask the real value. We give one.
Coef Xxy1

Close to 0, but lets approximate more.

Getting closer to 0, lets accept it.
E[Y]?0We give 0 as the real value.
Coef Xxy2

We recognize -1/6
E[Y]?-1÷6Note that using "-1÷6" is more precise than using -0.166666666666 by 3 decimals.
Coef Xxy3

We recognize 0
E[Y]?0We give 0
Coef Xxy4

Lets see if it converges to 0.

Does not go to 0. Let's see the other way

Mode 1
Let's accept it and quit

Now lets plot our equations: Range=-6,6,1,-0.5,1,0.5; Graph=sin X÷X; Graph=E+GX²+IX²². In the area -3<X<3 we see that the concordance is very good.

Lbl 0:"1,-1,0"
"Coef Xxy":Y¶
Lbl 2
0¬C:Y=0»Goto 3
E[Y-1¬C:Y=1»Goto 3
Y-1¬Z:Lbl 1
Dsz Z:Goto 1
Lbl 3
A+B¬X:Prog 0
D≠0»Goto 2
Isz Y:Goto 0
Support my site: make a donation, buy images, use associate services

Prog "DIF" - .

??? can't remember !!!

Prog "IN"
"Y0"?¬B:Plot A,B
Lbl 0
A¬X:B¬Y:Prog 2:Ans¬C
A+J¬X:B+JC¬Y:Prog 2:Ans¬D
B+JD¬Y:Prog 2:Ans¬E
A+H¬X:B+HE¬Y:Prog 2:Ans¬F
A+H¬A:Plot A,B:Line
Dsz P:Goto 0