Back to the roots: Microsoft's 48-year-old 6502 BASIC is now open source

Phone callbackI call you at the time you choose
← Back to the blog
Blog

Back to the roots: Microsoft's 48-year-old 6502 BASIC is now open source

Author: Lakatos Szilárd | Published:

Microsoft's BASIC fundamentally changed the software world and was millions of people's first encounter with programming. Now, 48 years after its original release, the company has published the code of the BASIC interpreter written for the 6502 microprocessor and made it open source under the MIT licence.

This is the BASIC interpreter released in 1976, written by Bill Gates and Ric Weiland for the MOS 6502 processor. It was one of the most important pieces of software at the dawn of home computing, and now anyone can freely study, modify, share or even develop it further.

This move isn't just a historic moment but an invaluable gift to anyone interested in retro computing and software development.

The beginnings: the revolution of a BASIC interpreter

Microsoft's first product was a BASIC interpreter written by Bill Gates and Paul Allen for the Intel 8080 processor and the Altair 8800 computer in 1975. This code served as the basis for later versions for other processors, including the port to the MOS 6502 microprocessor completed by Bill Gates and Ric Weiland in 1976.

A MOS 6502 CPU was one of the most important chips of home computing's golden age, powering iconic machines like the Apple II, Commodore's 8-bit line (including the legendary C64), the Atari 2600, and it was also found in the hardware of the Nintendo Entertainment System (NES). Thanks to its simplicity and low cost, it had a huge impact on the development of computing and still inspires retro fans, developers and even educators.

Today the 6502 is enjoying a renaissance: FPGA redesigns, emulators and community projects keep it alive, and the Commodore brand is even being revived in the form of a new FPGA-based Commodore 64.

Microsoft licensed this BASIC port to Commodore for just 25,000 dollars. Although the deal may not have seemed outstanding financially, strategically it was revolutionary: this decision made Microsoft's software accessible to millions, who first learned to program by typing the familiar command line:

10 PRINT "HELLO"
20 GOTO 10
RUN

Details of the open-source release

Version 1.1, now published on GitHub, contains the source code of the original BASIC interpreter, including numerous bug fixes. Interestingly, version 1.1 includes a „garbage collector" fix that Commodore engineer John Feagans and Bill Gates implemented together in 1978 at Microsoft's Bellevue office.

The source file also contains a fun „easter egg": the labels STORDO and STORD0, hidden by Bill Gates himself as a nod to the legendary Star Wars films. Gates confirmed this humorous reference in 2010. The released package contains a total of 6,955 lines of assembly code, now available for anyone to access, study and modify.

Microsoft regards 6502 BASIC as one of the most important pieces of software from the dawn of personal computing. With this move, the company continues its efforts to preserve historic code – GW-BASIC was previously made open source too. GW-BASIC came from the same code base and later gave rise to successors like QBASIC and the still-supported Visual Basic. Making the source code available not only helps us understand the past but can also inspire future generations.

For the first time, the general public can study, modify and carry forward this legacy based on the official source code – a real journey back to the heroic age of computing.

basicmicrosoftretrocommodorec64open sourcegithubbill gatesprogramming6502

More IT news and tips on the blog

More articles

See all articles →