HP Time-Sharing BASIC

From Wikipedia, the free encyclopedia

HP Time-Sharing BASIC (HP TSB) was a computer system sold by the Hewlett-Packard Corporation based on their HP 2100 line of minicomputers. The system implemented a dialect of the BASIC programming language. The software run on the system was also known by its versioned name such as HP 2000C Time-Sharing BASIC.

The system was implemented using a dual-processor architecture. One fully-configured HP 2100 processor was used for execution of most of the system code and all of the user code and a second, smaller HP 2100 system was used to handle the RS-232 serial lines through which the time-sharing users connected. Depending on the hardware configuration, the system supported between 16 and 32 simultaneous remote users with the possibility of hundreds of user accounts. The usual terminal for a TSB system was an ASR-33 Teletype connected through a modem or acoustic coupler.

During execution, user programs were swapped to fixed-head magnetic drum storage. When not executing, user programs were stored on moving-head cartridge- or pack-loaded disk storage. Privileged users could also store programs on the much-faster drum. Backup was to magnetic tape.

The language was a fairly standard implementation of BASIC, providing an integrated editing and runtime environment. Statements were analyzed for correct syntax as they were entered and then stored in semi-compiled form. The language supported:

  • 4-byte floating-point variables of the form "A" or "An" (where A is a single letter and n a single, optional digit).
  • String variables of the form "A$" or "An$". Strings could store up to 80 characters
  • One- or two-dimensional matrix (array) variables of the form "A[x,y]" or "An[x,y]"
  • Matrix operations
  • File operations
  • Punched tape operations using a Teletype

Sub-strings within strings were accessed using a substring notation: "A$[L,R]" where L specified the leftmost byte to be accessed and R specified the rightmost byte to be accessed. This is in sharp contrast to some other BASICs that use functions such as LEFT$(), MID$(), and RIGHT$() to access substrings.