Commodore 64's Legacy Continues As Microsoft Open Sources 6502 BASIC

hero microsoft basic open source
We'd venture that most folks under 40 or so aren't aware that Bill Gates and Paul Allen, former head honchos of Microsoft, actually started their empire as hardcore programmers, and darn good ones at that. Today, Microsoft open-sourced the 6502 BASIC interpreter, the Commodore-specific port of Gates and Allen's first-ever commercial product, a simple programming language that was the entry point to development for multiple generations, often being the initial prompt whenever you turned on a computer.

6502 BASIC was a direct port of Microsoft BASIC, an interpreter (where you type in the code and it runs, as opposed to "compiler"), originally designed for the Intel 8080 8-bit chips of the time. It was ported to a number of other chips and licensed to other companies and their systems too, including Commodore's PET, VIC-20, and of course, the epic Commodore 64 -- all powered by a MOS 6502 processor, designed to be a cheaper alternative to other contemporary chips.

mos 6502 microsoft basic open source
The MOS 6502 chip inside many a Commodore computer

It even found its way into the Apple II and got the moniker "Applesoft BASIC"; the original file headers for that still include Microsoft's tagline. Commodore licensed the software from Microsoft for $25,000, an amount that was a king's ransom back in the day, but turned out to be a spectacular deal, given how much mileage Commodore got out of it across multiple generations of computers. The interpreter's code eventually evolved into the familiar GW-BASIC and QBASIC, bundled into IBM PCs and clones of the era.

The specific version that Microsoft has open-sourced is the BASIC M6502 8K VER 1.1, the one seen and loved by many a young person staring at a diminutive CRT TV -- or dedicated computer monitor, if they were particularly lucky -- starting out as the Commodore PET's BASIC V2. This 1.1 revision includes fixes to some bugs that Commodore found in the interpreter's garbage collection mechanism, the part that wipes away data left unused to get its RAM back. The fixes were implemented by Bill Gates and Commodore's John Feagans.

The entire tale is told in a detailed post over at Microsoft's open-source blog. The company points out that many bits and pieces of the software found their way online, and that it has even been fully reverse-engineered, but this official release should help retro-computing efforts. Indeed, Microsoft's engineers talk up the recent FPGA-powered Commodore 64 revival and the efforts of preservationists like Michael Steil. You can download the interpreter over at the BASIC-M6502 GitHub repo.