TI-Basic Z80 Programming/Output

There are a few different ways to display text and values to the screen in TI-Basic. These include Disp, Output, Pause and Text. We'll cover each of their uses and their syntaxes.

Disp
Disp ( I/O 3) displays text or values to the home screen. It creates a new line on the home screen and prints the text left-aligned for strings, and right-aligned for values.

To print  to the home screen:

To print  to the home screen:

To print a literal string or value to the home screen:

There can be multiple expressions or variables with each having its own line:

An example of a simple program that uses Disp:

If you try to print a string or value that is longer than 16 tokens, it will be trimmed and appended with an ellipse:

If no arguments are added, the home screen is displayed.

Pause
Pause (<tt> CTL 8</tt>) freezes the program mid-execution and can optionally display text as well. When a pause token is reached in the program, execution pauses until the user presses to resume. If text is passed as an argument, the specified text will be displayed.

Some examples of <tt>Pause</tt>:

Text displayed with <tt>Pause</tt> can longer than 16 tokens. However, you will need to use the left and right arrow keys to scroll along the text. If no text is provided, the program will simply pause until is pressed:

Text
<tt>Text</tt> (<tt> [DRAW] DRAW 0</tt>) draws small font text to the graph screen. It has precise X and Y coordinate positioning, and can print several values or strings.

Some examples of using <tt>Text</tt>:

If the first argument passed is, <tt>Text</tt> will draw with the standard font:

Output
<tt>Output</tt> (<tt> I/O 6</tt>) is used for displaying values or strings on the home screen. <tt>Output</tt> will override anything that the displayed characters may overlap with that is previously on the screen.

In this example, the calculator would display  at 2 rows down (from the top of the screen) and 6 columns over (from the left of the screen). Notice that to display a string, the string must be enclosed in quotation marks. Make sure to separate values of row column and display value with commas.
 * To display a numerical value, do NOT place quotes around the value, as it is not a string.
 * Only one value can be displayed per <tt>Output</tt> statement.