Advertisement

Microsoft Releases Original 6502 BASIC Source Code

Microsoft has officially released the source code for its 6502 BASIC interpreter under an open-source license. This continues the recently started trend of open-sourcing the historically significant software made by the company decades ago.

Advertisеment

6502 BASIC Source Code
Screenshot by winaero.com

The release includes the 8K version 1.1 of Microsoft BASIC for the MOS 6502 processor, originally developed in 1976 by Bill Gates and Ric Weiland. This version formed the foundation of the BASIC language used in early personal computers, including the Commodore PET, VIC-20, and Commodore 64.

Explore on GitHub

In 1977, Commodore acquired a license to use this interpreter for a one-time fee of $25,000. The software became a core component of their computing platforms, enabling users to run simple programs such as:

10 PRINT "A LOOP"
20 GOTO 10

The released code reflects updates made in 1978, including improvements to the garbage collection system. These changes were developed jointly by Bill Gates and Commodore engineer John Feagans during a visit to Microsoft’s Bellevue office. This updated version later shipped as BASIC V2 on the Commodore PET.

The source tree also includes adaptations for other platforms, notably the Apple II, where it evolved into what became known as Applesoft BASIC. The original file headers retain the label "BASIC M6502 8K VER 1.1 BY MICRO-SOFT," preserving a record of its 1978 origin.

A notable detail within the code is an Easter egg in the labels STORDO and STORD0, confirmed by Bill Gates in 2010 as an intentional variation.

The MOS 6502 processor played a central role in many iconic systems, including the Apple II, Atari 2600, and Nintendo Entertainment System. Its design continues to influence computing education and hobbyist projects. In recent years, FPGA-based recreations and emulator development have sustained interest in the platform.

Efforts to preserve and rebuild the original Microsoft BASIC environment have been ongoing. Michael Steil successfully reconstructed build processes and verified byte-exact reproductions of the original ROMs. He also adapted the code to work with modern tools such as the cc65 assembler.

This open-source release follows Microsoft’s earlier publication of GW-BASIC, a descendant of the same codebase that was included in the original IBM PC. That software lineage later led to QBASIC and Visual Basic, which remains in use for Windows application development.

The 6502 BASIC release allows developers, historians, and enthusiasts to study, modify, and distribute the code. It represents a milestone in the preservation of early software history.

Source

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

Leave a Reply

Your email address will not be published.

css.php
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.