Basic for Casio FX 2
The Casio BASIC dialect of the Casio Algebra FX 2.0 graphing calculator (1999), a small, calculator-style BASIC with single-letter variables, Locate-based text output and GetKey input, descended from the Casio BASIC that first appeared in 1985.
Created by Casio Computer Co., Ltd.
Basic for Casio FX 2 is the name under which the encyclopedia lists the BASIC-style program language built into the Casio Algebra FX 2.0 graphing calculator. It is a dialect of what is generally called Casio BASIC: a tiny, linear, single-letter-variable language meant for automating calculations on a handheld, not for general software development.
A note on the name and the date
The name is not an official Casio product name. It comes from the 99 Bottles of Beer site, where the entry reads “Basic for Casio FX 2” while its source comment says “for Casio Algebra FX 2”. The catalogue’s listed year of 1985 matches the first appearance of Casio BASIC on the FX-4000P and fx-7000G, not the Algebra FX 2.0. This page therefore dates the dialect to 1999, when the Algebra FX 2.0 was released, and treats 1985 as the origin of the wider Casio BASIC family. The Algebra FX 2.0’s own programming manual was not consulted for this page, so details below come from secondary sources and the 99 Bottles program.
History and origins
Casio BASIC is reported to have first appeared in 1985 on the FX-4000P, which accepted programs only one line at a time, and on the fx-7000G the same year. According to Wikipedia, the fx-7000G (introduced 1985, discontinued around 1989) held programs in approximately 422 bytes using a tokenized format similar to that of the earlier FX-602P. The Universal Casio Forum’s history says later models such as the FX-7700G and FX-7300G were still “primitive” by comparison, and that the CFX-9850G and fx-9750G in 1996 brought commands such as FOR-NEXT, LOCATE, TEXT and GETKEY.
Casio’s first computer-algebra calculator, the CFX-9970G (1998), was followed in 1999 by the Algebra FX 2.0, and in 2001 by the Algebra FX 2.0 Plus. According to Wikipedia, Casio’s CAS was mainly developed by its own R&D team together with Professor John Kenelly of Clemson University. The line was reportedly succeeded in 2003 by the ClassPad 300.
Design philosophy
Casio BASIC is not the “Pocket computer” BASIC of Casio’s 1980s machines such as the FX-702P, which is a separate dialect usually called Casio PocketPC BASIC. The calculator dialect is designed around the calculator’s own screen and keys:
- Variables are single letters A-Z, shared globally across all programs, so there are no local variables. Built-in operations such as graphing also use some of them.
- The assignment arrow
->(a dedicated key on the calculator) stores a value in a variable. - Text is placed on a fixed character grid rather than printed line by line.
Key features
The 99 Bottles of Beer program for the Algebra FX 2 shows the flavor of the language:
For 99->B To 1 Step -1
ClrText
4->X
If B<10
Then 3->X
IfEnd
Locate 1,1,B
Locate X,1,"BOTTLE(S) OF BEER"
Locate 1,2,"ON THE WALL,"
...
Do:GetKey
LpWhile Ans=0
If Ans=47:Then Break
(Excerpt; the original is by Jan Prazak, 2008. In it Ans receives the key code from GetKey, where 0 means no key and 47 is ESC.)
Features visible in that program:
| Feature | Syntax |
|---|---|
| Counted loop | For 99->B To 1 Step -1 ... Next |
| Conditional | If ... Then ... IfEnd |
| Post-test loop | Do ... LpWhile condition |
| Screen clear | ClrText |
| Positioned text and values | Locate column,row,value-or-string |
| Keyboard polling | GetKey, returning a key code in Ans |
| Early exit | Break |
Platform
The Algebra FX series used a 16-bit NEC V30MX processor at 8 MHz, with a 128 by 64 pixel monochrome LCD showing 21 characters on each of 8 lines, 146 KB of program RAM and 768 KB of flash storage, according to Wikipedia’s article on the series. Programs run only on the calculator itself. This page does not claim any emulator or other platform support.
Evolution
The dialect had no independent version history. Later Casio graphing calculators (fx-9860G series, Prizm) continue to use Casio BASIC, though with added features such as strings. Casio’s newest fx-CG100 drops Casio BASIC in favour of MicroPython, according to Wikipedia.
Current relevance
The Algebra FX 2.0 is a discontinued product. Its programs survive mainly in hobbyist archives and in the 99 Bottles of Beer collection, where this dialect’s entry is a small piece of calculator-programming history.
Why it matters
Casio BASIC put a usable programming language in the hands of students on an inexpensive handheld, and the Algebra FX generation shows the style at the point where the calculator gained a CAS, a bitmap screen and a flash-based add-in system, just before Casio moved to the ClassPad.
Sources and unverified points
- Wikipedia articles on the Casio Algebra FX series, Casio fx-7000G, Casio graphic calculators and Casio BASIC.
- The 99 Bottles of Beer entry “Basic for Casio FX 2” (submitted 24 March 2008), retrieved via the Wayback Machine.
- Universal Casio Forum thread “History of Casio BASIC” (community account; the 1985 and 1996 dates are not confirmed against Casio manuals).
- Not verified: the Algebra FX 2.0’s own command reference, its exact command set, and any performance figures.
Timeline
Notable Uses & Legacy
Classroom programming
The Algebra FX 2.0 was designed for classroom use by students and educators; its program mode let users automate repeated calculations on the handheld
99 Bottles of Beer
A full 99 Bottles of Beer program for the Casio Algebra FX 2 (using ClrText, Locate, a Do/LpWhile GetKey loop and ESC to quit) is preserved on the 99 Bottles of Beer site under the language name Basic for Casio FX 2
Graph 100 and Graph 100+ (France)
According to Wikipedia, Casio sold the Graph 100 and Graph 100+ in France as market-specific variants of the Algebra FX 2.0 and 2.0 Plus, sharing the same programming capability