Patreon Logo Support us on Patreon to keep GamingOnLinux alive. This ensures all of our main content remains free for everyone. Just good, fresh content! Alternatively, you can donate through PayPal Logo PayPal. You can also buy games using our partner links for GOG and Humble Store.
We use affiliate links to earn us some pennies. Learn more.

Microsoft's 6502 BASIC is now officially open source

By -
Last updated: 8 Sep 2025 at 11:31 am UTC

Some fun computing history for you here as Microsoft recently open sourced Microsoft 6502 BASIC under the MIT license.

While there have been versions of it floating around for a long time, Microsoft decided just to play nice and make it official and give it out to everyone. Back in 2024, they also open sourced MS-DOS 4.0. This is perhaps even more important though for computing history, with it being Microsoft's first official product and served as the foundation for the modern software industry.

From their blog post going over the background of it:

This is BASIC M6502 8K VER 1.1, the 6502 BASIC lineage that powered an era of home computing and formed the foundation of Commodore BASIC in the PET, VIC-20, and the legendary Commodore 64. This very source tree also contains adaptations for the Apple II (“Applesoft BASIC”), built from the same core BASIC source. The original headers still read, “BASIC M6502 8K VER 1.1 BY MICRO-SOFT”—a time capsule from 1978.

The version we are releasing here—labeled “1.1”—contains fixes to the garbage collector identified by Commodore and jointly implemented in 1978 by Commodore engineer John Feagans and Bill Gates, when Feagans traveled to Microsoft’s Bellevue offices. This is the version that shipped as the PET’s “BASIC V2.” It even contains a playful Bill Gates Easter egg, hidden in the labels STORDO and STORD0, which Gates himself confirmed in 2010.

And a snippet from the GitHub on why it's historically important:

1. Foundation of the Personal Computer Revolution

  • This BASIC interpreter was the software foundation that powered many of the most influential early personal computers.
  • It democratized programming by making it accessible to non-technical users through a simple, English-like programming language.
  • Without this software, the personal computer revolution might have developed very differently.

The code is available on GitHub. And see the Microsoft blog post for more background.

Pretty cool to see it official like this.

Article taken from GamingOnLinux.com.
11 Likes
About the author -
author picture
I am the owner of GamingOnLinux. After discovering Linux back in the days of Mandrake in 2003, I constantly checked on the progress of Linux until Ubuntu appeared on the scene and it helped me to really love it. You can reach me easily by emailing GamingOnLinux directly. You can also follow my personal adventures on Bluesky [External Link].
See more from me
All posts need to follow our rules. Please hit the Report Flag icon on any post that breaks the rules or contains illegal / harmful content. Readers can also email us for any issues or concerns.
10 comments Subscribe

Another bit of trivia is that Bill Gates first tried his per machine licencing trick with BASIC on Jack Tramiel, founder & then CEO of Commodore; to which Tramiel famously replied 'I'm already married'.

A few years later the same trick worked on IBM with DOS, of course, which catapulted MS into desktop software dominance, and Gates himself into the most prestigeous of prestigeous lists of wonderfully prestigeous people.

MS paid a small company to plagiarize DOS out of Gary Kildall's CP/M, of course; and IBM got 'tricked' into the deal partly because Bill's mom was in the board of directors at IBM at the time.

Kildall always had a distaste for BASIC, by the way, and he thought a clunky procedural language like that did a disservice to programming education -- and not because he had a rival 'product' he was frustrated he couldn't sell instead. Kildall thought LOGO would've been a better educational language.
By the way, for some more pedantry in case anyone's interested in BASIC: What's being open sourced here is the 6502 assembly code for BASIC; not the grammar of the language itself; that has long been public (& MS's own extensions would've been easily reverse engineered as well).

-- BASIC interpreter in flex & bison: https://github.com/Dan-Jardim/BasicFlexBison.git [External Link]
-- as a PEG parser: https://git.sr.ht/~ach/minipeg/tree/HEAD/examples/basic.peg [External Link]
-- Antlr grammar for a BASIC that runs inside the JVM: https://github.com/antlr/grammars-v4/tree/master/basic [External Link]
scaine a day ago
User Avatar
  • Contributing Editor
  • Mega Supporter
Bill's mom was in the board of directors at IBM
Same old story - whenever you consider that a prominent (but usually ethically bereft) entrepreneur is successful because of their skill and commitment, you later discover it's largely just simple nepotism, privilege or luck. Gates, Jobs, Musk, Bezos, Zuckerberg, it's just endless.

Often it's a combination of all three.
Mountain Man a day ago
User Avatar
I wrote many a simple program and game using BASIC on my Commodore 64 and 128. I tried learning machine language at one point but found it incomprehensible.
syylk a day ago
User Avatar
I still think the "48 years ago" last modified column in GitHub is worth a smile.
Highball a day ago
User Avatar
>I tried learning machine language at one point but found it incomprehensible.

Eventually you get used to all the opcodes. But really it's much easier when you assign mnemonics to the opcodes. You probably would have had better luck if you learned the Assembly Language for each of those processors instead of going straight to machine language. Can't blame you though.
Caldathras 23 hours ago
Wow. I cut my programming teeth on Commodore Basic and, until today, never realized that it had been licensed from Microsoft. I didn't know about the Easter egg either.

Following the rabbit hole of references in the various linked blog posts, it was fascinating to learn that they often hid these Easter eggs in early code to provide additional proof that the code was theirs.

ALSO! Learned from the MS blog that Commodore is back in the computer business. They've either released or are preparing to release a modernized Commodore 64 for those retro-computer fans out there.
walther von stolzing 22 hours ago
> They've either released or are preparing to release a modernized Commodore 64 for those retro-computer fans out there.

AFAIK the product the new Commodore is selling is a convenient packaging of the Ultimate II FPGA, with a newly produced 'breadbin' case & keyboard assembly. Enthusiasts were sourcing those parts separately, & building 'new' C64s themselves for a number of years now; this new initiative led by youtuber 'Periphractic' and the original designer of the Ultimate II FPGA makes it easier (& a bit cheaper, I think), so it's a very welcome development IMHO.

I've been eyeing developments in the 'retro'-revival hardware scene for a while now -- and while all of it is beyond the reach of a broke-ass bum like me, some exciting FPGA-powered projects are happening on the C64, Spectrum ZX, & Apple II fronts.

Also, with respect to 6502 assembly -- check out Jim Butterfield's book, available at: https://commodore.bombjack.org/commodore/books.htm#MACHINE_LANGUAGE_and_ASSEMBLY_LANGUAGE [External Link] (entitled: Machine Language on the Commodore 64, 128 and other Commodore Computers Revised and Expanded Edition); together with the 'Mapping the C64' book (just a layout of the C64 ROM, & how it's mapped onto the peripherals); & 'Compute's Programming the Commodore 64' -- all available on the page I linked.
RFSharpe 22 hours ago
User Avatar
  • Supporter Plus
On a shelf behind my primary gaming machine I have a copy of the Commodore 64 User's Guide that was included when you purchased a C64. It is 167 pages long and a significant portion of the manual is dedicated to teaching the user how to program in Microsoft BASIC. It is not a light read. So yes... the first operating system I used on my home computer was written by Microsoft. However, about six years later I was introduced to Slackware Linux and my world of computing became much brighter. emoji

Here is a link to an online version of the manual:
https://www.commodore.ca/manuals/c64_users_guide/c64-users_guide-09-appendices.pdf [External Link]
walther von stolzing 22 hours ago
Yeah the manual that came with the C64 was a ~200 page book, and you could also get a comprehensive 'programmer's manual' in addition to that (there's a pdf on the bombjack site I linked above).

... though the Turkish translation that I got with my C64 in 1992 was heavily abridged, and didn't have any of the chapters & appendices dedicated to BASIC, and the hardware addresses for the color & sound POKEs; but they did include the English original with the package. Not speaking any English at the time I poked around (no pun intended) the listings in the original manual and somehow managed to alter the DATA lines in one of the sample programs to play a different song, and the sprite map in the 'C= hot air balloon' program to show a different picture -- but with no understanding whatsoever as to how the rest of the BASIC code worked. To me it was a pretty frustrating experience.
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon Logo Patreon. Plain Donations: PayPal Logo PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register