The Ultimate TI Calculator FAQ - TI-85

by Patrick Davidson ( - Return to FAQ index - Return to my main page
  1. Which shell should be used? How do I use it?
  2. What about all of the other shells? Why is Usgard the preferred shell?
  3. Why are TI-85 asm programs stored as strings? Why do these strings appear full of garbage when I try to view them?fs

Which shell should be used? How do I use it?

The best shell/operating system to use on the TI-85 is Usgard by Icarus Productions. It will run both programs specifically designed for it, as well as programs for the older ZShell.

Since Usgard can only run if CUSTOM menu data is changed to different values than what the ROM will put in, you must install a full backup to get Usgard into your TI-85. Once the backup is installed, press CUSTOM, then F1, to enter the Usgard shell. From there, you can select and run programs.

Since the F1 item of CUSTOM menu is used to launch Usgard, you must not change it, as doing so will prevent you from using Usgard any more.

There are several different "versions" of Usgard included in the Usgard distribution in different backup files: "USGDLITE.85B", "USGDSTD.85B", "USGDWIN.85B", and "USGDNOZS.85B". The "USGDWIN" backup has a bloated shell that pretends to be like Windows, while the others have simpler and smaller shells that just let you select a program from a list. The "USGDSTD" version is only slightly different than "USGDLITE", including a shell that is slightly more complex, and allowing variable deletion and resizing by programs. The "USGDNOZS" version saves some space by not supporting programs for ZShell. These backups (and other main files, as described below) are in the 'PRGM' directory of the Usgard distribution.

Usgard actually is packaged in several different files, so you can mix and match which features you want in addition to the pre-built combinations above. The first component is the main OS, which is stored in the string file called "Usgard". This comes in three versions; the "full" one with variable manipulation functions (as included in "USGDSTD"), the "lite" one which lacks these (as included in "USGDLITE"), and the "nozs" one which also lacks ZShell program support (as included in "USGDNOZS"). You must not delete the Usgard string, as it is the necessary component to run Usgard (and you may have problems if you try to access the CUSTOM menu). However, you can change the version you have by copying the string of another version to your calculator, then writing this string over the Usgard string with the "->" variable copy command.

The "shell" is a separate component, and there are the "simple shell" (as in USGDLITE), the "cool shell" (as in USGDSTD), and the win shell. To switch which shell is the "defualt" shell, just run another shell, and it will make itself the default.

If you remove your shell, you can still run programs. Just clear the screen, type the name of the program, and press CUSTOM F1 to run it. If you run a shell this way, it will make itself the default so it will run the next time you start Usgard.

The last component of Usgard is the "patchrom" program, which adjusts ROM calls to fit your specific ROM version. You must have this when you first install Usgard (unless you got it from another calculator with the same ROM version as you), but you can delete it afterwards. However, if you plan to send Usgard to another calculator, you must have this file (unless the other calculator has the same ROM version as you). To find the ROM version of the calculator, press 2ND MORE ALPHA S, and the number displayed will be the ROM version. Press CLEAR to exit from this.

All programs for Usgard (and other shells for the TI-85) are stored as string variables which contain the machine code version of the program.

If you have no programs that Usgard can run, the shell may just display "no programs" and then appear to be locked up. If this occurs, press ENTER to get out.

What about all of the other shells? Why is Usgard the preferred shell?

The first assembly shell for any TI calculator was ZShell for the TI-85, undoubtedly a major achievement and a major factor leading to the development of the many assembly programs on many different TI calculators that exist today. The first version of ZShell was released in 1994; this was the first assembly program that would allow you to start other programs (before then, you would have to recall each individual program you wanted to run onto the graph screen before you could run it). The current version of ZShell (4.0) was released a year later, and it supports all versions of the TI-85 (except the very old [and rare] version 2.0).

However, time marches on, and newer shells for the TI-85 have been written also. One of the earliest (if not the earliest) replacement shells was UShell, written to support ROM versions 9.0 and 10.0 when ZShell didn't. Once ZShell supported those versions, interest in UShell faded.

The new shells in the "third generation" were fully (or almost fully) compatible with ZShell. One of them (OS-85) provided a fancier interface, whereas most of the others (such as CShell-NT, OShell, and OS/7) tried to be smaller and/or offer minor new features. Since they provided the same features to programs as ZShell, they didn't create very many problems.

However, the OS-85 shell did cause some problems due to failing to handle checksums. A checksum is a short extra piece of data kept in addition to the file itself which is the sum (or some other simple function) of all values in the file that is used to detect unintended changes to a program (e.g. when another program accidentally overwrites it). If the checksum is incorrect, ZShell assumes the program is corrupt and won't run it. Of course, sometimes programs change themselves intentionally (as when saving highscores in themselves) so this must be provided for; in ZShell, the program would set a flag before exiting that tells ZShell to recalculate the checksum. However, OS-85 didn't recalculate it, resulting in the checksum becoming invalid if you ran the program in OS-85 and it modified itself in any way. This was a big problem for ZShell users, as running programs under OS-85 made them unable to later be run in ZShell. In some cases, users thought that OS-85 was better than ZShell because it could run programs ZShell wouldn't, not realizing that the programs (in their original form) worked fine in ZShell and the problem was due to OS-85 corrupting them.

This was nothing compared to the next change that would happen in the TI-85 scene. It happened in the summer of 1997, when three new shells were released: Usgard, Rigel, and PhatOS. All of these shells could run programs written for ZShell, but each one also had its own special format that would only run on it.

One of the most important new features of these shells was relocation, something which was badly needed for a long time; on the TI-85, files can be moved throughout memory by the operating system, so programs that reference data in themselves by any way other than relative jumps must take their address into acocunt. Under ZShell, programs would have to reference data by reading their own address out of ZShell and adding that to offsets in the program, and would have to do subroutine calls and long-range jumps by special functions inside ZShell that would calculate the right address in the right circumstances. Both of these methods are inconvenient to the programmer and make resulting programs both larger and slower.

Usgard solved the problem by using a relocation table, which is a list of places in the program that referenced other addresses in the program; when Usgard starts a program, it adjusts all the addresses to point to the right place. The relocation table took some space in the program, but much less than was used by the methods needed under ZShell. PhatOS and Rigel solved the problem by simply moving the program to a constant address before running it, which saved even more space since the relocation table wasn't needed.

Other features supplied by Usgard were libraries (also present in Rigel) and new ROM calls to help with the manipulation of variables and interrupts. It also allowed more direct ROM calls than the method used in ZShell (this method actually also worked in ZShell, but was undocumented there; some ZShell replacements like OShell didn't support it, causing some compatibility problems).

When Usgard was first released, it was supported by most of the greatest programmers of the time, including Andreas Ess (one of its initial developers) and Jimmy Mardell. However, many users disapproved of it for a variety of reasons, primarily because they believed it took more memory, but also out of deference to the "tradition" of ZShell and because they thought that having three "main" files as well as libraries was too confusing. The concerns about memory were partly true, especially for users who installed the rather large win shell (which was the default). This reason to prefer ZShell is mostly bogus, however; if you install the simple shell, the total size of Usgard is only about 750 bytes larger than ZShell, which is more than overcome by the space saved in programs that are written for Usgard.

This was the subject of flame wars on the list-zshell (later assembly-85) mailing list of (there was also a group called "Nova Coders" that claimed shortly before this period they would release a new shell, which they hyped up extensively, although they ultimately only released a halfway-complete version months later than promised, and it impressed no one). Usgard easily defeated PhatOS and Rigel, the other new shells, probably mostly because of how many great programmers supported it (it also had some features the others didn't). Due to a large amount of user complaints, library support was removed, which also decreased the size of Usgard somewhat (libraries in Usgard were somewhat unfriendly to programmers for several reasons, especially the use of a specialized, very slow calling mechanism). Many previously existing programmers were converted to Usgard.

After a few months, the situation finally settled down. The current version of Usgard, 1.5, was released in October 1997. By that time, interest in the TI-85 had already declined somewhat, with some programmers having quit or switched to the TI-86 or TI-92. However, there was still enough activity for a fair number of new programs to be released for Usgard, and for many programs to be updated to make Usgard versions. Some new programs were also released for ZShell as well (which of course worked in Usgard).

No other major shell developments have occured since then. Very few TI-85 programs were released at all since mid-1999, and Usgard is still the preferred shell due to the many past programs for it. Among the few more recent programs, some are actually for Rigel instead, since they were made for several calculators and the Rigel environment is more similar to that of other calculators. However this is still a small amount of support compared to that for Usgard.

Why are TI-85 asm programs stored as strings? Why do these strings appear full of garbage when I try to view them?fs

Why not?

The main reason for choosing strings to store programs in is they are a type of data which can be given any size, and are fairly infrequently used elsewhere. Program variables could have been used also, but they weren't (this might have caused them to be confused with Basic programs).

They appear to contain meaningless data because they are actually machine code, which is not a format easily understandable by most people. Since the program's description (which is displayed in the shell) is at the beginning of the string, you can probably see and read it.