Back

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

58 points3 hoursgatesnotes.com
stkai2 hours ago

The source code is such a fun read (for the comments). I found some source code for GW-BASIC, and here are two of my favorites:

  ;WE COULD NOT FIT THE NUMBER INTO THE BUFFER DESPITE OUR VALIENT
  ;EFFORTS WE MUST POP ALL THE CHARACTERS BACK OFF THE STACK AND
  ;POP OFF THE BEGINNING BUFFER PRINT LOCATION AND INPUT A "%" SIGN THERE

  ;CONSTANTS FOR THE RANDOM NUMBER GENERATOR FOLLOW
  ;DO NOT CHANGE THESE WITHOUT CONSULTING KNUTH VOL 2
  ;CHAPTER 3 FIRST
Edit: GW-BASIC, not QBASIC (https://github.com/microsoft/GW-BASIC)
redwood1 hour ago

All I can say is this is the most evil company. The way they have open source washed themselves is absurd. They continue to pursue the Embrace Extend Extinguish playbok.

jer0me3 hours ago

The source code is linked at the end (warning: it's a 100 MB PDF).

https://images.gatesnotes.com/12514eb8-7b51-008e-41a9-512542...

mysterydip3 hours ago

Ironic for something designed to take up only 4KB on its target machine :)

masfuerte2 hours ago

Nice one. Has anyone OCRed this back into text?

seabass-labrax2 hours ago

Thank you for the warning. I once used up my Internet package's entire monthly quota by following a similar link on Hacker News.

jwnin2 hours ago

Some luck, and willingness to take risks paid off in ways that could never be anticipated. Not sure I'll see something like the pc era in my lifetime. Perhaps mobile phones, or the Internet.

wrobelda2 hours ago

I mean… The AI?

breadwinner3 hours ago

Microsoft got its start by Bill Gates doing some dumpster diving. Back then software wasn't seen as valuable thing, only hardware was. Source code wasn't something to be protected, so printouts of code would be thrown in trash. And that's where Bill Gates found the source code for Basic interpreter, which he ported and it became the first Microsoft product.

https://americanhistory.si.edu/comphist/gates.htm

https://paulallen.com/Futurist/Microsoft.aspx

ThrowawayR22 hours ago

> "...so printouts of code would be thrown in trash. And that's where Bill Gates found the source code for Basic interpreter, which he ported and it became the first Microsoft product"

Both sources you link to say Allen and Gates pulled listings of the PDP-10 operating system out (probably DEC's TOPS-10?) of the trash. BASIC is not an operating system. So your claim is debunked by your own sources.

"...digging out the operating system listings from the trash and studying those. Really not just banging away to find bugs like monkeys[laughs], but actually studying the code to see what was wrong."

https://americanhistory.si.edu/comphist/gates.htm

"...He and Bill would go “dumpster diving” in C-Cubed’s garbage to find discarded printouts with source code for the machine’s operating system..."

https://paulallen.com/Futurist/Microsoft.aspx

breadwinner1 hour ago

Even Wikipedia says Microsoft BASIC wasn't original work: https://en.wikipedia.org/wiki/Microsoft_BASIC

"During the home computer craze of the late-1970s and early-1980s, BASIC was ported to and supplied with many home computer designs. Slight variations to add support for machine-specific functions, especially graphics, led to a profusion of related designs like Commodore BASIC and Atari Microsoft BASIC."

ThrowawayR21 hour ago

[delayed]

zabzonk2 hours ago

Gates and Allen wrote and copyrighted the first Microsoft Basic, and the Dec10 8080 emulator needed to run it (I've written one of these - a bit later as it happens).

Allen wrote a loader (in machine code) for it on an aircraft flying down to sell it to Altair.

What ever you might say about them, they were not dim.

breadwinner2 hours ago

They were not dim, but Microsoft copied a lot, and didn't innovate. This aspect of Microsoft hasn't changed.

In the 1990s, during the competition between Microsoft and Sun Microsystems, Sun's CEO, Scott McNealy, compared Bill Gates to Ginger Rogers. This analogy suggested that, like Rogers, who danced everything Fred Astaire did but backward and in high heels, Gates was adept at following and adapting competitors' innovations. This comparison was part of Sun's broader critique of Microsoft's business practices at the time.

"It has been noted that everything Astaire did, Rogers was able to do -- backwards and in high heels. That's high praise for the nimble Ms. Rogers. But for a would-be visionary, following someone else's lead -- no matter how skillfully -- simply doesn't cut it."

https://web.archive.org/web/19991013082222/www.sun.com/dot-c...

zabzonk2 hours ago

Yes, well Scott McNealy will never be my idea of a brilliant man. Or Sun of a particularly good company - where are they now?

I remember one investment bank I worked for, starting:

IT tech: Would you like a Sun workstation?

Me: Nope, I would like a top of range Windows PC, with two or more screens.

IT tech: Yeah, OK, all the traders say that too. We're throwing those Suns in the dumpster.

+1
vlovich1232 hours ago
Henchman212 hours ago

Just yesterday I personally witnessed pallets of Sun/Oracle equipment being unloaded. I’ll admit, it made me nostalgic!

They’re still out there. Maybe not visible to normal folks, but I know for a fact until very recently the Chicago Mercantile Exchange used their hardware in great quantities— maybe even as the underlying hardware for their matching engines, though I admit this is conjecture on my part. They don’t exactly let exchange customers in those rooms!

I miss their 10k & 15k chassis. Solid kit for their day.

+1
breadwinner2 hours ago
dullcrisp2 hours ago

Seems that Ginger got the last laugh though.

esafak2 hours ago

When I look back at that era now I am amazed at how Gary Killdall failed to capitalize on his amazing position as the creator of CP/M, which was the dominant 8-bit OS and ran on numerous popular platforms, like the 8080, 8086, Z80, and the 68000. When IBM entered the PC market, Killdall and IBM could not come to an agreement so MS stepped in and licensed then purchased an imitation of CP/M called 86-DOS, which IBM offered in addition their own PC DOS. Killdall's company created an 8086 OS called CP/M-86 but it was more expensive than IBM's PC DOS and never took off. IBM did not want the liability of having contested code, so they let MS hold that bag and the rest is history.

santiagobasulto2 hours ago

I couldn't find the precise reference that mentions that they found the source code for the Basic interpreter and just "copied/ported" it. I did read they'd go "dumpster diving" to learn assembly. But not that they found and just ported the source code. Where is it?

dekhn2 hours ago

I think it comes from a misread of the text in the gates interview linked in the comment:

"r. We were moving ahead very rapidly: BASIC, FORTRAN, LISP, PDP-10 machine language, digging out the operating system listings from the trash and studying those. Really not just banging away to find bugs like monkeys[laughs], but actually studying the code to see what was wrong."

My understanding is that they saw the source implementation for other BASICs (on mainframes or whatever they were called at the time) but their code is mostly their own. Few if any programmers spring fully-formed from the head of zeus (although paul allen was close) and plenty of valuable intellectual property was originally created elsewhere.

breadwinner1 hour ago

"The listings evidently included Basic for the PDP-10, but it was Allen who did the Assembler programming to simulate the Altair, while Gates, Monte Davidoff and later Allen worked on a Basic interpreter for the machine."

See https://www.theregister.com/2000/06/29/bill_gates_roots/

CamperBob22 hours ago

"Just porting" is doing some seriously heavy lifting, if it's referring to porting something from a mainframe to one of the micros of the day.

shmerl2 hours ago

Don't forget the infamous Open Letter to Hobbyists that followed:

https://en.wikipedia.org/wiki/An_Open_Letter_to_Hobbyists

santiagobasulto2 hours ago

Microsoft (and maybe even Bill Gates personally) generated a strong "dislike" sentiment to the hacker community. But we can't deny that he and Paul Allen were pure breed hackers and helped a lot the development of technology. Of course, we all prefer OSS and we'd pick Linus (or insert OSS dev name here) 100 times over one of the "evil capitalists"/s, but nevertheless they have to be recognized.

gjsman-10001 hour ago

> Of course, we all prefer OSS and we'd pick Linus (or insert OSS dev name here) 100 times over one of the "evil capitalists"/s, but nevertheless they have to be recognized.

This is an extremely stupid and myopic view of the situation anyway - Linux only started gaining momentum with IBM's $1bn. investment; and over 80% of commits per year have been corporate funded since 2003. In more recent years, it's been over 90%. The community started Linux; corporations built Linux; that's reality.

starik363 hours ago

The screenshot of the source code at the end of the article is a ton of printed code.

How was it then entered into the Altair? Did someone have to retype it? Or was there media that predated floppies that was used?

ndiddy2 hours ago

It was distributed on paper tape. You needed a teletype with a paper tape reader to run it. Basically you would manually enter a bootloader using the switches on the Altair's front panel, and the bootloader would read BASIC off the tape and into RAM. If the checksum passed, it would then jump into BASIC. Here's a video of the process if you're interested: https://youtu.be/TxU_3dEJ2nM?t=1013

ttkari2 hours ago
richardwhiuk2 hours ago

Paul Allen entered it in front of the customer for the first run

https://paulallen.com/Futurist/Microsoft.aspx

I expect it was distributed on tape as well.

schlauerfox2 hours ago

"he’d forgotten to write the bootstrap loader" He didn't load the whole program from the switches on the face, just the bootstrap that would let them feed the paper tape through the teletype/paper tape reader that was common at the time. It would take a very very long time to load the whole program by hand. See this video of a demo. https://www.youtube.com/watch?v=TxU_3dEJ2nM

MaxGripe2 hours ago

If I had known back then that uncle Bill would be pushing experimental 'vaccines' on the world in the future, I would have chosen a different tech stack.

billforsternz2 hours ago

There's something rather cringeworthy about the heavy and painful animations etc. on this website trying to create a 1970s computer technology vibe but instead just giving me a headache. I'd much prefer the same information, and the same vibe, with some much less fancy, lightweight easy to read web tech that actually simulates an authentic 1970s experience (I remember that era well! I'm an 8080 programmer myself from way way back).