trs80:
TRS-80
Keywords
Radio Shack's legendary TRS-80 brand was kind of abused in very different computer lines, but here we refer to the BASICs used in the very popular line of Z80-based machines Model I, Model III and a handful of compatible clones.
Actually, there were two official BASICs for the TRS-80 line, from different lineages, but made to look very similar. The original Level I BASIC had its roots in TinyBASIC, but was not exactly that tiny. Most of its statements and commands were faithfully adapted to Level II BASIC, written by Microsoft from its Altair BASIC codebase. Thus, Level I is the version this site refers to as "common TRS-80 BASIC".
While the keyword set in both versions was quite similar, Level I was a 4KB ROM implementation of BASIC, made for a 4K RAM Model I. It had to cut down somewhere.
Where it is/was used
- Tandy/Radio Shack TRS-80 Model I
- Tandy/Radio Shack TRS-80 Model III
- Prologica CP-500 (Brazil)
Noteworthy characteristics
Level I BASIC was severely limited in variables and error messages. A program could use 26 single-letter numeric variables, 2 string variables called A$ and B$, and one single array variable named A. If something was wrong in the program, the interpreter would let you guess what happened by showing one of three single-word messages:
HOW?
WHAT?
SORRY
Also, the interpreter did not implement tokenization of keywords, which allowed other BASICs to save a lot of memory for program listings. To circumvent this, there were 27 abbreviations, differently interpreted when used as commands in direct mode or as statements or functions within a program:
- A. for ABS
- C. for CONT
- D. for DATA
- E. for END
- F. for FOR
- G. for GOTO
- GOS. for GOSUB
- I. for INT
- IN. for INPUT
- L. for LIST
- M. for MEM
- REA. for READ
- REST. for RESTORE
- RET. for RETURN
- ST. for STOP
If you think that understanding a program written with these abbreviations may be difficult, just think how it must have been to implement them, especially with some repeated letters. Man, those days were for the brave. Abbreviations were left behind with Level II BASIC, and programs written with them required a conversion utility for being read and executed by the newer version.
Environment and usage
Extensions
Curiosities
LPRINT and LLIST were late additions to Level I BASIC, implemented in the version offered with the TRS-80 Model III.
Wikipedia's article about Level I says that floating-point support was implemented after Charles Tandy himself tried but could not enter his salary in a Model I prototype.
Related to...
Influenced by
- TinyBASIC, more specifically Lin Chen's Palo Alto Tiny BASIC
Influence for
Versions and successors
After Level I BASIC, the TRS-80 computer line had the following official extensions and versions:
- Disk BASIC was more like an extension for Level II, disk-equipped machines, which added not only disk-related keywords, but also some not disk-specific statements and commands which were common in other Microsoft BASICs
- Level III BASIC was sold apart as a spin-off of Disk BASIC which mostly allowed the mentioned not-disk-specific keywords to be used with cassette-only machine
References
- User's Manual for Level 1 - TRS-80 Micro Computer System. Radio Shack. 2nd printing. Fort Worth, USA, 1978. Available at https://www.classic-computers.org.nz/system-80/software-manuals/manuals-Level-1-Users-Manual.pdf, last check 2023-03-08.
- Ira Goldklang's TRS-80 Revived Site - TRS-80 Model I - https://www.trs-80.com/wordpress/models/model-1/ , last check 2023-03-08
- https://en.wikipedia.org/wiki/TRS-80 , last check 2023-03-08
- Matthew Reed's TRS-80.org - Level I BASIC - http://www.trs-80.org/level-1-basic/ , last check 2023-03-08