An Exploration into the TI-84+
I came across several TI-85 calculators in a closet in the house I grew up in. These got me thinking: graphing calculators are essentially tiny computers. Graphing calculators are potentially the first tiny computers. Long before Raspberry Pi, Pine64, Orange Pi, Banana Pi, and the long list of other contemporary tiny computers that use modern Arm processors, graphing calculators were using Motorola 68000s and Zilog Z80s. The first Texas Instruments graphing calculator was the TI-81 which was introduced in 1990; it contained a Z80 processor. I have fond memories of the TI-85 in high school. Transferring games and other programs between TI-85s before physics or trigonometry class using a transfer cable -- there was no Bluetooth or WiFi. But, the TI-81, TI-85 and, discussed briefly in the introduction, TI-89 are not the subject of this writeup. The subject is, in fact, a graphing calculator that I managed to never use: the TI-84.
The Texas Instruments TI-84 Plus graphing calculator has been a significant tool in the realm of education since its launch in 2004. Its use spans the gamut from middle school math classrooms to university-level courses. Traditionally, students in algebra, geometry, precalculus, calculus, and statistics classes, as well as in some science courses, have found this calculator to be a fundamental tool for understanding complex concepts. The TI-84 Plus allowed students to graph equations, run statistical tests, and perform advanced calculations that are otherwise difficult or time-consuming to do by hand. Its introduction marked a significant shift in how students could interact with mathematics, making abstract concepts more tangible and understandable. I, being over forty, never used a TI-84+ calculator in any of my schooling. I entered high school in the mid-1990s and calculator of choice for math and science was the TI-85. The TI-85 also utilized a Z80 processor. As I progressed mathematically and engineeringly in the early 2000s, I used a TI-89. It was an amazing tool for differential equations and linear algebra. The 89 used a M68k processor; as an aside, I plan on writing a piece on the M68k. Even as I entered graduate school in my mid-30s, my TI-89 found use in a few of my courses.
2. The Humble TI-84+ Graphing Calculator
One might wonder why, nearly two decades later, the TI-84 Plus is still in widespread use. There are several reasons for this. First, its durable design, user-friendly interface, and robust suite of features have helped it withstand the test of time. The device is built for longevity, capable of years of regular use without significant wear or loss of functionality. Second, Texas Instruments has kept the calculator updated with new apps and features that have kept it relevant in a continually evolving educational landscape. Perhaps most importantly, the TI-84 Plus is accepted on all major standardized tests, including the SAT, ACT, and Advanced Placement exams in the U.S. This widespread acceptance has cemented the TI-84 Plus as a standard tool in math and science education, despite the advent of newer technologies. Additionally, there's a significant advantage for students and teachers in having a standardized tool that everyone in a class knows how to use, reducing the learning curve and potential technical difficulties that could detract from instructional time.
1. Model Evolution
TI-84 Plus (2004): The original model runs on a Zilog Z80 microprocessor, has 480 kilobytes of ROM and 24 kilobytes of RAM, and features a 96x64-pixel monochrome LCD. It is powered by four AAA batteries and a backup battery.
TI-84 Plus Silver Edition (2004): Launched alongside the original, this version comes with an expanded 1.5-megabyte flash ROM, enabling more applications and data storage.
TI-84 Plus C Silver Edition (2013): The first model to offer a color display, it comes with a full-color, high-resolution backlit display, and a rechargeable lithium-polymer battery.
TI-84 Plus CE (2015): Maintains the Zilog Z80 processor but boasts a streamlined design, a high-resolution 320x240-pixel color display, a rechargeable lithium-ion battery, and an expanded 3-megabyte user-accessible flash ROM.
2. Texas Instruments Operating System (TI-OS)
TI-OS, the operating system on which all TI-84 Plus models run, is primarily written in Z80 assembly language, with certain routines, particularly floating-point ones, in C. As a single-user, single-tasking operating system, it relies on a command-line interface.
The core functionality of TI-OS involves the management of several key system resources and activities:
Input and Output Management: It controls inputs from the keypad and outputs to the display, ensuring the calculator responds accurately to user commands.
Memory Management: TI-OS manages the allocation and deallocation of the calculator's memory, which includes the read-only memory (ROM) and random access memory (RAM). This ensures efficient usage of the memory and avoids memory leaks that could otherwise cause the system to crash or slow down.
Program Execution: TI-OS supports the execution of programs written in TI-BASIC and Z80 assembly languages. Users can develop and run their own programs, extending the calculator's functionality beyond standard computations.
File System: It also handles the file system, which organizes and stores user programs and variables. The file system is unique in that it's flat, meaning all variables and programs exist on the same level with no folder structure.
Error Handling: It also manages error handling. When the user enters an invalid input or an error occurs during a computation, TI-OS responds with an appropriate error message.
Driver Management: The OS also communicates with hardware components such as the display and keypad via drivers, and facilitates functions such as powering the system on and off, putting it to sleep, or waking it.
Texas Instruments periodically releases updates to TI-OS, introducing new features, security updates, and bug fixes, ensuring a continually improved user experience.
3. Software and Functionality
The TI-84 Plus series maintains backward compatibility with TI-83 Plus software, providing access to a wide library of resources. Texas Instruments has fostered third-party software development for the TI-84 Plus series, resulting in a rich variety of applications that expand the calculator's functionality beyond mathematical computations.
3. The Humble Z80 Processor
The Zilog Z80 microprocessor found its way into a myriad of systems, from early personal computers to game consoles, embedded systems, and graphing calculators like the TI-84 Plus. Despite being a nearly 50-year-old technology, it still finds application today, and there are several reasons for this.
The Z80's design is simple, robust, and reliable. Despite being a CISC architecture, it has a relatively small instruction set that is easy to program, which makes it a good choice for teaching purposes in computer science and electronic engineering courses. The Z80 is also relatively inexpensive and energy-efficient, which can be crucial in certain embedded systems applications.
The longevity of the Z80 can also be attributed to its presence in legacy systems. A lot of older, yet still functioning machinery—be it industrial, medical, or scientific—rely on Z80 chips for their operation. Replacing these systems entirely just to update the microprocessor might be prohibitively expensive or practically unfeasible, especially when they continue to perform their intended functions adequately.
The Z80 is not exactly a new piece of technology, and much of the documentation on it is rather old, but there are a number of books available: here, here and here. There is also an official Zilog Z80 CPU User Manual.
4. Z80 Assembly Language: Hello World
Consider the 'Hello World' program in Z80 assembly language:
#include "ti83plus.inc" .db $BB,$6D .org 9D95h .db t2ByteTok ld hl,txtHello bcall(_puts) ret txtHello: .db "Hello World",0 .end
The given code is a Z80 assembly program designed for the TI-84+ calculator, which uses a Z80 processor. The code is meant to display the "Hello World" message on the calculator's screen. Here's an explanation of each part:
#include "ti83plus.inc": This line includes the
ti83plus.incfile, which usually contains definitions of constants and routines specific to the TI-83+/TI-84+ calculators. It helps the assembler to understand specific labels, constants, and ROM calls used in the code.
.org 9D95h: The
.orgdirective is used to set the program counter to a specific address, here
0x9D95. It is specifying where in memory the following code should be loaded.
ld hl,txtHello: This line loads the address of the label
txtHellointo the register pair HL. In this context, it's preparing to display the text string located at that address.
bcallinstruction is specific to the TI-83+/TI-84+ calculators and is used to call a routine from the calculator's ROM. In this case, it's calling the
_putsroutine, which is typically used to print a null-terminated string to the screen. The address of the string is already loaded into HL, so this call will print "Hello World" to the display.
ret: This is the return instruction, which will return to whatever code called this routine. If this code is the main program, it effectively ends the program.
txtHello:: This is a label used to mark the location of the "Hello World" string.
.db "Hello World",0: This directive defines a sequence of bytes representing the ASCII characters for "Hello World", followed by a null byte (
0). This null-terminated string is what gets printed by the
.end: This directive marks the end of the source file.
Downloading, Compiling, and Running the Z80 Assembler SPASM-ng
The Z80 Assembler SPASM-ng is an open-source assembler for the Z80 microprocessor.
Section 1: Downloading SPASM-ng
- Git (for cloning the repository)
- A compatible C compiler
- Open the terminal or command prompt.
- Clone the repository using the following command:
git clone https://github.com/alberthdev/spasm-ng.git
- Navigate to the downloaded directory:
Section 2: Compiling SPASM-ng
Once downloaded, SPASM-ng needs to be compiled.
2.1 Install dependencies
Suggested packages for Ubuntu/Debian:
2.2 Compiling on Linux/Unix
- Compile the source code:
sudo make install
Section 3: Running SPASM-ng
Once compiled, SPASM-ng can be used to assemble Z80 programs.
3.1 Basic Usage
The basic command for assembling a file is:
./spasm input.asm output.8xp
3.2 Additional Options
SPASM-ng offers various command-line options for different assembly needs. Run:
to see all available options.
6. Running the Program
The last step is running the 'Hello World' program on the TI-84+ calculator. The TI-84+ calculator interface has several buttons similar to a physical calculator, which are used to interact with the software. Here's how to execute the program:
To initiate the process, select
2ND followed by
0 (CATALOG), select
ASM. Press the
PRGM button on the calculator. This action opens a list of available programs on the calculator. Navigate this list using the arrow keys provided on the calculator's interface.
Once you locate your program—named after your .8xp file—press
ENTER. This action displays the name of the program on the calculator's home screen.
Close the parentheses -
) - to run the program, press
ENTER again. With this action, the TI-84+ calculator executes the program. If the program has been correctly written and uploaded, you should see the 'Hello World' message displayed on the screen. This signals that your program ran successfully.