Microsoft's 6502 BASIC Is Now Open Source (microsoft.com)
- Reference: 0179007764
- News link: https://news.slashdot.org/story/25/09/04/1649210/microsofts-6502-basic-is-now-open-source
- Source link: https://opensource.microsoft.com/blog/2025/09/03/microsoft-open-source-historic-6502-basic/
> For decades, fragments and unofficial copies of Microsoft's 6502 BASIC have circulated online, mirrored on retrocomputing sites, and preserved in museum archives. Coders have studied the code, rebuilt it, and even run it in modern systems. Today, for the first time, we're opening the hatch and officially [2]releasing the code under an open-source license . Microsoft BASIC began in 1975 as the company's very first product: a BASIC interpreter for the Intel 8080, written by Bill Gates and Paul Allen for the Altair 8800. That codebase was soon adapted to run on other 8-bit CPUs, including the MOS 6502, Motorola 6800, and 6809.
>
> The 6502 port was completed in 1976 by Bill Gates and Ric Weiland. In 1977, Commodore licensed it for a flat fee of $25,000, a deal that placed Microsoft BASIC at the heart of Commodore's PET computers and, later, the VIC-20 and Commodore 64. 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.
[1] https://slashdot.org/~alternative_right
[2] https://opensource.microsoft.com/blog/2025/09/03/microsoft-open-source-historic-6502-basic/
'48 years ago' (Score:5, Interesting)
I kinda like how the [1]file statuses [github.com] actually show them being modified '48 years ago'.
[1] https://github.com/microsoft/BASIC-M6502
With an issue about it (Score:3)
...and of course someone [1]opened an issue [github.com] about that.
[1] https://github.com/microsoft/BASIC-M6502/issues/10
Teenage me would have loved this (Score:4, Interesting)
I carried my Abacus "The Anatomy of the Commodore 64" around all the time, mostly because it had a somewhat-commented disassembly of the C64's ROMs, which included this interpreter. But actual source would be even cooler.
I remember reading through it and suddenly realizing: "oh, that is why IF..GOTO is slightly faster than IF..THEN, because it skips an unnecessary call to CHRGET."
Re: (Score:2)
Ha ha! The github page shows it as last committed "48 years ago." Good one, MS.
Re: (Score:2)
Teenage me would have been confused. "What is Microsoft thinking, releasing their source code for all to see?" Back then, open source was still kind of a fringe concept.
Re: (Score:2)
Teenage me didn't know there was some kind of taboo about reading other people's code. To the contrary, my coding books explicitly asked for reading other people's code to improve your skills.
Re: (Score:3)
> Teenage me would have been confused. "What is Microsoft thinking, releasing their source code for all to see?" Back then, open source was still kind of a fringe concept.
No it wasn't. Open source was a big reason for the microcomputer revolution in the 70s - everyone was sharing around source code freely. The Apple II even came with full source code for the ROM.
The key points that changed it would be first, BIll Gates' famous "piracy" letter where he called the people freely copying Microsoft Basic as pirate
Re: (Score:3)
I certainly agree that open source code existed in the 70s. But I'd also point out that computing itself was still "fringe" at that time. Only serious hobbyists and large, rich businesses had computers at all. Yes, the Apple II came with source code, but most of the original personal computers did not. The Commodore 64, TRS-80, IBM PC / DOS, and later Apple computers all were closed source. Most early popular software was also closed source, such as VisiCalc, StarCalc, WordPerfect, and on and on. By 1995, o
Re: Teenage me would have loved this (Score:2)
Same here. I stole mine from a local bookstore, mid eighties. I spent weeks maybe months reading the assembler listings. Now it turns out I have been obsessed by code written by Bill Gates! In his last book he talks about optimizing the code in his head while hiking with his friends.
Is this the same as the MS Basic on my OSI (Score:1)
I had an OSI Challenger IIP with MS Basic, I wonder if this is the same?
OSI? (Score:3)
Interesting. My OSI C4P BASIC in ROM says:
WRITTEN BY RICHARD W. WEILAND.
OSI 6502 BASIC VERSION 1.0 REV 3.2
COPYRIGHT 1977 BY MICROSOFT CO.
Makes me wonder how much the other guys actually contributed.
Nice to see (Score:2)
It's nice to see this. I expect it's like a visit from an old friend for many people on slashdot.
I got my start with computers on the Commodore PET in our middle-school lunchroom, taking apart commercial BASIC programs, changing them to do what I wanted and saving my creations to blank parts at the end of the cassette tape. Then I moved on to summer BASIC classes on a TRS-80 and eventually more serious programming in Applesoft BASIC on an Apple ][+ as a teenager.
Never realized all those BASICs were more or
Are there any 6502 assemblers still available? (Score:2)
It has been way to long, don't remember anymore.
Re: (Score:2)
I still have the floppy disk and manual for PAL (an assembler for the Commodore 64) on my shelf. Of course, I don't have anything to run it on. In any event, writing a 6502 cross assembler in C (or even Python) for a modern computer would not be terribly difficult.
Re: (Score:2)
I once wrote a [1]6808 assembler in Microsoft Excel [wormhole.app] (to put a scrolling message on a [2]Heathkit ET-3400 [classiccmp.org] I found in the lab). I don't think it would take much more to write one for the 6502.
[1] https://wormhole.app/z9PE0Y#xtcqe5wMALHIPIwsMW1oRw
[2] http://dunfield.classiccmp.org/heath/index.htm
20 years to go for Windows 95 and NT 3.5! (Score:2)
Just think, in 20 more years MS will open source Windows 95 and, if lucky NT 3.5!
Re: (Score:2)
NT4, 2000, and XP/Server2003 sources are out there. What is desperately needed is Win7, and more related to this article, VB6. Those would provide actual benefits beyond hobbyist curiosity for retrocomputing even though they're long out of date. But greedy MS can't even do that. They're still the enemies of open source they've always been... just giving people some little scraps to pretend they're not.
Brings back memories. (Score:2)
I literally learned to program on a Commodore PET, and the first computer I owned was a Commodore 64. Now, the BASIC interpreters in those computers have long since been disassembled and analyzed, but it is still cool to have the original source.
CBASIC (Score:2)
FTW
6809 (Score:2)
Now do 6809E for the Tandy CoCo.
Re: (Score:2)
If anyone should be embarrassed it's Carmack. He's a Facebook employee now, lol.
Re: (Score:2)
Not since '22.
Re: (Score:2)
FWIW, he's putting together a start-up AI company called Keen Technologies now...
[1]https://keenagi.com/ [keenagi.com]
[1] https://keenagi.com/
Re: (Score:2)
what's wrong with Unreal Engine?
Re: (Score:2)
> what's wrong with Unreal Engine?
It's pretty much the only game in town, so to speak.
Re: (Score:2)
Minimum resource consumption has gone up a lot in the latest version of UE.
Re: (Score:3)
I had a CoCo. There is a great [1]series of books [colorcomputerarchive.com]: Color BASIC Unraveled, Extended BASIC Unraveled and Disk BASIC Unraveled which are commented disassemblies of the ROMs. I learned a lot about assembly language programming from reading those books.
[1] https://colorcomputerarchive.com/repo/Documents/Books/Unravelled%20Series/
Re: (Score:2)
"Now do 6809E for the Tandy CoCo." - that was my first thought too after reading the headline. Do both Disk Extended Color Basic 1.1 (CoCo1/2) and 2.0 (CoCo3).
Re: (Score:1)
Ahh yes, now we hear the plaintive calls of an open-source enthusiast. This one, agitated and restless, laments the absence of companionship. And so it demands—quite insistently—that others surrender their time, in the vain hope of filling the yawning void in its heart.