Est. 1977 Beginner

BASIC - TRS-80

The BASICs of Radio Shack's TRS-80 Model I: a 4 KB Tiny BASIC descendant (Level I) that shipped in 1977, followed by Microsoft's 12 KB Level II in 1978, which turned the first mass-marketed home computer into a serious BASIC machine.

Created by Level I: Steve Leininger and Don French at Tandy/Radio Shack, adapted from Li-Chen Wang's Palo Alto Tiny BASIC, with the user manual by David A. Lien. Level II: Microsoft (Bill Gates is credited with the work)

Paradigm Procedural (line-numbered, unstructured BASIC)
Typing Dynamic. Level I: single-precision numbers, two fixed strings (A$, B$). Level II: integer, single- and double-precision numbers and variable-length strings
First Appeared 1977
Latest Version Level II BASIC (introduced 1978), with Disk BASIC on TRSDOS and third-party DOSes; the Model III (1980) carried a larger Level II ROM (reportedly 14-16 KB; sources differ)

BASIC on the TRS-80 is really two languages that shared a keyboard. Level I BASIC, a 4 KB descendant of Tiny BASIC, shipped with the TRS-80 Model I in 1977. Level II BASIC, a Microsoft product, followed in 1978 and became the dialect that most TRS-80 programmers actually learned. Between them they put a working BASIC in front of a large number of first-time computer users, at a time when Radio Shack’s reported 3,000-plus stores were the most likely place in America to see a computer at all.

This entry covers the Model I dialects and the later Model III ROM. It does not cover the Color Computer’s separate Color BASIC, which is a different Microsoft dialect for a different machine.

History & Origins

The machine

Tandy Corporation’s Radio Shack division announced the TRS-80 (Tandy Radio Shack, with a Zilog Z80 processor) at a New York City press conference on 3 August 1977. The computer alone cost $399, or $599 with a 12-inch monitor and a cassette recorder. The design came from buyer Don French and engineer Steve Leininger, who had been impressed by microcomputer kits such as the Altair. Radio Shack management was cautious, and the project was pitched partly on how cheaply it could be built.

Because the machine had only 4 KB of RAM as standard, the BASIC had to be small.

Level I: Tiny BASIC, with floating point

By published accounts, Level I began as an adaptation of Li-Chen Wang’s public-domain Palo Alto Tiny BASIC. Leininger recalled tearing out roughly 60 per cent of it, including the integer overhead.

Tiny BASIC used 16-bit signed integers, which top out at 32,767. Accounts of the project say that during a demonstration Charles Tandy could not enter his own salary, which led to a request for floating-point maths. The production Level I therefore used 32-bit single-precision numbers, and Leininger added input and output routines for the keyboard, the display and cassette. The whole interpreter fits in 4 KB of ROM. By published accounts, Leininger and French chose which commands to keep, and David A. Lien wrote the user manual.

Level II: Microsoft’s BASIC

Radio Shack always meant Level I as a stopgap. The January 1978 Model I brochure already promised Level II as “coming soon”, and it was introduced in mid-1978. It was licensed from Microsoft and is an abridged form of Microsoft’s 16 KB Extended BASIC, sized to fit the Model I’s 12 KB of ROM space. Bill Gates has reportedly described it as an intermediate between 8K BASIC and Extended BASIC, with double-precision variables and PRINT USING put in. He also reportedly said development took about four weeks (a recollection, not a documented schedule).

Level II was required in order to use the Expansion Interface, and with it the disk drives. Microsoft additionally sold a Level III BASIC on cassette, with disk commands and more TRS-80-specific features; many of its ideas reappear in the Model III’s ROM BASIC and in Disk BASIC.

Design Philosophy

Level I was designed around one constraint, memory. Level II was designed around another: fitting a real Microsoft BASIC into a fixed ROM budget.

  • Level I saves bytes on the programmer’s side. It does not tokenise keywords; reserved words are stored as typed, so users abbreviate them with a period, for example P. for PRINT, G. for GOTO, F. for FOR and T. for THEN. Typing P. instead of PRINT saves three bytes of program memory.
  • Level II follows the Microsoft model. Keywords are tokenised, and the language looks like the other Microsoft BASICs of the period, which is why programs from magazines needed only modest changes between machines.
  • The manual is part of the design. Lien’s Level I manual addressed people “who don’t know anything about computers”, and reviewers noted its quality even when they criticised the machine.

Key Features

Level I BASIC

According to the published keyword list:

GroupKeywords
CommandsNEW, RUN, LIST, CLOAD, CSAVE, CONT
StatementsPRINT, INPUT, READ, DATA, RESTORE, LET, REM
Control flowGOTO, GOSUB, ON-GOTO, ON-GOSUB, RETURN, IF-THEN (no ELSE), FOR-TO-STEP, NEXT, STOP, END
GraphicsCLS, SET, RESET, POINT()
FunctionsABS(), INT(), RND(), MEM

Data was limited: 26 single-precision variables named A to Z, two strings (A$ and B$, up to 16 characters each) and one predefined array A() with no DIM, sized by whatever memory the program left free. The manual supplied subroutine listings for square root, exponentiation, logarithms and trigonometry because the language had none of those functions built in.

Graphics were block characters on a 128 by 48 grid, black and white only, driven by SET(x,y), RESET(x,y) and POINT(x,y).

Level II BASIC

Level II added, among other things, string handling, double-precision arithmetic, PRINT USING, a much larger function set and error handling, in a tokenised form. The same block-graphics commands remained the machine’s only built-in graphics. Level II also reserved some keywords for Disk BASIC, and using one without a disk system produces an L3 ERROR, a leftover from the changes in direction between the Level II ROMs and Disk BASIC.

A short example in the style of the period:

1
2
3
4
5
10 CLS
20 INPUT "YOUR NAME";N$
30 FOR I=1 TO 5
40 PRINT "HELLO, ";N$
50 NEXT I

Storage

Programs were saved to cassette with CSAVE and loaded with CLOAD. Published descriptions of the Model I give the cassette rate as 250 baud (about 30 bytes per second) under Level I and 500 baud (about 60 bytes per second) under Level II; the Model III reportedly offered 500 baud as its default with 1,500 baud as an optional faster rate. Disk BASIC on the Expansion Interface added disk I/O, and some third-party DOSes (NewDos/80, MultiDOS, DosPlus, LDOS) extended it further.

Evolution

DateChange
Aug 1977Level I BASIC ships in 4 KB ROM with the Model I
Mid-1978Level II BASIC (12 KB ROM), from Microsoft
After Level IIDisk BASIC layered on Level II when a disk system is attached
Mid-1980Model III: enlarged Level II ROM, with a few Disk BASIC features
1981Level I re-appears as the Model III’s entry configuration, with LPRINT and LLIST added
1983Model 4 keeps Model III BASIC compatibility

Level I reportedly remained available on the Model I after Level II arrived. Customers and developers complained about bugs in the Model III’s BASIC interpreter and TRSDOS, and Radio Shack and magazines such as 80 Micro printed patches.

Current Relevance

This is a historical language. No current hardware runs it natively and there is no official container image. It survives through emulators and simulators, including browser-based ones for Level I and Model III BASIC (several JavaScript TRS-80 emulators exist), and through scans of manuals and magazines. Enthusiasts also keep original machines running.

Why It Matters

  • It reached ordinary shoppers. The TRS-80 was among the first mass-produced, mass-marketed home computers, sold through Radio Shack stores, and BASIC was the first thing a buyer met when they switched it on.
  • It shows Tiny BASIC’s reach. Level I is a documented example of a public-domain Tiny BASIC being adapted for a commercial product, with floating point added on the request of a company president.
  • It marks the move to Microsoft BASIC. Level I was a stopgap, and Level II shows how quickly Microsoft’s BASIC became the standard for microcomputers.
  • The manual set a standard. Lien’s approachable Level I manual is still remembered as an early model of teaching beginners to program.

Sources and caveats

Much of the detail above comes from Wikipedia’s TRS-80 and Level I BASIC articles, which in turn cite period sources (BYTE, InfoWorld, contemporary press). I did not directly check the primary manuals, so the following remain unverified in the original documents: Leininger’s “60 per cent” figure, the Charles Tandy salary anecdote, Gates’s four-week remark, the cassette baud rates, the Model III ROM size and release date, the Model I end-of-production date, the Radio Shack store count, and the exact month Level II shipped (“mid-1978”).

Timeline

1977
Radio Shack announces the TRS-80 at a press conference in New York City on 3 August 1977, at $399 for the computer alone or $599 with a monitor and cassette recorder. It ships with Level I BASIC in 4 KB of ROM and 4 KB of RAM
1978
Radio Shack's first Model I brochure of January 1978 lists Level II BASIC as "coming soon"; Level II, licensed from Microsoft and fitted in 12 KB of ROM, is introduced in mid-1978 with string handling, double-precision arithmetic and error trapping
1980
The TRS-80 Model III is released in mid-1980 (reportedly late July) with an enlarged Level II BASIC ROM that folds in some Disk BASIC features; Model I production reportedly ends around the turn of 1980-81
1981
Radio Shack sells a 4 KB Model III with Level I BASIC (identical to the Model I version plus LPRINT and LLIST) for $699, alongside the $999 Level II machine
1983
The TRS-80 Model 4 arrives in 1983 (reportedly April), largely compatible with Model III software including its Level II BASIC, according to Radio Shack's positioning of the machine

Notable Uses & Legacy

Level I BASIC User's Manual

David A. Lien's manual for Level I taught programming with text and cartoons and was widely praised by contemporary reviewers; it is often credited with making the machine approachable to people who had never used a computer

Home and school programming

Radio Shack sold the TRS-80 to small businesses, educators and hobbyists; BASIC listings typed in from magazines and books, and BASIC programs saved to cassette, were the machine's everyday software

Cassette-based games and utilities

Commercially and privately distributed programs loaded with CLOAD, at 250 baud under Level I and 500 baud under Level II according to published descriptions of the Model I

Hardware diagnostics on the Model III

On the Model III, holding Break at power-up or reset boots into the ROM-based Level II BASIC, which could reportedly be used with PEEK and POKE for simple hardware checks when no boot disk was available

Language Influence

Influenced By

Tiny BASIC Microsoft BASIC

Running Today

Run examples using the official Docker image:

docker pull
Last updated: