|First appeared||1975 (cf. Altair BASIC)|
cf. Visual Basic .NET / 2018
Microsoft BASIC is the foundation product of the Microsoft company. It first appeared in 1975 as Altair BASIC, which was the first BASIC by Microsoft and the first high level programming language available for the Altair 8800 microcomputer.
During the home computer craze during the late-1970s and early-1980s, Microsoft BASIC was ported to and supplied with practically every computer design. Slight variations to add support for machine-specific functions 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 PC and Apple Macintosh, BASIC was no longer as widely used, although it retained a strong following. The release of Visual BASIC reignited its popularity and it remains in wide use on Microsoft Windows platforms in its most recent incarnation, Visual Basic .NET
- 1 Altair BASIC and early microcomputers
- 2 Licenses to home computer makers
- 3 Modern descendants
- 4 Variants and derivatives of Microsoft BASIC
- 5 See also
- 6 Notes
- 7 References
- 8 External links
Altair BASIC and early microcomputers
The Altair BASIC interpreter was developed by Microsoft founders Paul Allen and Bill Gates with help from Monte Davidoff, using a self-made Intel 8080 software simulator running on a PDP-10 minicomputer. The MS dialect is patterned on Digital Equipment Corporation's BASIC-PLUS on the PDP-11, which Gates had used in high school.
Altair BASIC was delivered on paper tape and in its original version took 4 KB of memory. This version lacked strings and other features to fit into this tiny memory footprint, and even then it left only 790 bytes free for program code on a 4k machine.
For machines with more memory, the 8 kB version added strings, additional mathematical functions, and PEEK and POKE. Extended BASIC added "double precision" floating point support. Modifications to the 8k and Extended versions were available that added floppy disk commands to avoid having to exit BASIC to do minor tasks like copy files.
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 the Extended version. It was also ported to the 16-bit BASIC-86 (8086/88).
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).
Licenses to home computer makers
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, and Atari, who sold MS BASIC alongside its own Atari BASIC. IBM's Don Estridge said, "Microsoft BASIC had hundreds of thousands of users around the world. How are you going to argue with that?" Microsoft licensed similar versions to companies that competed with each other. After licensing BASICA to IBM, for example, Microsoft licensed the compatible GW-BASIC to makers of PC clones, and also sold copies to retail customers. The company similarly licensed an Applesoft-compatible BASIC to VTech for its Laser 128 clone.
- NCR Basic Plus 6, released in Q1/1977 for NCR 7200 model VI data-entry terminal. The adaptation of Microsoft's Extended BASIC-80 was carried out by Marc McDonald in 1976/1977.
MBASIC is a stripped BASIC-80 with only hardware-neutral functions, however due to the popularity of CP/M, the vast 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, however the full command set is not supported.
Standalone Disk BASIC-80
First implementation to use an 8-bit variant of the File Allocation Table 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 also offered a version of Standalone BASIC-86 for SBC-86/12 for Intel's 8086 Single Board Computer platform in 1980.
Texas Instruments BASIC
This is the version of BASIC used on Texas Instruments' TI-99/4A computer line. Notably, it is not written in assembly language, but in a high level interpreter developed by TI. The reason for this was because Microsoft did not have any programmers who knew how to code for the TI-99/4A's 9900 CPU and so Texas Instruments instead gave them an interpreter to code in instead. The unfortunate effect of this was to make TI BASIC extremely slow due to being double-interpreted. In addition to the version included in the ROM of the TI-99/4A, Texas Instruments developed Extended BASIC.
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 OSI Model 500 and KIM-1 in 1977. While BASIC-80 would fit into 8k of memory with leftover space to add I/O functions, 6502 machine language required the use of more instructions than 8080 machine language to accomplish the same task, thus 6502 BASIC would not have any leftover room. As compensation for this, Microsoft added 40-bit floating point support to 6502 BASIC instead of the 32-bit floating point support 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.
Standard features of the 9k version of Microsoft 6502 BASIC included:
- GET statement to detect a key press
- Line crunching - program lines do not require any spaces except between the line number and statement
- Only supported variable types are string, single precision, and integer (arrays only)
- Long variable names are not supported and only the first two characters are recognized
6502 BASIC was less standardized than BASIC-80, for example there were no standard commands to clear the screen, output to a printer, or manipulate disk files and these were entirely up to the OEM to add themselves. There is also no statement in 6502 BASIC to reseed the random number generator and the screen editor was also not standardized and varied widely with each implementation.
Later implementations of 6502 Basic (1983-) were improved in a lot of aspects. While early Commodore machines (VIC-20, C64) had a BASIC very close to 6502 MS BASIC, later Commodore 8 bit machines (C= 264 series, PET and C=128 named as V3.5, V4.0 and V7.0) had a lot of improvements to make BASIC more useful and user friendly:
- Disc commands (DIRECTORY, DSAVE, DLOAD, BACKUP, HEADER, SCRATCH, COLLECT, DVERIFY, COPY, DELETE, RENAME, etc)
- Graphics commands (CIRCLE, DRAW, BOX, COLOR (of background, border, etc), PAINT, SCALE)
- GFX block copy and logical operation with the existing graphical screen (SSHAPE and GSHAPE with OR, AND, XOR, etc)
- Sprite definition, displaying and animation commands on C=128, even saving sprites to binaries
- Sound commands (VOL, SOUND), later on at C=128 Music commands (ADSR and SID filter programming (ENVELOPE and FILTER), PLAY, TEMPO commands)
- Signs of more structured programming: IF.THEN.ELSE, DO.LOOP.WHILE/UNTIL.EXIT, ON.GOSUB
- Extended I/O commands for special features: JOY, Function keys
- Debugging commands: STOP, CONT, TRON, TROFF, RESUME
- Extended handling of character screen: WINDOW
- Support easier program development: RENUMBER, NEW, MONITOR, RREG
BASIC-68 and BASIC-69
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. 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.
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 which 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. The language itself has only 14 keywords. Small Basic Version 1.0 (12 June 2011) was released with an updated Microsoft MSDN website that included a full teacher curriculum, a Getting Started Guide, and several e-books. Small Basic exists to help students as young as age eight 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++.
Variants and derivatives of Microsoft BASIC
- Altair BASIC (MITS Altair and other S-100 computers)
- Amiga BASIC (Commodore Amiga family)
- Applesoft BASIC (Apple II family)
- Atari Microsoft BASIC I and II (Atari 8-bit family)
- BASICA ("BASIC Advanced") (PC DOS, on IBM PC)
- Color BASIC (TRS-80 Color Computer)
- Commodore BASIC (Commodore 8-bit family, incl C64)
- Oric Extended Basic (Oric 8-bit family)
- Color BASIC and Disk Extended Color BASIC (TRS-80 Color Computer and Dragon 32/64)
- IBM Cassette BASIC (Original IBM PC, built into ROM)
- Galaksija BASIC (Galaksija home computer)
- GW-BASIC (BASICA for MS-DOS, on PC compatibles)
- Microsoft Level III BASIC (Tandy/Radio-Shack TRS-80)
- Basic 1.0 (Thomson computer family)
- MBASIC (CP/M, on 8080/85 and Z80 based computers)
- MS BASIC for Macintosh (Mac OS on Apple Macintosh)
- MSX BASIC (MSX standard home computers)
- N88-BASIC (NEC PC8801/9801)
- N82-BASIC (NEC PC-8201/8201A)
- QBasic (PC DOS/MS-DOS on IBM PC and compatibles)
- QuickBASIC (PC MS-DOS on IBM PC and compatibles)
- Small Basic (MS Windows on IBM PC and compatibles)
- TRS-80 Level II BASIC (Tandy/Radio-Shack TRS-80)
- Visual Basic (PC DOS/MS-DOS/MS Windows on IBM PC and compatibles)
- WordBasic (pre-VBA) (MS Windows)
- HP2640 HP2647 Programmable Terminal with AGL graphics extensions
- FreeBASIC - a free clone of the QuickBasic system.
- Gambas - free BASIC implementation inspired by Visual Basic.
- Sources differ in regard to the first NCR data entry terminal integrating support for the FAT file system. According to Stephen Manes and Paul Andrews, "Gates", development was for a NCR 8200 in late 1977, incorrectly classified as a floppy-based upgrade to the NCR 7200, which had been released in 1975-11 and was built around an Intel 8080 8-bit processor, but was cassette-based only. However, the NCR Century 8200 was a 16-bit minicomputer, onto which several data entry terminals could be hooked up. Marc McDonald even remembered a NCR 8500, a mainframe of the Criterion series, which can be ruled out as well. Other sources indicate that either the NCR 7200 itself or its successor were the actual target platform. The NCR 7500 series was released in 1978, based on a similar 8080 hardware, but now including NCR 7520 and 7530 models featuring 8-inch diskettes. NCR Basic +6, a precursor or adaptation of Microsoft Standalone Disk BASIC-80 was available for them at least since 1979. One source claims that a special NCR 7200 model variant with two 8-inch diskettes and Microsoft BASIC existed and was imported by NCR Sydney into Australia the least.
- Martin S. Fridson, How to be a billionaire: proven strategies from the titans of wealth, John Wiley and Sons, 1999 ISBN 0-471-33202-X pages 116-120
- Manes, Stephen (1993). Gates. Doubleday. p. 61.
- Curran, Lawrence J., Shuford, Richard S. (November 1983). "IBM's Estridge". BYTE. pp. 88–97. Retrieved 19 March 2016.
- "PC Tutor". PC. 1987-01-13. p. 325. Retrieved 18 January 2015.
- Grevstad, Eric (December 1986). "Laser 128 / An Affordable Compatible". inCider. p. 58. Retrieved 29 June 2014.
- "NCR Mini, Micro Among Debuts Made on NRMA Convention Floor". Computerworld. 1977-01-17. Retrieved 2014-06-04. (Mentions a 8080-based cassette-based NCR 7200 model VI with NCR Basic Plus 6 (Extended BASIC) to be delivered in Q1/1977. The NCR 7200 model I and model IV were already released in 1975-11, but did not came with BASIC.)
- Steil, Michael (30 September 2008). "Bill Gates' Personal Easter Eggs in 8 Bit BASIC". pagetable.com. Retrieved 4 February 2015.
- (Advertisement) CompuMate Basic Keyboard Enhancer, Page 7, Electronic Games Magazine (August 1983), Internet Archive
- "MICROSOFT Software Catalog", c1980, Computer History Museum
- Small Basic Blog: Hello World
- What are the 14 keywords of Small Basic?
- Small Basic 1.0 is here!
- Small Basic Curriculum
- Small Basic Getting Started Guide
- Small Basic E-Books
- Small Basic - Elementary and Middle School Student Testimonials
- Graduating from Small Basic
- Microsoft BASIC 6502 Timeline, Bill Gates’ Personal Easter Eggs in 8 Bit BASIC, see external links