Altair BASIC
Altair BASIC was a pioneering interpreter for the BASIC programming language, developed in 1975 by Bill Gates, Paul Allen, and Monte Davidoff specifically for the MITS Altair 8800 microcomputer, widely regarded as the first commercially successful personal computer. As Microsoft's first commercial product—released under the company name Micro-Soft—it provided an interactive, high-level programming environment that fit into as little as 4 kilobytes of memory, making it accessible for hobbyists and early users of the resource-constrained Altair. This software was distributed on paper tape or audio cassette and sold for around $150 in extended versions (with discounts when bundled with hardware), enabling straightforward program execution and marking a foundational step in the democratization of personal computing.[1][2][3] The development of Altair BASIC began shortly after the Altair 8800's announcement in the January 1975 issue of Popular Electronics, when Gates and Allen, then students at Harvard, contacted MITS to offer a BASIC interpreter despite lacking access to the actual hardware. They wrote and tested the code on a PDP-10 mainframe using an Intel 8080 emulator created by Allen, completing the core 4K version in about two months of intensive effort. An 8K extended edition followed, incorporating additional features like string manipulation, trigonometric functions, and cassette tape input/output, while both versions supported essential constructs such as direct commands, line-numbered programs, loops, conditionals, and floating-point arithmetic with up to six-digit precision.[1][2] Altair BASIC's significance lies in its role as the catalyst for Microsoft's founding and the broader software ecosystem; despite widespread piracy that limited legitimate sales to only a few hundred copies, it was licensed to MITS under contract, which helped fuel the Altair's success and inspired subsequent personal computers. By simplifying programming for non-experts—drawing from BASIC's origins at Dartmouth College in 1964—it shifted computing from elite mainframes to affordable home kits, laying groundwork for the personal computer revolution and Microsoft's dominance in software licensing.[3][1][2][4]Background
The Altair 8800 Computer
The Altair 8800, developed by Micro Instrumentation and Telemetry Systems (MITS), was the first commercially successful personal computer kit, introduced as a build-it-yourself project for hobbyists.[5] It appeared on the cover of the January 1975 issue of Popular Electronics, marking its release and sparking widespread interest in home computing.[5] The machine's design emphasized affordability and expandability, positioning it as a rival to much more expensive commercial minicomputers.[5] MITS was founded in 1969 by H. Edward Roberts and three U.S. Air Force colleagues in Albuquerque, New Mexico, initially focusing on radio control systems for model rockets.[6] The company later shifted to electronic calculator kits, which gained popularity through features in Popular Electronics, but the market collapsed in the early 1970s due to competition from integrated-circuit calculators by Texas Instruments.[6] Facing financial strain, Roberts pivoted to microcomputers, leveraging the newly available Intel 8080 microprocessor, which could be obtained for $75 in volume and enabled a low-cost computer design.[6] At its core, the Altair 8800 featured an Intel 8080 8-bit CPU operating at a 2 MHz clock speed with a 2 µs instruction cycle time.[5] It came standard with 256 bytes of RAM, expandable up to 64 KB through additional memory boards connected via the S-100 bus.[5] Input and output were handled exclusively through a front panel equipped with toggle switches for entering binary data and 36 LEDs for displaying address, data, and status information, as the system lacked a built-in keyboard, display, or storage.[5] The Altair's launch had an immediate and profound impact, with MITS receiving thousands of orders in the first few months, far exceeding its production capacity of under 20 employees.[6] By August 1975, over 5,000 units had been sold, overwhelming the company's Albuquerque facility and leading to backlogs, expanded hiring, and a shift to full-scale microcomputer manufacturing.[7] This surge fueled the homebrew computing boom, inspiring a generation of enthusiasts and laying the groundwork for the personal computer industry.[8] The availability of software such as BASIC soon transformed the Altair from a basic demonstrator into a practical programming platform.[8]Early Microcomputing Environment
In the early 1970s, hobbyist computing was dominated by rudimentary systems that required users to program directly in machine code or assembly language, often entered via front-panel switches and verified through blinking LED lights.[9] These machines, such as the Kenbak-1 introduced in 1971, offered minimal memory—typically 256 bytes—and lacked any form of high-level programming languages or interactive environments, making software development a tedious, error-prone process confined to hardware enthusiasts with electronics backgrounds.[9] Programming involved manually toggling switches to load binary instructions, with output similarly limited to light patterns, emphasizing low-level hardware manipulation over practical applications.[9] The emergence of affordable microprocessors like Intel's 8008 in April 1972 and the 8080 in 1974 provided the foundational building blocks for these systems, enabling 8-bit processing capable of addressing up to 16 KB of memory but still targeted primarily at niche experimenters.[10] Early kits, including the Kenbak-1 sold for $750 to scientifically minded buyers and the Mark-8 featured in Radio-Electronics in July 1974 for around $450, appealed to a small community of dedicated hobbyists but sold in limited quantities—fewer than 50 units for the Kenbak-1 before its manufacturer folded in 1973.[9][11] These devices, built without microprocessors in the case of the Kenbak-1 or using the 8008 for the Mark-8, focused on basic control tasks and data acquisition, remaining inaccessible to broader audiences due to their complexity and cost.[12][11] Significant challenges hindered widespread adoption, including the absence of standardized input/output interfaces, which forced users to custom-build peripherals like keyboards or displays, and exorbitantly high memory costs—expansions for 4 KB of RAM often exceeded $200 in the mid-1970s, limiting systems to bare-bones configurations.[13] Without interactive interpreters or operating systems, programming remained a hardware-centric endeavor, prioritizing circuit assembly and debugging over software innovation, as seen in the Mark-8's reliance on semiconductor memory up to 1 KB without built-in monitors or storage.[11] This environment fostered a culture of tinkering among engineers and technicians but excluded non-specialists, with no easy entry point for general computing tasks.[14] A cultural shift began through publications like Popular Electronics, which popularized do-it-yourself kits and inspired non-engineers to experiment with computing by demystifying electronics and featuring groundbreaking projects that highlighted the potential of microprocessors for personal use.[15] The magazine's coverage, such as its January 1975 issue on the Altair 8800, played a pivotal role in sparking widespread interest among hobbyists, transforming computing from an elite pursuit into an approachable hobby that encouraged broader participation.[15] The Altair 8800 exemplified this transition as a commercially successful kit that built on prior limitations.[15]Development
Inspiration and Conception
In late 1974, Paul Allen, working as a programmer for Honeywell in Boston, purchased the January 1975 issue of Popular Electronics from a newsstand near Harvard University and immediately recognized the significance of the Altair 8800 microcomputer featured on the cover. He rushed to show the magazine to his longtime friend and collaborator Bill Gates, a Harvard sophomore, in Gates' dorm room, where they discussed the potential for personal computing and the need for accessible software to make the Altair programmable beyond machine code. This moment sparked their decision to develop a BASIC interpreter for the device, viewing it as an opportunity to bring high-level programming to hobbyists.[16][1] On January 2, 1975, Gates and Allen sent a letter to MITS offering a BASIC interpreter, followed by a phone call to president Ed Roberts where they boldly claimed to have already developed a working version—despite having none at the time—and secured an agreement for a demonstration in Albuquerque. Roberts, initially skeptical but intrigued by the prospect of easy-to-use software for his hardware, invited Allen to present the demo within weeks. In their initial planning, the pair targeted the Altair's severe hardware constraints, aiming to create a compact version of BASIC that would fit within just 4 kilobytes of memory, drawing inspiration from the user-friendly Dartmouth BASIC language they had learned earlier but simplifying it further for resource-limited microcomputers.[17][1] Motivated by the Altair's announcement, Gates took a leave of absence from Harvard in early 1975 to focus full-time on the project, while Allen resigned from Honeywell to join him, solidifying their informal partnership that would later evolve into Microsoft. The duo, who had previously collaborated on programming ventures since high school, saw the Altair as the catalyst for a software industry centered on microcomputers; following the successful demonstration, they relocated to Albuquerque, New Mexico, near the Altair's manufacturer, MITS, to work closely with the company. By April 4, 1975, they formalized their partnership as Micro-Soft, with the Altair BASIC development as its foundational effort.[18][19][20]Coding Process and Challenges
The development of Altair BASIC took place primarily on a PDP-10 mainframe at Harvard University's Aiken Computation Laboratory, as Bill Gates and Paul Allen did not have access to an actual Altair 8800 computer during the initial coding phase.[21][22] To simulate the target Intel 8080 microprocessor, Paul Allen created an emulator using the MACRO-10 assembler and DDT-10 debugger on the PDP-10, allowing the team to test code against Intel's 8080 documentation without physical hardware.[21][22] This virtual environment was essential, as the Altair was a new and scarce machine following its announcement in Popular Electronics.[1] Key contributors included Gates, who handled the overall architecture and core interpreter coding; Allen, who developed the emulator, assisted with assembly, and later wrote the bootstrap loader; and Monte Davidoff, a Harvard student recruited for his expertise in implementing the floating-point mathematics routines.[1][21][22] The project began in late 1974 and progressed rapidly over about eight weeks, culminating in a demo-ready version by late February.[23] En route to Albuquerque for the demonstration at MITS headquarters in late February 1975, Allen hand-coded a 21-byte machine-language bootstrap loader on a steno pad in octal to enable loading the interpreter via paper tape, as this component had been overlooked in prior testing.[24] Significant challenges arose from the need to fit the entire 4K BASIC interpreter into just 4 kilobytes of RAM, a constraint driven by the high cost of memory chips at the time—every byte had to be optimized through compact data structures, routine reuse, and conditional assembly to exclude non-essential features like string handling.[1][22] Custom I/O handling was required for the Altair's Teletype interface, with self-modifying code to detect and adapt to serial or parallel ports during initialization, using instructions likeIN and SHLD for efficiency.[21][25] To avoid conflicts with the limited hardware, the interpreter began execution with a DI (disable interrupts) instruction at memory location 0x0000, forgoing hardware interrupts in favor of software routines via restart instructions (RST 1-6), which simplified the design but limited multitasking capabilities.[21][25]
Debugging without an actual Altair proved arduous, relying solely on the PDP-10 emulator for simulation, which provided instant feedback but could not fully replicate real-world timing or peripheral behaviors.[1][21] The team maintained strict secrecy from MITS to avoid revealing the software was still under development, presenting it as a completed product during outreach.[21][23] For the Albuquerque demo, Allen loaded the interpreter into a real Altair 8800 connected to a Teletype terminal using the front panel switches and paper tape; it successfully executed operations like PRINT 2+2, outputting "4" and displaying "READY," convincing MITS founder Ed Roberts of its viability.[24][22][26]
Technical Features
Language Syntax and Core Commands
Altair BASIC, the inaugural product of Microsoft, drew its foundational design from the original Dartmouth BASIC developed in 1964 by John G. Kemeny and Thomas E. Kurtz at Dartmouth College, but was significantly simplified to fit within the severe memory constraints of the MITS Altair 8800 microcomputer.[1][2] This dialect prioritized accessibility for novice users in an era of limited computing resources, employing a line-numbered program structure where statements were prefixed with integers from 0 to 65529 to dictate execution order.[2] Programs ran sequentially by line number upon invocation with theRUN command, allowing straightforward editing and reorganization by renumbering or deleting lines.[2]
Variables in the 4K version were simple numeric variables named with a single letter (A-Z) or a single letter followed by a digit (e.g., A0-A9), stored as single-precision floating-point numbers (with approximately six digits of accuracy and a range from 2.93874E-39 to 1.70141E+38, using four bytes for the value plus two bytes for the name in the variable table). All numeric variables are floating-point; integer values can be obtained using the INT function.[2][27] Arrays could be declared using the DIM statement, such as DIM A(8) to create a nine-element array indexed from 0 to 8.[2] The base 4K version omitted string variables and user-defined functions, focusing instead on essential numeric operations to conserve memory. String support was added in the 8K version.[2]
The core command set emphasized simplicity and interactivity, mirroring everyday English for ease of use. The PRINT command output expressions or values, as in PRINT 10-4 yielding 6, and could include tabs or semicolons for formatting.[2] INPUT prompted users for values, storing them in specified variables like INPUT R to assign a number to R.[2] Assignments used LET, though it was optional (e.g., LET Z=7 or simply Z=7).[2] Control flow relied on IF-THEN for conditionals, such as IF B=0 THEN 50 to branch to line 50 if B equals zero; GOTO for unconditional jumps, like GOTO 10; FOR-NEXT for loops, exemplified by FOR N=1 TO 10 paired with NEXT N; and GOSUB/RETURN for subroutines, enabling calls like GOSUB 100 and returns via RETURN.[2]
Data handling centered on the READ and DATA statements for populating arrays or variables from predefined lists, without support for file I/O in the core implementation. For instance, DATA 1,393,-39 could supply values read sequentially by READ D into variable D, with multiple DATA lines treated as a continuous stream.[2] This mechanism allowed simple dataset management, though arrays required explicit dimensioning to avoid overflow errors.[2]
In interactive mode, Altair BASIC supported immediate execution of single statements without line numbers, such as PRINT 2+2 directly outputting 4 after the "OK" prompt.[2] A basic line editor facilitated corrections: the back-arrow key (+) deleted the previous character, while @ cleared the entire line.[2] Syntax errors triggered concise messages like "SN ERROR" (syntax error), often accompanied by a question mark, aiding quick debugging in the resource-limited environment.[2] These features made the interpreter forgiving for beginners, promoting hands-on experimentation despite the Altair's teletype-based interface.[2]