HOME

TheInfoList



OR:

Level I BASIC is a dialect of the BASIC programming language that shipped with the first
TRS-80 The TRS-80 Micro Computer System (TRS-80, later renamed the Model I to distinguish it from successors) is a desktop microcomputer launched in 1977 and sold by Tandy Corporation through their Radio Shack stores. The name is an abbreviation of '' ...
, the TRS-80 Model I.


Background

Tandy-employee Steve Leininger had written the first draft of the NIBL (National Industrial Basic Language)
BASIC interpreter A BASIC interpreter is an interpreter that enables users to enter and run programs in the BASIC language and was, for the first part of the microcomputer era, the default application that computers would launch. Users were expected to use the BAS ...
for the
SC/MP National Semiconductor's INS8060, or SC/MP (pronounced ''scamp'') for Simple Cost-effective Micro Processor, is an early 8-bit microprocessor which became available in April 1976. A unique feature of the SC/MP is a daisy-chained control pin that a ...
while employed at
National Semiconductor National Semiconductor was an American semiconductor manufacturer which specialized in analog devices and subsystems, formerly with headquarters in Santa Clara, California. The company produced power management integrated circuits, display dr ...
. Unable to take that source code with him, he initially hired a consultant to write an interpreter. When that contractor failed to deliver, he adapted Li-Chen Wang's public domain version of
Tiny BASIC Tiny BASIC is a family of Programming language#Dialects, flavors and implementations, dialects of the BASIC programming language that can fit into 4 or fewer kilobyte, KBs of random-access memory, memory. Tiny BASIC was designed in response to th ...
for the original prototype of the TRS-80 Model I. This required only 2 KB of memory for the interpreter, leaving an average of another 2 KB free for user programs in common 4 KB memory layouts of early machines. During a demonstration to executives,
Tandy Corporation Tandy Corporation was an American family-owned leather goods company based in Fort Worth, Texas, United States. Tandy Leather was founded in 1919 as a leather supply store. By the end of the 1950s, under the tutelage of then-CEO Charles Tandy, ...
's then-President Charles Tandy tried to enter his salary but was unable to do so. This was because Tiny BASIC used 2-byte signed integers with a maximum value of 32,767. The result was a request for floating-point math for the production version. This led to the replacement of the existing 16-bit integer code with a version using 32-bit
single-precision Single-precision floating-point format (sometimes called FP32 or float32) is a computer number format, usually occupying 32 bits in computer memory; it represents a wide dynamic range of numeric values by using a floating radix point. A floatin ...
floating-point numbers. Leininger further extended the language to support input/output routines (keyboard, CRT, and reading and writing from cassettes). The language fit within 4 KB of
ROM Rom, or ROM may refer to: Biomechanics and medicine * Risk of mortality, a medical classification to estimate the likelihood of death for a patient * Rupture of membranes, a term used during pregnancy to describe a rupture of the amniotic sac * ...
. 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."


Further Development

When the TRS-80 was introduced, three versions of BASIC were announced: * Level I BASIC * Level II BASIC - developed by
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washin ...
and using 12 KB of ROM to add string handling,
error handling In computing and computer programming, exception handling is the process of responding to the occurrence of ''exceptions'' – anomalous or exceptional conditions requiring special processing – during the execution of a program. In general, an ...
,
trigonometric Trigonometry () is a branch of mathematics that studies relationships between side lengths and angles of triangles. The field emerged in the Hellenistic world during the 3rd century BC from applications of geometry to astronomical studies. ...
and other dedicated functions * Level III BASIC - also developed by Microsoft, offering disk commands 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 two commands, the LLIST and the LPRINT, to output to a printer.


Language features

Level I BASIC supported the following keywords: * Commands: NEW, RUN, LIST, CONT (to continue or resume a program from a
breakpoint In software development, a breakpoint is an intentional stopping or pausing place in a program, put in place for debugging purposes. It is also sometimes simply referred to as a pause. More generally, a breakpoint is a means of acquiring know ...
) * Statements: PRINT, INPUT, READ, DATA, RESTORE, LET * Print modifiers: AT, TAB * Structure: GOTO, GOSUB, ON-GOTO, ON-GOSUB, RETURN, IF-THEN (but no ELSE), FOR-TO-STEP/NEXT, 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 In computer science, lexical analysis, lexing or tokenization is the process of converting a sequence of characters (such as in a computer program or web page) into a sequence of ''lexical tokens'' ( strings with an assigned and thus identified ...
keywords like
Microsoft BASIC Microsoft BASIC is the foundation software product of the Microsoft company and evolved into a line of BASIC interpreters and compiler(s) adapted for many different microcomputers. It first appeared in 1975 as Altair BASIC, which was the first ...
but used abbreviations to reduce the amount of memory used by keywords, such as F. for FOR, G. for GOTO, P. for PRINT, and T. for THEN. The language supported 26 single-precision variables A to Z, two strings A$ and B$ (limited to 16 characters each), and one pre-defined
array An array is a systematic arrangement of similar objects, usually in rows and columns. Things called an array include: {{TOC right Music * In twelve-tone and serial composition, the presentation of simultaneous twelve-tone sets such that the ...
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). As the language lacked many common math functions, the manual provided subroutine listings for
square root In mathematics, a square root of a number is a number such that ; in other words, a number whose ''square'' (the result of multiplying the number by itself, or  ⋅ ) is . For example, 4 and −4 are square roots of 16, because . ...
,
exponentiation Exponentiation is a mathematical operation, written as , involving two numbers, the '' base'' and the ''exponent'' or ''power'' , and pronounced as " (raised) to the (power of) ". When is a positive integer, exponentiation corresponds to r ...
,
exponentials Exponential may refer to any of several mathematical topics related to exponentiation, including: *Exponential function, also: **Matrix exponential, the matrix analogue to the above *Exponential decay, decrease at a rate proportional to value *Expo ...
,
logarithms In mathematics, the logarithm is the inverse function to exponentiation. That means the logarithm of a number  to the base  is the exponent to which must be raised, to produce . For example, since , the ''logarithm base'' 10 of ...
, arithmetic sign, and
trigonometry Trigonometry () is a branch of mathematics that studies relationships between side lengths and angles of triangles. The field emerged in the Hellenistic world during the 3rd century BC from applications of geometry to astronomical studies ...
functions. Graphics support was as minimal a set as possible: , for CLear Screen; , which lighted a location on the display; , which turned it off; and , which returned 1 if a location was lit, 0 if it was not. The coordinates could be any expression and ranged from 0 to 127 for the
X-axis A Cartesian coordinate system (, ) in a plane is a coordinate system that specifies each point uniquely by a pair of numerical coordinates, which are the signed distances to the point from two fixed perpendicular oriented lines, measured in ...
and 0 to 47 for the
Y-axis A Cartesian coordinate system (, ) in a plane is a coordinate system that specifies each point uniquely by a pair of numerical coordinates, which are the signed distances to the point from two fixed perpendicular oriented lines, measured i ...
. Only black-and-white display was supported.


References


External links


TRS-80 Level I BASIC Simulator

Conklin Systems - He Changed Our World
- tribute to the Level I BASIC user manual's personification of the computer {{BASIC Microcomputer software BASIC interpreters BASIC programming language family