Designed by | Bill Gates [1] |
---|---|
Developer | Microsoft |
First appeared | 1980 |
Stable release | Color BASIC 1.3 (1982) Extended Color BASIC ("ECB") (1984) Disk Extended Color BASIC ("DECB") (1984) |
Platform | TRS-80 Color Computer |
Color BASIC is the implementation of Microsoft BASIC that is included in the ROM of the Tandy/Radio Shack TRS-80 Color Computers manufactured between 1980 and 1991. BASIC (Beginner's All-purpose Symbolic Instruction Code) is a high level language with simple syntax that makes it easy to write simple programs. Color BASIC is interpreted, that is, decoded as it is run.
The nucleus of Color BASIC was Microsoft BASIC-69 which Tandy licensed from Microsoft. 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, interrupt processing, 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 interpreter and the others are available for modern computers, some of which require a "snapshot" file of the physical machine. [2]
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.
A=5A$="THIS IS A STRING"K7=10BB$="HELLO!"ZZ=1.54
Numeric variables have only one type, a binary floating point implementation. Each numeric variable uses 5 bytes of memory and can be in the range from -1E+38 up to 1E+37.
Unlike most implementations of Microsoft BASIC, Color BASIC requires the user to reserve space for string variables via the CLEAR statement.
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:
A(1)=1A$(1)="BOOKS"
Multiple dimensions are separated by commas
A(1,3)=4A$(2,2)="XYZ123"
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:
num indicates a numeric expression is required. This can be a fixed number, a variable, or other operation or function that returns a numeric quantity.
str indicates a string expression is required. This can be a static string value (in quotes), a string variable, or other function or expression that returns a string of characters.
device number indicates a device. By default, device 0 (screen and keyboard) is assumed. In Color BASIC, device #-1 (cassette) and #-2 (printer) are available to the programmer.
If you make a mistake typing in a line, you can either retype it from scratch (or DEL it).. or you can EDIT it. When in EDIT mode, you get a reprint of the line, and a second copy that you SPACEbar across chars. You cannot use arrow keys. backspace takes you left, but does not actually erase it in the buffer. 'i' puts you in insert mode. pressing return gets you out of it. 'c' changes one char, 'd' deletes one char. 'x' takes you to end of line, allowing you to e'x'tend it. 'l' redraws the line. 's' searches for the next instance of a character. For the 's', 'c' and 'd' commands you can also enter a number (#) before pressing any of them which will: 's' - search for the # instance of the character, 'c' - allow you to change # of characters, 'd' - delete # amount characters.
ABS(num)
ASC(str)
CHR$(num)
EOF(device number)
INKEY$
INT(num)
INSTR(startpos,search str,target str)
JOYSTK(num)
LEFT$(str,num)
LEN(str)
MEM
MID$(str,start num,length num)
PEEK(num)
POINT(x num,y num)
RIGHT$(str,position num)
RND(number)
SGN(num)
SIN(num)
STR$(num)
USR(num)
AUDIO [ON|OFF]
CLEAR variable space[,highest memory location]
CLOAD ["name"]
CLOADM ["name"]
CLOSE [device number]
CLS(num)
CONT
CSAVE ["name"]
DATA var,var,var...
DIM variable(dimension[,dimension 2,...]
END
EXEC
INPUT [device number] [{prompt text};] variable [,variable 2, variable n]
LIST [starting line] - [ending line]
LLIST [starting line] - [ending line]
MOTOR [ON|OFF]
NEW
ON {num} GOSUB line 1, line 2, ... line n
ON (num) GOTO line 1, line 2, ... line n
OPEN "[I|O]",device number[,"filename"]
POKE memory address, data
PRINT device number,expression
PRINT @{screen position} expression
READ variable[,variable,...]
RENUM NewStart num, OldStart num, Increment num
RESET(x,y)
RESTORE
RETURN
RUN num
SET(x,y,color)
SKIPF ["filename"]
SOUND tone,duration
STOP
TAB(column)
VAL(str)
GOSUB {line number}
GOTO {line number}
IF {test} THEN {command(s)} [ELSE {command(s)}]
FOR {num} = {number} TO {number} [STEP {number}] ... NEXT (num)
/0
AO
BS
CN
DD
DN
DS
FC
FD
FM
ID
IE
IO
LS
NF
NO
OD
OM
OS
OV
RG
SN
ST
TM
UL
There are a few subroutines available for machine language programs in the Color BASIC ROM that are available for general purpose programming.
POLCAT
CHROUT
CSRDON
BLKIN
BLKOUT
JOYIN
Applesoft BASIC is a dialect of Microsoft BASIC, developed by Marc McDonald and Ric Weiland, supplied with the Apple II series of computers. It supersedes Integer BASIC and is the BASIC in ROM in all Apple II series computers after the original Apple II model. It is also referred to as FP BASIC because of the Apple DOS command FP
used to invoke it, instead of INT
for Integer BASIC.
Tiny BASIC is a family of dialects of the BASIC programming language that can fit into 4 or fewer KBs of memory. Tiny BASIC was designed by Dennis Allison and the People's Computer Company (PCC) in response to the open letter published by Bill Gates complaining about users pirating Altair BASIC, which sold for $150. Tiny BASIC was intended to be a completely free version of BASIC that would run on the same early microcomputers.
Atari BASIC is an interpreter for the BASIC programming language that shipped with the Atari 8-bit family of 6502-based home computers. Unlike most American BASICs of the home computer era, Atari BASIC is not a derivative of Microsoft BASIC and differs in significant ways. It includes keywords for Atari-specific features and lacks support for string arrays, for example.
Integer BASIC is a BASIC interpreter written by Steve Wozniak for the Apple I and Apple II computers. Originally available on cassette for the Apple I in 1976, then included in ROM on the Apple II from its release in 1977, it was the first version of BASIC used by many early home computer owners.
Commodore BASIC, also known as PET BASIC or CBM-BASIC, is the dialect of the BASIC programming language used in Commodore International's 8-bit home computer line, stretching from the PET (1977) to the Commodore 128 (1985).
The syntax of the C programming language is the set of rules governing writing of software in C. It is designed to allow for programs that are extremely terse, have a close relationship with the resulting object code, and yet provide relatively high-level data abstraction. C was the first widely successful high-level language for portable operating-system development.
TI BASIC is an ANSI-compliant interpreter for the BASIC programming language built into the 1979 Texas Instruments TI-99/4 home computer and its improved 1981 version, the TI-99/4A.
In computer programming, array slicing is an operation that extracts a subset of elements from an array and packages them as another array, possibly in a different dimension from the original.
FOCAL is an interactive interpreted programming language based on JOSS and mostly used on Digital Equipment Corporation (DEC) Programmed Data Processor (PDP) series machines.
Vilnius BASIC, sometimes known as BK BASIC, is a dialect of the BASIC programming language running on the Elektronika BK-0010-01/BK-0011M and UKNC computers. It was developed at Vilnius University, located in Lithuania which was a republic of the Soviet Union at the time.
HP Time-Shared BASIC is a BASIC programming language interpreter for Hewlett-Packard's HP 2000 line of minicomputer-based time-sharing computer systems. TSB is historically notable as the platform that released the first public versions of the game Star Trek.
Simons' BASIC is an extension to BASIC 2.0 for the Commodore 64 home computer. Written by British programmer David Simons in 1983, who was 16 years old at the time, it was distributed by Commodore as a cartridge.
Galaksija BASIC was the BASIC interpreter of the Galaksija build-it-yourself home computer from Yugoslavia. While being partially based on code taken from TRS-80 Level 1 BASIC, which the creator believed to have been a Microsoft BASIC, the extensive modifications of Galaksija BASIC—such as to include rudimentary array support, video generation code and generally improvements to the programming language—is said to have left not much more than flow-control and floating point code remaining from the original.
IBM System/36 BASIC was an interpreter for the IBM System/36 midrange computer.
The structure of the Perl programming language encompasses both the syntactical rules of the language and the general ways in which programs are organized. Perl's design philosophy is expressed in the commonly cited motto "there's more than one way to do it". As a multi-paradigm, dynamically typed language, Perl allows a great degree of flexibility in program design. Perl also encourages modularization; this has been attributed to the component-based design structure of its Unix roots, and is responsible for the size of the CPAN archive, a community-maintained repository of more than 100,000 modules.
In computer programming, a function, subprogram, procedure, method, routine or subroutine is a callable unit that has a well-defined behavior and can be invoked by other software units to exhibit that behavior.
BASIC 1.0 is the standard BASIC language for Thomson computers, which is the reference for the entire range. This is an implementation of Microsoft BASIC (BASIC-69). It was used to introduce children from France to programming in the 1980s. Three languages were mainly taught: LSE, BASIC and LOGO. School textbooks programs were given in BASIC 1.0 for Thomson and sometimes in ExelBasic for the Exelvision EXL 100.
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 BASIC interpreter to type in programs or to load programs from storage.
Wang BASIC is a series of BASIC programming languages for computers from Wang Laboratories. The term can be used to refer to the BASIC on any Wang machine, but is mostly associated with the versions on the Wang 2200 minicomputer series of the early 1970s. When these machines were updated to the VP series in 1976, BASIC-2 was introduced and remained the pattern for future machines in the 2200 series. A planned BASIC-3 was never released.
Acorn System BASIC and Atom BASIC are two closely related dialects of the BASIC programming language developed by Acorn Computers for their early microcomputers like the Acorn System 3 and Acorn Atom. Developed in-house, they have a number of significant idiosyncrasies compared to most BASIC dialects of the home computer era.