Tandy Pocket Computer

From Wikipedia, the free encyclopedia

A Tandy Pocket Computer is one of a line of small pocket computers—calculator-sized programmable computing devices—sold primarily under the Tandy brand (but also by Sharp and Casio, with different model names) in the 1980s. They were given designations from PC-1 to PC-8.

A Tandy PC-8, somewhat worn from use.
A Tandy PC-8, somewhat worn from use.

Contents

[edit] Purpose

Pocket computers were an advancement over early programmable calculator designs. In addition to providing users with scientific math functions in a small portable package, the devices also understood a form of the BASIC programming language. They included a QWERTY keyboard, of either rubber capacitive or membrane type, to use for entering the names of scientific functions and programming commands, in addition to a traditional numeric keypad. (The only exception was the PC-7, which had a rectangular and alphabetically ordered keyboard, like most scientific calculators.) On some models, the alphanumeric keypad had a different type, form factor, and location than the numeric keypad.

[edit] Design

The models provided a short one-line dot-matrix LCD display, to show the current line of input text, or a segment of it containing the cursor. Character widths in these models varied from 12 characters in the PC-4, to 24 characters in the PC-1 and PC-7. The displays also included some way of indicating operational mode, scientific mode, and other states and conditions.

Some models, such as the PC-4, included lower-case characters. These were only for use in PRINT statements, as lower-case commands and variables were not accepted.

The forms of BASIC used in each device were not generally compatible with each other. Some devices introduced new or specialized commands, others used different names for commands or common operations. In addition, the memory locations among devices could differ in purpose, making PEEK and POKE based programs unusable in other models.

[edit] Operating modes

Each model had two operating modes: Run and Prog.

[edit] Run

In Run mode, the command line could be openly used to execute one-line, non-BASIC operations. This is the normal mode used, from where arbitrary calculations could be entered to receive results. The Run mode also allowed the execution of the BASIC programs stored in the device.

Instead of an "equals" key to initiate calculation evaluation, an "EXE" (execute) key was provided. This caused confusion with those who were used to traditional calculators. The = character was used only for variable assignment, and evaluation tests in programs.

The input of simple calculations would be aggregated on the command line, and no results would be displayed until the EXE key was pressed. In some models, a special ANS variable was provided to reuse the results of the previous calculation; in others, the previous calculation was automatically included if the next calculation began with an operator.

Some valid calculation input examples (PC-8):

 SIN40
 10+2+(8*1)/7
 TAN (LOG (√(4/3)))

[edit] Prog

The Prog mode changed the input from a command line to a program editor. In this mode, BASIC programs could be entered one line at a time. Up and down arrow buttons were provided to scroll up and down through the program space. On most models, free calculations could not be entered in the Prog mode.

Although multiple programs could be stored within the device, there was only one line numbering space. In order for multiple programs to exist on the device, they had to be written in different ranges of line numbers. For example, it was common to insert one program starting with line 100, and another program starting at line 200, etc. Valid line numbers in most models were from 1 to 999. To prevent run-on execution, each program had to finish with the END command, unless run-on execution was desired.

Different models provided different methods for executing the separate programs stored in the device. In the PC-8, a special BASIC command named "DEF" was included, with a single character as an argument, and placed at the start of a program. In Run mode, that program could be executed by depressing a special DEF key, followed by the key of that character. This was equivalent to an explicit GOTO command to the first line number of the program, which was also a valid way to execute programs from Run mode, and the norm in other models.

Many of the devices included a special modifier key to expedite the entry of BASIC commands as well as scientific function names. The most common commands would each be associated with a key, and the full command could be entered by depressing the special modifier key, followed by the associated key for the command.

In some models, BASIC and other commands would be converted into one-character tokens (converted to strings upon display) instead of being stored as whole strings.

[edit] Memory

The total memory capacity of the devices varied from 1 KB to 4 KB. In addition, some models accepted RAM cards of certain sizes to expand the memory capacity.

All user storage was taken from the same space, so allocation of arrays using DIM would decrease the available memory for program instructions, and vice versa. However, the storage space for one-character alphabetical variables was pre-allocated. In the PC-8, the A array actually pointed to the locations of the alphabetical variables, so A(2) pointed to the value of B, and so on. As a result, published programs for the device avoided the use of A as either an array or an alphabetical variable.

[edit] Other notes

It was not possible to define new mathematical function commands for use in Run mode. However, in the PC-8, a special AREAD command was added to BASIC which would assign the current value on the display line to a given variable, which could then be used in a program.

The program interpreter on the models did not provide human-readable error information. Errors encountered either in program execution or calculation evaluation would be returned as one of 9 error codes, usually indicated by replacing the display with text such as "ERROR 4". On the PC-7 model the list of error codes was printed above the text keypad, however with other models, users not familiar with the meaning of each code would have to refer to the manual. Due to their cryptic nature, a guide to the meanings of each code were often included somewhere on the device case or its standard accessories. Like other characteristics of this line, the meanings of the error codes were not necessarily equivalent from model to model.

[edit] See also

[edit] External links