*** Welcome to piglix ***

Color BASIC

Color BASIC
Designed by Bill Gates
Developer Microsoft
First appeared 1980; 37 years ago (1980)
Stable release
Color BASIC 1.0 (1980)
Extended Color BASIC ("ECB") (1984)
Disk Extended Color BASIC ("DECB") (1984)
Platform TRS-80 Color Computer
OS B a s i c Family

Color BASIC is the implementation of Microsoft BASIC that is included in the ROM of the Tandy/Radio Shack TRS-80 Color Computers ("CoCos") manufactured between 1980 and 1991. BASIC (Beginners All-purpose Symbolic Instruction Code) is a high level language with simple syntax that makes it easy for novices to write simple programs. Color BASIC is interpreted, that is, decoded as it is run. Because of this, it is simple to edit and debug but performance is significantly lower than a compiled language such as C or assembly language.

Color BASIC 1.0 was released with the original 4k TRS-80 Color Computer in 1980. It resides on 8k bytes of ROM, and is responsible for all 'housekeeping' duties on the system. This includes hardware initialization, memory management, etc. Like most implementations of BASIC, each line of code starts with a line number and consists of one or more statements with variables and operators. 16k of memory is required for the next level of BASIC, Extended Color BASIC. ("ECB") Extended BASIC is required for the floppy disk controller, which then gives you Disk Extended Color BASIC. ("DECB") Emulators of the Color Computers running this programme interpreter and the others are available for modern computers, some of which require a "snapshot" file of the physical machine.

Color BASIC understands one type of numeric variable and string variables. Variable names in Color BASIC have the first two characters significant. The first character of the variable name must be a letter. The second can be either a letter or number. String variables are indicated by adding a dollar sign ($) after the variable name.

Numeric variables have only one type, a binary floating point implementation. Each numeric variable consumes 5 bytes of memory and can be in the range from -1E+38 up to 1E+37

Multidimensional arrays are also supported with both numeric and string variables. In the case of an array, the element address is enclosed with a parenthesis:

Multiple dimensions are separated by commas

Color BASIC provides several operators for both mathematic and, to a lesser extent, string operations.

Parenthesis ( ) are used to override mathematical order of operation

For testing, the following operators are used:

Other symbols used in BASIC:


...
Wikipedia

...