ArticleslgStudy

computer science

HP Time-Shared BASIC

HP Time-Shared BASIC is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand HP Time-Shared BASIC rather than just read about it. In short: HP Time-Shared BASIC (HP TSB) is a BASIC programming language interpreter for Hewlett-Packard's HP 2000 line of minicomputer-based time-sharing computer systems. TSB is historically notable as the platform that released the first public versions of the game Star Trek.

Key takeaways

  • HP Time-Shared BASIC belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect HP Time-Shared BASIC to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of HP Time-Shared BASIC from memory before moving on to harder problems.

Reference excerpt

HP Time-Shared BASIC (HP TSB) is a BASIC programming language interpreter for Hewlett-Packard's HP 2000 line of minicomputer-based time-sharing computer systems. TSB is historically notable as the platform that released the first public versions of the game Star Trek. The system implements a dialect of BASIC as well as a rudimentary user account and program library that allows multiple people to use the system at once. The systems were a major force in the early-to-mid 1970s and generated a large number of programs. HP maintained a database of contributed-programs and customers could order them on punched tape for a nominal fee. Most BASICs of the 1970s trace their history to the original Dartmouth BASIC of the 1960s, but early versions of Dartmouth did not handle string variables or offer string manipulation features. Vendors added their own solutions; HP used a system similar to Fortran and other languages with array slicing, while DEC later introduced the MID/LEFT/RIGHT functions. As microcomputers began to enter the market in the mid-1970s, many new BASICs appeared that based their parsers on DEC's or HP's syntax. Altair BASIC, the original version of what became Microsoft BASIC, was patterned on DEC's BASIC-PLUS. Others, including Apple's Integer BASIC, Atari BASIC, and North Star BASIC were patterned on the HP style. This made conversions between these platforms somewhat difficult if string handling was encountered.

Nomenclature The software was also known by its versioned name, tied to the hardware version on which it ran, such as HP 2000C Time-Shared BASIC and the operating system came in different varieties — 2000A, 2000B, 2000C, High-Speed 2000C, 2000E, and 2000F. HP also referred to the language as "Access BASIC" in some publications. This matched the naming of the machines on which it ran, known as the "2000/Access" in some publications. This terminology appears to have been used only briefly when the platform was first launched.

Platform details Except for the 2000A and 2000E systems, the system is implemented using a dual-processor architecture. One fully configured HP 2100-series processor is used for the execution of most of the system code and all of the user code, while a second, smaller HP 2100-series processor is used to handle the RS-232 serial lines through which the time-sharing users connected. Depending on the hardware configuration, the system supports up to 16 or up to 32 simultaneous remote users. The usual terminal for a TSB system was a Teletype Model 33 ASR and connected directly to the I/O processor or through a modem or acoustic coupler. Account names are a combination of one alphabetic character, followed by three decimal digits, e.g., B001. Privileged accounts started with the letter "A" and had some additional command and program storage capabilities. The superuser account is A000. This scheme allows up to 26,000 user accounts. During execution, user programs are swapped to a fixed-head drive — physically a disk, but operating like a magnetic drum. When not executing, user programs are stored on moving-head cartridge- or pack-loaded disk storage. Privileged users can also store programs on the much-faster drum. The hard drive was backed up to magnetic tape. Program names and file names consist of up to six alphabetic characters. Legal characters are A-Z, 0-9, and !"#%&'()+-./:;<=>?@[\]. (No * or $, no lowercase a-z, no {|}`~.) The editor holds programs in a tokenized format, and stores them to disk using the SAVE command or the CSAVE command. The system "semi-compiles" the program before executing (RUN) and decompiles it before LISTing, EDITing, RENUMbering, or APPENDing. "Semi-compilation" replaces every line number in every statement with an absolute address, for faster execution, and appends a table of line numbers after the program to allow "semi-compilation" to be undone when needed. SAVE stores the uncompiled program to disk. After loading a large SAVEd program, listing or editing starts instantly, but RUNning the program incurs a pause for semi-compilation. CSAVE stores the slightly larger semi-compiled program to disk. After loading a large CSAVEd program, RUNning the program starts instantly, but LISTing or EDITing incurs a pause for "decompilation" before commencing. In this HP BASIC-only environment, programs cannot READ characters or lines from files, only native numbers and entire strings (almost identically to READing from DATA statements). HP TSB stores no line endings in its tokenized BASIC data files (nor in its tokenized BASIC program files). BASIC programs can neither read nor write a program file; crossing over can only be accomplished by punching a tape and then reading it back in, but that is neither necessary nor useful.

Syntax The language is a fairly standard implementation of BASIC, providing an integrated editing and runtime environment. Statements are analyzed for correct syntax as they are entered and then stored in tokenized form. Each BASIC statement must be on a uniquely numbered line, e.g.

Line numbers are mandatory, and statements are automatically placed in ascending numeric sequence. TSB lines can contain one statement; chaining multiple statements with the colon as in MS BASIC is not supported. Multiple variable assignments are allowed, e.g., 20 LET A=B=C=42. As in most versions of BASIC, use of the word "LET" was optional. In the earliest version (2000A), the language supported the following features. Later versions added many more features.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with HP Time-Shared BASIC

Start with the simplest possible case. Write down what HP Time-Shared BASIC claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to HP Time-Shared BASIC before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about HP Time-Shared BASIC ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of HP Time-Shared BASIC

In research
HP Time-Shared BASIC appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses HP Time-Shared BASIC in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
HP Time-Shared BASIC is common in secondary-school and first-year university syllabi. It links to neighbouring topics BASIC interpreters, BASIC programming language, BASIC programming language family, so understanding it makes those chapters shorter.
In everyday life
Look for HP Time-Shared BASIC outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “HP Time-Shared BASIC” →

How to study HP Time-Shared BASIC in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what HP Time-Shared BASIC means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain HP Time-Shared BASIC out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is HP Time-Shared BASIC in simple terms?

HP Time-Shared BASIC (HP TSB) is a BASIC programming language interpreter for Hewlett-Packard's HP 2000 line of minicomputer-based time-sharing computer systems. TSB is historically notable as the platform that released the first public versions of the game Star Trek.

Why does HP Time-Shared BASIC matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study HP Time-Shared BASIC?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on HP Time-Shared BASIC.

Tags

  • BASIC interpreters
  • BASIC programming language
  • BASIC programming language family
  • HP software
  • Time-sharing operating systems

Keep exploring