The Language of the Home Computer Revolution Microsoft Releases 6502 BASIC Under An Open-Source License

By Sebastian Gerstl | Translated by AI 3 min Reading Time

Related Vendors

The Microsoft BASIC, written by Bill Gates and tailored to the MOS 6502 processor, was both a programming language and an operating system substitute for early home computers—laying the foundation for the success of the software giant. Microsoft has now released the original BASIC 1.1 from 1978 under an open-source license.

Excerpt from the program code of the 8080 BASIC written by Paul Allen and Bill Gates (display panel from the New Mexico Museum of Natural History and Science). Gates and Allen wrote the BASIC as a programming language for the Altair 8800, which was based on the Intel 8080 CPU. It was the first software offered by the young company Micro-Soft (later Microsoft), founded by Gates and Allen.(Image:  / CC0)
Excerpt from the program code of the 8080 BASIC written by Paul Allen and Bill Gates (display panel from the New Mexico Museum of Natural History and Science). Gates and Allen wrote the BASIC as a programming language for the Altair 8800, which was based on the Intel 8080 CPU. It was the first software offered by the young company Micro-Soft (later Microsoft), founded by Gates and Allen.
(Image: / CC0)
10 PRINT "Hello"
20 GOTO 10
RUN

With commands like these, many home computer users of the 1970s and 80s learned programming. Early home computers such as the Apple II, the Atari 400/800 series, or all of Commodore's 8-bit machines, including the Commodore PET from 1977 or the legendary C64, relied on BASIC as the integrated programming language—and, in a sense, as a kind of operating system replacement, as programs were not only written but also launched through it. All these mentioned computers had one thing in common: they relied on 6502 BASIC from Microsoft, tailored to the underlying MOS 6502 CPU!

Gallery
Gallery with 6 images

The company has now released the source code of its 1978 version 1.1 of 6502 BASIC under an open-source license. The assembly code, consisting of approximately 6,955 lines, is now available on GitHub and may be used, modified, and redistributed under the terms of the MIT license.

The Language of Early Home Computers

The BASIC programming language is already over 60 years old and thus older than all the computers mentioned here. However, the historical significance of MOS 6502 BASIC cannot be overlooked, as it was the first touchpoint for many aspiring developers at home to start programming software.

Microsoft produced its first commercial software with a BASIC interpreter tailored for the Intel 8080 processor, offered on paper tape for the first successful home computer, the MITS Altair 8800. Based on this BASIC-80, Bill Gates and Ric Weiland ported the programming language to the MOS 6502 in the summer of 1976. This was largely a direct port of the 8K version of BASIC-80 for the Altair 8800, containing the same prompts for memory size and for enabling floating-point functions (activating them required an additional 135 bytes of memory).

The first machines to use 6502 BASIC were the Ohio Scientific Model 500 and the single-board computer KIM-1 from Commodore in 1977. In the following years, however, the programming language became the foundation for numerous variants that defined the early home computer revolution—including Atarisoft BASIC, Commodore BASIC (PET, VIC-20, C64), and Applesoft BASIC for the Apple II. Through this interpreter, millions of users gained their first access to programming.

The now open-source licensed version 1.1 includes bug fixes and memory management improvements that were developed in 1978 in collaboration with Commodore developer John Feagans. It was later released as "BASIC V2" on the PET and remains present in emulators and museum systems to this day.

Notable is the modular structure of the code: through conditional compilation, different target platforms could be supported with the same codebase—an efficient approach for that time. This allowed systems like the PET, Apple II, or KIM-1 to be addressed.

Bill Gates admitted in 2010 that he (without Commodore's knowledge) included the command WAIT 6502,x as an Easter egg. The Easter egg wrote the word "MICROSOFT!" directly into the screen RAM at address $8000. On the Commodore PET, this coincidentally overwrote the company name Commodore, giving the impression that Gates had specifically targeted the Commodore PET with the joke. The Easter egg exists in the 6502 BASIC on the KIM-1, as well as in the 6809 (CPU) BASIC and the 6800 (CPU) BASIC. Former Commodore employee Jim Butterfield recalls: "Shortly after this implementation, I showed it to Len Tramiel (son of Jack Tramiel) at the Commodore booth at a CES show. He was furious: 'We have a machine with too little memory, and those *!$%$ put something like this in!' The 51 bytes of code were meant to be removed for subsequent machines, but the 10 bytes required to display the message remained in the master copy."(Image: C64-Wiki.com)
Bill Gates admitted in 2010 that he (without Commodore's knowledge) included the command WAIT 6502,x as an Easter egg. The Easter egg wrote the word "MICROSOFT!" directly into the screen RAM at address $8000. On the Commodore PET, this coincidentally overwrote the company name Commodore, giving the impression that Gates had specifically targeted the Commodore PET with the joke. The Easter egg exists in the 6502 BASIC on the KIM-1, as well as in the 6809 (CPU) BASIC and the 6800 (CPU) BASIC. Former Commodore employee Jim Butterfield recalls: "Shortly after this implementation, I showed it to Len Tramiel (son of Jack Tramiel) at the Commodore booth at a CES show. He was furious: 'We have a machine with too little memory, and those *!$%$ put something like this in!' The 51 bytes of code were meant to be removed for subsequent machines, but the 10 bytes required to display the message remained in the master copy."
(Image: C64-Wiki.com)

Even small quirks and "signatures" of the developers at the time can be found in the code. These include the hidden labels STORDO and STORD0, as well as the WAIT command personally inserted by Bill Gates, which displays a hidden "MICROSOFT!" on the screen.

Small Footprint, Wide Functionality

Technically, the interpreter was a masterpiece of resource efficiency. The 6502 processor cost around 25 dollars—significantly less than competing CPUs—and had only a few kilobytes of RAM. The BASIC code was written so efficiently that it offered extensive functionality despite tight memory constraints—for that time.

The release is not only interesting for retro-computing enthusiasts. It also enables technical analysis and the understanding of early software architecture during a time when memory space, computing time, and hardware costs were central influencing factors.

With this measure, 6502 BASIC joins a series of historical source code releases from Microsoft—including GW-BASIC, MS-DOS 4.0, and Altair BASIC. The strategic shift toward a more open software culture under CEO Satya Nadella is clearly evident. Today, Microsoft operates GitHub, the world's largest open-source repository—including retrospectives on the origins of its own software history. (sg)

Subscribe to the newsletter now

Don't Miss out on Our Best Content

By clicking on „Subscribe to Newsletter“ I agree to the processing and use of my data according to the consent form (please expand for details) and accept the Terms of Use. For more information, please see our Privacy Policy. The consent declaration relates, among other things, to the sending of editorial newsletters by email and to data matching for marketing purposes with selected advertising partners (e.g., LinkedIn, Google, Meta)

Unfold for details of your consent