So you want to program your TI-83 Plus or TI-84 Plus in z80 assembly (z80 ASM)? Despite what you may have heard, it's not that difficult of a language, although it does require more care and precision than other languages. Here at Cemetech, we often recommend that coders have a decent familiarity with TI-BASIC before beginning z80 ASM. If you are indeed competent with TI-BASIC, then you probably want to know exactly what sets BASIC and assembly apart:
The power of z80 assembly combined with how easy it is to make programs that clear your RAM turn many potential ASM coders away from the language. We hope that you will persevere.
What do I need? To get started programming in z80 assembly, you need a few things:
- BASIC is an interpreted language, which means that the OS reads your program command by command as it runs it, translating what each command means on-the-fly. Assembly is assembled, a process which takes place before your program is run. Assembly programs are therefore much, much faster.
- TI-BASIC catches many of your errors for you, displaying error messages that help you debug your code. Errors in z80 ASM often cause your RAM to clear.
- You can develop TI-BASIC programs entirely on your calculator. Because ASM source code tends to be long and complex, and few on-calculator ASM tools exist, it is recommended that you develop assembly programs on a computer. You can then use an emulator to test your programs and save needing to repeatedly send your program-in-progress to your real calculator.
- TI-BASIC programs are great at working with floating-point (decimal) numbers. ASM programs are much, much faster at integer math, but are cumbersome for floating-point math.
- z80 ASM can produce fancy graphics far faster than TI-BASIC programs, even compared to Hybrid BASIC.
The power of z80 assembly combined with how easy it is to make programs that clear your RAM turn many potential ASM coders away from the language. We hope that you will persevere.
What do I need? To get started programming in z80 assembly, you need a few things:
- An assembler. We recommend the Doors CS SDK, which includes the Brass assembler by community member benryves. Despite the name, it can create nostub (shell-less), Ion, and MirageOS programs in addition to Doors CS ASM programs.
- A text editor. We strongly recommend Notepad++ for Windows users. gvim/vim are great choices for Linux users.
- An emulator. Not completely necessary, but makes debugging faster than sending each new program version to your calculator for testing. We recommend jsTIfied, Cemetech's online graphing calculator emulator webapp, or WabbitEmu.
- A tutorial. Unlike TI-BASIC, which a smart individual could pick up by reading through lots of existing programs, z80 ASM has enough nuances that a tutorial is invaluable. The best option right now is Learn TI-83 Plus Assembly in 28 Days