微软的 6502 BASIC 现已开源 (2025)
Microsoft's 6502 BASIC is now Open Source (2025)

原始链接: https://opensource.microsoft.com/blog/2025/09/03/microsoft-open-source-historic-6502-basic/

微软已正式以开源许可发布了其标志性的 6502 BASIC 源代码。该代码库最初由比尔·盖茨和保罗·艾伦于 1975 年开发,曾是 Commodore PET、VIC-20、Commodore 64 以及 Apple II 的“Applesoft BASIC”等家用电脑传奇的基础。 此次发布的 1.1 版本反映了微软与 Commodore 在 1978 年为改进解释器所作的合作成果。它至今仍是计算史上至关重要的一部分,其中还包含了一个著名的、由比尔·盖茨留下的“隐藏”彩蛋。 尽管几十年来该代码一直受到业余爱好者和保护人士的研究与重构,但此次官方发布提供了一份清晰的现代许可,允许社区自由地探索、修改该软件并以此进行开发。这一里程碑事件旨在纪念 6502 CPU 的持久影响,以及 BASIC 在教导数百万人编程方面所扮演的角色。通过打开这一宝库,微软确保了这一技术基础时代能够继续为未来的开发者和复古计算爱好者所触及。

Hacker News 新闻 | 往期 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 微软的 6502 BASIC 现已开源 (2025) (opensource.microsoft.com) 11 分,由 GTP 发布于 1 小时前 | 隐藏 | 往期 | 收藏 | 讨论 帮助 准则 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

Today, we’re opening the vault—for real.

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 releasing the code under an open-source license.

Microsoft’s first products: From the Altair to the Commodore 64

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. You can learn more about this time and hear directly from Bill Gates on the Microsoft Learn Website’s History of Microsoft video series or by visiting Bill Gates’ blog.

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. That decision put Microsoft’s BASIC at the heart of Commodore’s machines and helped millions of new programmers learn by typing:

  • 10 PRINT “HELLO”
  • 20 GOTO 10

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.

The enduring appeal of the MOS 6502 CPU

The MOS 6502 was the CPU behind the Apple II, Commodore 8-bit series, Atari 2600, Nintendo Entertainment System, and many more. Its simplicity, efficiency, and influence still inspire educators, hobbyists, and hardware tinkerers today.

In 2025, interest is as strong as ever. The retro-computing scene is thriving, with FPGA-based re-creations, emulator projects, and active development communities. The Commodore brand has returned with the announcement of a new FPGA-powered Commodore 64, the first official Commodore hardware in decades.

Reconstructing and preserving Microsoft BASIC

Over the years, dedicated preservationists have reconstructed build environments and verified that the historical source can still produce byte-exact ROMs. Notably, Michael Steil documented and rebuilt the original BASIC process for multiple targets. He has ported the code to assemblers like cc65, making it possible to build and run on modern systems.

This open-source release builds on that work, now with a clear, modern license. It follows Microsoft’s earlier release of GW-BASIC, which descended from the same lineage and shipped in the original IBM PC’s ROM. That code evolved into QBASIC, and later Visual Basic, which remains a supported language for Windows application development to this day.

From the blinking cursor of 1977 to FPGA builds in 2025, BASIC still fits in your hand. Now, for the first time, this influential 6502 version is truly yours to explore, modify, and share.

Listing of Altair BASIC on display at the New Mexico Museum of Natural History and Science.
Listing of Altair BASIC on display at the New Mexico Museum of Natural History and Science.

“Altair Basic Sign” by Swtpc6800, public domain via Wikimedia Commons.

联系我们 contact @ memedata.com