Jump to content

Level I BASIC

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Jeffrey Henning (talk | contribs) at 13:16, 28 August 2017 (Language Features: Fixed some grammar). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Level I BASIC
Designed bySteve Leininger
First appeared1977
Influenced by
Tiny BASIC, Palo Alto Tiny BASIC
Influenced
TRS-80 Level II BASIC

Level I BASIC is a dialect of the BASIC programming language that shipped with the very first TRS-80, the TRS-80 Model I.

Background

The original prototype of the TRS-80 Model I ran Li-Chen Wang's public domain version of Tiny BASIC. During a demonstration to executives, Tandy Corporation's then President Charles Tandy tried to enter his salary, but - as Tiny BASIC used 2-byte signed integers ranging up to only 32,767 - wasn't able to. The result was a request for floating-point math for the production version.[1]

Besides adding single-precision floating-point math, Tandy-employee Steve Leininger extended the language to support input/output routines (keyboard, CRT, and reading and writing from cassettes). The language fit within 4 KB of ROM.[2] In a presentation announcing the TRS-80, Leininger said, "What we did, we went back through the Wang Basic and completely tore out about 60 per cent of it, the integer overhead and all that kind of stuff."[3]

Further Development

When the TRS-80 was introduced, three versions of BASIC were announced:

  • Level I BASIC
  • Level II BASIC - developed by Microsoft and using 12KB of ROM to add string handling, error handling, and dedicated functions
  • Level III BASIC - also developed by Microsoft, offering disk commands[4]

The Level I language was not available for the TRS-80 Model II but briefly re-surfaced as the baseline package for the TRS-80 Model III in 1981, selling for $699 compared to the $999 system with Model III BASIC (another Microsoft product). The language was identical to the Model I version but with the addition of commands to output to a printer.[5]

Language Features

Level I BASIC supported the following keywords:[6]

  • Commands: NEW, RUN, LIST, CONT (to continue or resume a program from a breakpoint)
  • Statements: PRINT, INPUT, READ, DATA, RESTORE, LET
  • Structure: GOTO, GOSUB, ON-GOTO, ON-GOSUB, RETURN, IF-THEN [but no ELSE], FOR-NEXT-STEP, STOP, END
  • Graphics: CLS, SET, RESET, POINT()
  • Functions: ABS(), INT(), RND(), MEM
  • Math: + - * /
  • Relational operators: < > = <= => <>
  • Logical operators: * [AND] + [OR]

Like Palo Alto Tiny BASIC on which it was based, Level I BASIC did not tokenize keywords the way that Microsoft BASIC did and instead - again, like Palo Alto Tiny BASIC did - relied on abbreviations to reduce the amount of memory used by keywords: C. for CONT, E. for END, F. for FOR, G. for GOTO, P. for PRINT, T. for THEN, and so forth (GOS. for GOSUB, REST. for RESTORE).

The language supported single-precision variables A to Z, strings A$ and B$, and the single pre-defined array A(). The language lacked a DIM statement for dimensioning the array, the size of which was determined by available memory not used by the program listing (4 bytes per item).[7]

As the language lacked many common math functions, the user manual provided subroutine listings for square root, exponentiation, exponentials, logarithms, arithmetic sign, and trigonometry functions.[8]

See also

References

  1. ^ Welsh, David and Welsh, Theresa Priming the Pump: How TRS-80 Enthusiasts Helped Spark the PC Revolution p. 7, Copyright © 2007
  2. ^ Reed, Matthew. "Level I BASIC". TRS-80.org. Retrieved 27 August 2017.
  3. ^ "Interview with Steven W. Leininger". TRS-80.com. Retrieved 28 August 2017.
  4. ^ Thomas, Wes (Sep–Oct 1977). "Radio Shack's $600 Home Computer". Creative Computing. 3 (5): 94–95.{{cite journal}}: CS1 maint: date format (link)
  5. ^ Reed, Matthew. "Was there a Level I Model III?". TRS-80.org. Retrieved 27 August 2017.
  6. ^ Lien, David (1977). User's Manual for Level I (PDF) (First ed.). Fort Worth, TX: Tandy Corporation. pp. 232–233. Retrieved 27 August 2017.
  7. ^ Lien, David (1977). User's Manual for Level I (PDF) (First ed.). Fort Worth, TX: Tandy Corporation. pp. 123–132. Retrieved 27 August 2017.
  8. ^ Lien, David (1977). User's Manual for Level I (PDF) (First ed.). Fort Worth, TX: Tandy Corporation. pp. 216–220. Retrieved 27 August 2017.