icon_Close
comments
Not seeing your comment? Read our Content Moderation Policy.
Log in or sign up to comment
icon_CheckmarkRed
Please verify your account
Resend verification email
Leave a comment
icon_Bold
icon_Italics
icon_Link
Submit

BASIC instinct

Celebrate 50 years of Microsoft with the company’s original source code

Before there was Office or Windows 95 or Xbox or AI, there was Altair BASIC.

Bill profile picture

Source Code

BASIC INSTINCT

Celebrate 50 years of Microsoft with the company’s original source code

Before there was Office or Windows 95 or Xbox or AI, there was Altair BASIC.

The Coolest Code I’ve Ever Written

In 1975, Paul Allen and I created Microsoft because we believed in our vision of a computer on every desk and in every home. Five decades later, Microsoft continues to innovate new ways to make life easier and work more productive. Making it 50 years is a huge accomplishment, and we couldn’t have done it without incredible leaders like Steve Ballmer and Satya Nadella—along with the many people who have worked at Microsoft over the years. Although I am excited to celebrate the anniversary, reaching this milestone feels bittersweet. I always love reflecting back on Microsoft’s history and dreaming about its future. But it’s also hard to believe that such a significant piece of my life has been around for a half-century! It feels like just yesterday that Paul and I were hunched over the PDP-10 in Harvard’s computer lab, writing the code that would become the first product of our new company.

This magazine cover changed my life.

Paul and I fell in love with computers while we were students at Lakeside.

That code remains the coolest code I’ve ever written to this day—and you can see it for yourself at the bottom of this page. The story of how Microsoft came to be begins with, of all things, a magazine. The January 1975 issue of Popular Electronics featured an Altair 8800 on the cover. The Altair 8800, created by a small electronics company called MITS, was a groundbreaking personal computer kit that promised to bring computing power to hobbyists. When Paul and I saw that cover, we knew two things: the PC revolution was imminent, and we wanted to get in on the ground floor. At the time, personal computers were practically non-existent. Paul and I knew that creating software that let people program the Altair could revolutionize the way people interacted with these machines. So, we reached out to Ed Roberts, the founder of MITS, and told him we had a version of the programming language BASIC for the chip that the Altair 8800 ran on.

There was just one problem: We didn’t. It was time to get to work.

The Basics of BASIC

Invented by two Dartmouth College professors in 1964, BASIC was designed to be easy to learn for people with no computer experience. With little study or technical aptitude, a person can write their own software in BASIC—anything from a checkbook-balancing program to a tic-tac-toe game. BASIC was the first language Paul and I learned (and it’s still used today).  Computer languages like BASIC serve the same purpose as English or any other language. In the same way that you can use English to order a coffee at a café, you can use BASIC to tell a computer to run a program, solve a math problem, or perform some other task.

Altair 8800

Translating Basic

There is a catch, though: Computers don’t speak BASIC. And the language they do speak is so complex and unintuitive that programming in it is incredibly difficult. To bridge the gap, Paul and I set out to create a BASIC interpreter, which would translate code into instructions the computer understood line by line as the program runs.  We considered creating a similar tool called a compiler that translates the entire program and then runs it all at once. But we figured the line-by-line approach of an interpreter would be helpful to novice programmers since it would give instant feedback on their code, allowing them to fix any mistakes as they crop up. 

There is no better feeling than when you learn that your approach works.

I was always a very good math student and found that the logic and problem-solving needed in math helped me learn computer programming.

Paul and I went to school with Ric Weiland, who later became Microsoft's second employee.

Getting Started

Paul and I decided to divide and conquer. We didn’t have the Intel 8080 chip that the Altair computer ran on, so Paul got to work writing a program that would simulate one on Harvard’s PDP-10 mainframe. This allowed us to test our software without needing an actual Altair. Meanwhile, I focused on writing the main code for the program while another friend, Monte Davidoff, worked on a portion called the math package. We coded day and night for the two months to create the software we had said already existed.

The mainframe of Harvard's PDP-10

Overcoming obstacles

Computer memory back then was expensive. Extra memory for the Altair could easily cost more than the computer itself, so every byte mattered. We thought that if we could fit our BASIC code into just four kilobytes, Altair owners using BASIC could still have enough memory left to run the programs they wrote (and not have to spend a lot of extra money). To meet that constraint, I used various techniques to optimize memory usage, like compact data structures and efficient algorithms. It was a fun challenge, and although Paul and I were stressed about getting Altair BASIC to MITS as quickly as possible, I had a blast figuring out how to make everything fit.

The Birth of Microsoft

Finally, after lots of sleepless nights, we were ready to show our BASIC interpreter to Ed Roberts, the president of MITS. The demonstration was a success, and MITS agreed to license the software. This was a pivotal moment for Paul and me. Altair BASIC became the first product of our new company, which we decided to call Micro-Soft. (We later dropped the hyphen.)  You can read more about the origin of Altair BASIC—including about how Paul had to finish part of the code on a flight to Albuquerque—in my memoir Source Code.  It’s amazing to think about how this one piece of code led to a half century of innovation from Microsoft. Before there was Office or Windows 95 or Xbox or AI, there was the original source code—and I still get a kick out of seeing it, even all these years later.

Download the Code

Look through the original Microsoft source code for yourself. Computer programming has come a long way over the last fifty years, but I’m still super proud of how it turned out.

Microsoft turns 50 years old tomorrow. As we’ve gotten closer to the anniversary, I have found myself reflecting back on the journey that led us to this point—and especially on the people who got us here.

In 1975, Paul Allen and I created Microsoft because we believed in our vision of a computer on every desk and in every home. That vision became a reality long ago, and in the years since, Microsoft has continued to build a future where innovation makes life easier and work more productive. We couldn’t have done it without incredible leaders like Steve Ballmer and Satya Nadella. Every single person who has worked at Microsoft over the years is a key part of its success too.

The truth is, for much of my life, I didn’t like to celebrate work milestones. When I was at Microsoft, I would insist we didn’t have time to talk about them. But as I got older, I learned how important it is to celebrate the wins in life. And making it 50 years is a huge cause for celebration.

The coolest code I’ve ever written

Although I am excited to join Steve, Satya, and everyone who helped make the company a success tomorrow in Redmond to celebrate its anniversary, I admit that reaching this milestone feels bittersweet. It’s hard to believe that such a significant piece of my life has been around for a half-century!

It feels like just yesterday that Paul and I were hunched over the PDP-10 in Harvard’s computer lab, writing the code that would become the first product of our new company.

That code remains the coolest code I’ve ever written to this day—and you can see it for yourself at the bottom of this page. 

The story of how Microsoft came to be begins with, of all things, a magazine. The January 1975 issue of Popular Electronics featured an Altair 8800 on the cover. The Altair 8800, created by a small electronics company called MITS, was a groundbreaking personal computer kit that promised to bring computing power to hobbyists. When Paul and I saw that cover, we knew two things: the PC revolution was imminent, and we wanted to get in on the ground floor.

At the time, personal computers were practically non-existent. Paul and I knew that creating software that let people program the Altair could revolutionize the way people interacted with these machines. So, we reached out to Ed Roberts, the founder of MITS, and told him we had a version of the programming language BASIC for the chip that the Altair 8800 ran on. 

There was just one problem: We didn’t. It was time to get to work.

The basics of BASIC

Invented by two Dartmouth College professors in 1964, BASIC was designed to be easy to learn for people with no computer experience. With little study or technical aptitude, a person can write their own software in BASIC—anything from a checkbook-balancing program to a tic-tac-toe game. BASIC was the first language Paul and I learned (and it’s still used today). 

Computer languages like BASIC serve the same purpose as English or any other language. In the same way that you can use English to order a coffee at a café, you can use BASIC to tell a computer to run a program, solve a math problem, or perform some other task. 

Translating BASIC

There is a catch, though: Computers don’t speak BASIC. And the language they do speak is so complex and unintuitive that programming in it is incredibly difficult. To bridge the gap, Paul and I set out to create a BASIC interpreter, which would translate code into instructions the computer understood line by line as the program runs. 

We considered creating a similar tool called a compiler that translates the entire program and then runs it all at once. But we figured the line-by-line approach of an interpreter would be helpful to novice programmers since it would give instant feedback on their code, allowing them to fix any mistakes as they crop up. 

Getting started

Paul and I decided to divide and conquer. We didn’t have the Intel 8080 chip that the Altair computer ran on, so Paul got to work writing a program that would simulate one on Harvard’s PDP-10 mainframe. This allowed us to test our software without needing an actual Altair. Meanwhile, I focused on writing the main code for the program while another friend, Monte Davidoff, worked on a portion called the math package. We coded day and night for the two months to create the software we had said already existed.

Overcoming obstacles

Computer memory back then was expensive. Extra memory for the Altair could easily cost more than the computer itself, so every byte mattered. We thought that if we could fit our BASIC code into just four kilobytes, Altair owners using BASIC could still have enough memory left to run the programs they wrote (and not have to spend a lot of extra money). To meet that constraint, I used various techniques to optimize memory usage, like compact data structures and efficient algorithms. It was a fun challenge, and although Paul and I were stressed about getting Altair BASIC to MITS as quickly as possible, I had a blast figuring out how to make everything fit.

The birth of Microsoft

Finally, after lots of sleepless nights, we were ready to show our BASIC interpreter to Ed Roberts. The demonstration was a success, and MITS agreed to license the software. This was a pivotal moment for Paul and me. Altair BASIC became the first product of our new company, which we decided to call Micro-Soft. (We later dropped the hyphen.) 

You can read more about the origin of Altair BASIC—including about how Paul had to finish part of the code on a flight to Albuquerque—in my memoir Source Code. 

It’s amazing to think about how this one piece of code led to a half century of innovation from Microsoft. Thanks to leaders like Steve and Satya, the company has reached levels of success that Paul and I could only dream of all those years ago in the Harvard computer lab. 

Before there was Office or Windows 95 or Xbox or AI, there was the original source code—and I still get a kick out of seeing it, even all these years later.

DOWNLOAD THE CODE

Look through the original Microsoft source code for yourself. Computer programming has come a long way over the last fifty years, but I’m still super proud of how it turned out.

icon_Share
Share
icon_Comments
Comments
Get my newsletter
icon_ArrowBack
icon_Close
Log in or sign up
Want good news in your inbox? Become a Gates Notes Insider today to get my newsletter and receive updates on inspiring stories and remarkable heroes from around the world. You'll learn about the incredible progress being made in global health, energy innovation, and more.
Your email
Please enter a valid email address
Next
icon_Close
icon_Search
POPULAR SEARCHES