Designed by | Microsoft |
---|---|
Developer | Microsoft |
First appeared | 1975 (cf. Altair BASIC) |
Stable release | cf. Visual Basic .NET / 2018 |
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 version of BASIC published by Microsoft as well as the first high-level programming language available for the Altair 8800 microcomputer.
During the home computer craze of the late-1970s and early-1980s, BASIC was ported to and supplied with many home computer designs. Slight variations to add support for machine-specific functions, especially graphics, led to a profusion of related designs like Commodore BASIC and Atari Microsoft BASIC.
As the early home computers gave way to newer designs like the IBM Personal Computer and Macintosh, BASIC was no longer as widely used, although it retained a strong following. The release of Visual Basic reboosted its popularity and it remains in wide use on Microsoft Windows platforms in its most recent incarnation, Visual Basic .NET.
The Altair BASIC interpreter was developed by Microsoft founders Paul Allen and Bill Gates using a self-written Intel 8080 emulator running on a PDP-10 minicomputer. [1] The MS dialect is patterned on Digital Equipment Corporation's BASIC-PLUS on the PDP-11, which Gates had used in high school. [2] The first versions supported integer math only, but Monte Davidoff convinced them that floating-point arithmetic was possible, and wrote a library which became the Microsoft Binary Format.
Altair BASIC was delivered on paper tape and in its original version took 4 KB of memory. The following functions and statements were available:
LIST
, NEW
, PRINT
, INPUT
, IF...THEN
, FOR...NEXT
, SQR
, RND
, SIN
, LET
, USR
, DATA
, READ
, REM
, CLEAR
, STOP
, TAB
, RESTORE
, ABS
, END
, INT
, RETURN
, STEP
, GOTO
, and GOSUB
.
There were no string variables in 4K BASIC and single-precision 32-bit floating point was the only numeric type supported. Variable names consisted of one letter (A–Z) or one letter followed by one digit (0–9), thus allowing up to 286 numeric variables.
For machines with more memory, the 8 KB version added 31 additional statements and support for string variables and their related operations like MID$ and string concatenation. String variables were denoted with a $ suffix, which remained in later versions of the language. Later on, Microsoft released the 12K Extended BASIC, which included double precision 64-bit variables, IF
...THEN
...ELSE
structures, user defined functions, more advanced program editing commands, and descriptive error messages as opposed to error numbers. Numeric variables now had three basic types, % denoted 16-bit integers, # denoted 64-bit doubles, and ! denoted 32-bit singles, but this was the default format so the ! is rarely seen in programs.
The extended 8 KB version was then generalized into BASIC-80 (8080/85, Z80), and ported into BASIC-68 (6800), BASIC-69 (6809), and 6502-BASIC. The 6502 had somewhat less dense assembler code and expanded in size to just under 8K for the single precision version, or 9K for a version using an intermediate 40-bit floating point format in place of the original 32-bit version. This new 40-bit format became the most common as it was used on most 6502-based machines of the era. It was also ported to the 16-bit BASIC-86 (8086/88).
The final major release of BASIC-80 was version 5.x, which appeared in 1981 and added support for 40-character variable names, WHILE
...WEND
loops, dynamic string allocation, and several other features. BASIC 5.x removed the ability to crunch program lines.
The core command set and syntax are the same in all implementations of Microsoft BASIC and, generally speaking, a program can be run on any version if it does not use hardware-specific features or double precision numbers (not supported in some implementations).
After the initial success of Altair BASIC, Microsoft BASIC became the basis for a lucrative software licensing business, being ported to the majority of the numerous home and other personal computers of the 1970s and especially the 1980s, and extended along the way. Contrary to the original Altair BASIC, most home computer BASICs are resident in ROM, and thus are available on the machines at power-on in the form of the characteristic "READY
". prompt. Hence, Microsoft's and other variants of BASIC constitute a significant and visible part of the user interface of many home computers' rudimentary operating systems.
By 1981, Microsoft BASIC was so popular that even companies that already had a BASIC licensed the language, such as IBM for its Personal Computer, [3] and Atari, which sold both Atari Microsoft BASIC and its own Atari BASIC. [4] IBM's Don Estridge said, "Microsoft BASIC had hundreds of thousands of users around the world. How are you going to argue with that?" [3] Microsoft licensed similar versions to companies that competed with each other. After licensing IBM Advanced BASIC (BASICA) to IBM, for example, Microsoft licensed the compatible GW-BASIC to makers of PC clones, and sold copies to retail customers. [5] The company similarly licensed an Applesoft-compatible BASIC to VTech for its Laser 128 clone. [6]
Known variants:
MBASIC is available for CP/M-80 and ISIS-II. Also available for TEKDOS.
MBASIC is a stripped-down BASIC-80 with only hardware-neutral functions. However, due to the popularity of CP/M, the great majority of Z80 machines ran MBASIC, rather than a version customized for specific hardware (TRS-80 BASIC was one of the few exceptions). Microsoft's CP/M card for the Apple II included a modified version of MBASIC that incorporated some of the graphics commands from Applesoft BASIC, such as HPLOT
, but the full command set is not supported.
The first implementation to use an 8-bit variant of the File Allocation Table (FAT) was a BASIC adaptation [nb 1] for an Intel 8080-based NCR 7200, [nb 1] 7520, [nb 1] or 7530 [nb 1] data-entry terminal with 8-inch floppy disks in 1977/1978.
Microsoft offered a BASIC compiler for BASIC-80 under CP/M, by 1980 or before. The compiler executable was named BASCOM or BASCOM32. [8]
The TRS-80 computer was offered initially with an adaption of Li-Chen Wang's Tiny BASIC (Level I BASIC); within a few months this was replaced by a port of BASIC-80 which incorporated some of Level I BASIC's command set, particularly the commands for setting graphics characters. Level II BASIC contained some of the features of Extended BASIC, although due to the need to include Level I commands such as SET
and PSET
, other features such as descriptive error messages still had to be left out; these were subsequently added into TRS-80 Disk BASIC.
The TRS-80 Model 4 had a newer disk-based BASIC that utilized the BASIC-80 5.x core, which included support for 40-character variable names. Thus the ability to crunch program lines (without spaces between keywords and arguments) was no longer possible as it had been in Level II. It was no longer necessary to reserve string space. New features included user defined functions (DEF FN
) and access to TRSDOS 6 system functions via a SYSTEM
keyword. A modified version published later by OS provider Logical Systems, in the LS-DOS Version 6.3 update, added single-letter access to BASIC control functions (like LIST
and EDIT
) and direct access to LS-DOS supervisor calls. The program edit environment was still line-oriented. The facility available in Level II to sort arrays (CMD"O"
) was not available; programmers and users had to devise their own workarounds.
The first implementation as a standalone disk-based language system was for Seattle Computer Products S-100 bus 8086 CPU card in 1979. It was utilizing an 8-bit FAT file system.
Microsoft also offered a version of Standalone BASIC-86 for SBC-86/12 for Intel's 8086 Single Board Computer platform in 1980.
This is the version of BASIC used on the TI-99/4A home computer. Although very similar to Microsoft BASIC, it was not written by Microsoft as was widely rumored. According to TI Engineer H. Schuurman, "They (in the form of Bob Greenberg of Microsoft) were contracted to develop BASIC for the SR-70 (which is also sometimes referred to as the 99/7), but the BASIC for the 99/4 was developed in-house." TI-99/4 BASIC was based on Dartmouth BASIC and complies to the American National Standard for minimal BASIC (ANSI X3.60-1978).
Microsoft ported BASIC-80 to the 6502 during the summer of 1976; it was mostly a straight port of the 8K version of BASIC-80 and included the same prompts asking for memory size and if the user wanted floating point functions enabled or not (having them active used an extra 135 bytes of memory). The earliest machines to use 6502 BASIC were the Ohio Scientific Model 500 and KIM-1 in 1977. [9] 6502 BASIC included certain features from Extended BASIC such as user-defined functions and descriptive error messages, but omitted other features like double precision variables and the PRINT
USING
statement. As compensation for not having double precision variables, Microsoft included 40-bit floating point support instead of BASIC-80's 32-bit floating point and string allocation was dynamic (thus the user did not have to reserve string space like in BASIC-80). However, vendors could still request BASIC with 32-bit floating point for a slightly smaller memory footprint; as one example, Disk BASIC for the Atari 8-bits used 32-bit floating point rather than 40-bit.[ citation needed ]
Standard features of the 9K version of Microsoft 6502 BASIC included:
GET
statement to detect a key press.6502 BASIC lacked a standardized set of commands for disk and printer output; these were up to the vendor to add and varied widely with each implementation.
Later implementations of 6502 Basic (1983–) had many vendor specific improvements; for example later versions of Commodore BASIC had the following:
DIRECTORY
, DSAVE
, DLOAD
, BACKUP
, HEADER
, SCRATCH
, COLLECT
, DVERIFY
, COPY
, DELETE
, RENAME
, etc.)CIRCLE
, DRAW
, BOX
, COLOR
(of background, border, etc.), PAINT
, SCALE
)SSHAPE
and GSHAPE
with OR
, AND
, XOR
, etc.)VOL
, SOUND
), later on at C=128 Music commands (ADSR and SID filter programming (ENVELOPE
and FILTER
), PLAY
, TEMPO
commands)IF
–THEN
–ELSE
, DO
–LOOP
–WHILE
/UNTIL
–EXIT
.JOY
, function keysSTOP
, CONT
, TRON
, TROFF
, RESUME
WINDOW
RENUMBER
, NEW
, MONITOR
, RREG
Microsoft catalogs from the 1980s also showed the availability of BASIC-68 and BASIC-69 for the Motorola 6800 and 6809 microprocessors respectively, running the FLEX operating systems, and also mention OEM versions for Perkin-Elmer, Ohio Nuclear, Pertec and Societe Occitane d'Electronique systems. [10] It seems likely this is what is also the basis for the Microsoft/Epson BASIC in the Epson HX-20 portable computer, which has two Hitachi 6301 CPUs, which are essentially a "souped up" 6801. Most of the core features in BASIC-68 and BASIC-69 were copied directly from BASIC-80.[ original research? ]
BASIC-69 was notably also licensed to Tandy, where it formed the nucleus of Color BASIC on the TRS-80 Color Computer.[ citation needed ] Not to be confused with BASIC09, a very different BASIC created by Microware as the main language for its OS-9, the other OS available on the Color Computer (Microware also wrote version 2.0 of Extended Color BASIC when Microsoft refused to do it). Microsoft BASIC was also included in the Dragon 32 / 64 computers that were built in Wales and enjoyed some limited success in the UK home computer market in the early 1980s. Dragon computers were somewhat compatible with the Tandy TRS-80, as they were built on very similar hardware.
Microsoft produced a ROM-based MSX BASIC for use in MSX home computers, which used a Z80 processor. This version supported the graphics and sound systems of the MSX computers; some variants also had support for disk drives.
No variety of Microsoft BASIC (BASICA, GW-BASIC, QuickBasic, QBasic) is currently distributed with Microsoft Windows or DOS. However, versions that will still run on modern machines can be downloaded from various Internet sites or be found on old DOS disks.
The latest incarnation of Microsoft BASIC is Visual Basic .NET, which incorporates some features from C++ and C# and can be used to develop Web forms, Windows forms, console applications and server-based applications. Most .NET code samples are presented in VB.NET as well as C#, and VB.NET continues to be favored by former Visual Basic programmers.
In October 2008, Microsoft released Small Basic. [11] The language has only 14 keywords. [12] Small Basic Version 1.0 (12 June 2011) [13] was released with an updated Microsoft MSDN Web site that included a full teacher curriculum, [14] a Getting Started Guide, [15] and several e-books. [16] Small Basic exists to help students as young as age eight [17] learn the foundations of computer programming and then graduate to Visual Basic via the downloadable software, Visual Studio Express, where they can continue to build on the foundation by learning Visual C#, VB.NET, and Visual C++. [18]
Applesoft BASIC is a dialect of Microsoft BASIC, developed by Marc McDonald and Ric Weiland, supplied with Apple II 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.
A disk operating system (DOS) is a computer operating system that resides on and can use a disk storage device, such as a floppy disk, hard disk drive, or optical disc. A disk operating system provides a file system for organizing, reading, and writing files on the storage disk, and a means for loading and running programs stored on that disk. Strictly speaking, this definition does not include any other functionality, so it does not apply to more complex OSes, such as Microsoft Windows, and is more appropriately used only for older generations of operating systems.
GW-BASIC is a dialect of the BASIC programming language developed by Microsoft from IBM BASICA. Functionally identical to BASICA, its BASIC interpreter is a fully self-contained executable and does not need the Cassette BASIC ROM found in the original IBM PC. It was bundled with MS-DOS operating systems on IBM PC compatibles by Microsoft.
CP/M, originally standing for Control Program/Monitor and later Control Program for Microcomputers, is a mass-market operating system created in 1974 for Intel 8080/85-based microcomputers by Gary Kildall of Digital Research, Inc. CP/M is a disk operating system and its purpose is to organize files on a magnetic storage medium, and to load and run programs stored on a disk. Initially confined to single-tasking on 8-bit processors and no more than 64 kilobytes of memory, later versions of CP/M added multi-user variations and were migrated to 16-bit processors.
A microcomputer is a small, relatively inexpensive computer having a central processing unit (CPU) made out of a microprocessor. The computer also includes memory and input/output (I/O) circuitry together mounted on a printed circuit board (PCB). Microcomputers became popular in the 1970s and 1980s with the advent of increasingly powerful microprocessors. The predecessors to these computers, mainframes and minicomputers, were comparatively much larger and more expensive. Many microcomputers are also personal computers. An early use of the term "personal computer" in 1962 predates microprocessor-based designs. (See "Personal Computer: Computers at Companies" reference below). A "microcomputer" used as an embedded control system may have no human-readable input and output devices. "Personal computer" may be used generically or may denote an IBM PC compatible machine.
File Allocation Table (FAT) is a file system developed for personal computers and was the default filesystem for MS-DOS and Windows 9x operating systems. Originally developed in 1977 for use on floppy disks, it was adapted for use on hard disks and other devices. The increase in disk drives capacity required four major variants: FAT12, FAT16, FAT32, and ExFAT. FAT was replaced with NTFS as the default file system on Microsoft operating systems starting with Windows XP. Nevertheless, FAT continues to be used on flash and other solid-state memory cards and modules, many portable and embedded devices because of its compatibility and ease of implementation.
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.
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.
The Atari Microsoft BASIC and Atari Microsoft BASIC II variants of the 6502-version of Microsoft BASIC ported to the Atari 8-bit computers. The first version, released 1981, required 32 KB of RAM and was supplied on floppy disk. The second version, released the next year, had most of the code on a ROM cartridge with additional functions on an optional floppy.
MBASIC is the Microsoft BASIC implementation of BASIC for the CP/M operating system. MBASIC is a descendant of the original Altair BASIC interpreters that were among Microsoft's first products. MBASIC was one of the two versions of BASIC bundled with the Osborne 1 computer. The name "MBASIC" is derived from the disk file name MBASIC.COM of the BASIC interpreter.
Following the introduction of the IBM Personal Computer, or IBM PC, many other personal computer architectures became extinct within just a few years. It led to a wave of IBM PC compatible systems being released.
Home computers were a class of microcomputers that entered the market in 1977 and became common during the 1980s. They were marketed to consumers as affordable and accessible computers that, for the first time, were intended for the use of a single, non-technical user. These computers were a distinct market segment that typically cost much less than business, scientific, or engineering-oriented computers of the time, such as those running CP/M or the IBM PC, and were generally less powerful in terms of memory and expandability. However, a home computer often had better graphics and sound than contemporary business computers. Their most common uses were word processing, playing video games, and programming.
In computing, Microsoft Binary Format (MBF) is a format for floating-point numbers which was used in Microsoft's BASIC languages, including MBASIC, GW-BASIC and QuickBASIC prior to version 4.00.
The Rugg/Feldman benchmarks are a series of seven short BASIC programming language programs that are used to test the performance of BASIC implementations on various microcomputers. They were published by Tom Rugg and Phil Feldman in the June 1977 issue of the US computer magazine, Kilobaud.
SCELBAL, short for SCientific ELementary BAsic Language, is a version of the BASIC programming language released in 1976 for the SCELBI and other early Intel 8008 and 8080-based microcomputers like the Mark-8. Later add-ons to the language included an extended math package and string handling. The original version required 8 kB of RAM, while the additions demanded at least 12 kB.
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.